 //	frag_shaded	= o_col;
 //	o_col = vec4(maxBRDF.xyz,1.0);
 //	if(dot(maxBRDF.xyz,maxBRDF.xyz) < eps) o_col = vec4(1.0, 1.0, 1.0, 1.0);
-	frag_shaded	= o_col;
+	frag_shaded	= brdf;
 //	frag_shaded	= vec4(0,1,0,1);
 }
 



float thetaR;


//error constants
const float eps_pq = 1.0*pow(10.0, -5.0); 

	if(brdf.y < 1e-5) brdf.y = 0.0;
	if(brdf.z < 1e-5) brdf.z = 0.0;
	
	brdf =  brdf*1.0*gainF(_k1, _k2)*shadowF;
	brdf.xyz = getBRDF_RGB_T_D65(M_Adobe_XRNew, brdf.xyz);
	
	
