 	float fF = (nSkin - 1.0);
 	fF = fF*fF;
 	float R0 = fF + nK*nK;
-	if(cosTheta > 0.999){
+	if (cosTheta > 0.999){
 		fF = R0;
-	}else{
+	} else {
 		fF = fF + 4.0*nSkin*pow(1.0 - cosTheta, 5.0) + nK*nK;
 	}	
 	return fF/R0;
 }
 
-float getFresnelFactorAbsolute(vec3 K1, vec3 K2){
-	float nSkin = 1.5;
-	// float nSkin = 1.0015;
-	float nK = 0.0;
-	
-	vec3 hVec = -K1 + K2;
-		 
-	hVec = normalize(hVec);
-	 
-	float cosTheta = dot(hVec,K2);	
-	
-	float fF = (nSkin - 1.0);
-	
-	fF = fF * fF;
-	
-	float R0 = fF + nK*nK;
-	if (cosTheta > 0.999999)
-		fF = R0;
-	else
-		fF = fF + 4*nSkin*pow(1- cosTheta,5.0) + nK*nK;
-	
-	// do this division if its not on relative scale
-	fF = fF/ ((nSkin + 1.0)* (nSkin + 1.0) + nK*nK);
-	
-	return fF;
-}
-
+//a filter which models the occlusion of the 
+//given light source which occurs since our 
+//surface is assumed to be v-caved shaped.
+//thus some light rays may no reach a given point
+//on a surface. also models masking effects
+//similarly a viewer cannot fully see all the points 
+//on a given v-caved surface.
+//@param K1 incident light direction
+//@param K2 viewing direciton
+//@return final amount of light contribution at a given point
+//		   a viewer will see due to shadowing and masking influence.
 float getShadowMaskFactor(vec3 K1, vec3 K2){
 	vec3 N = normalize(o_normal);
 	vec3 hVec = -K1 + K2;

vec2 getNMMfor(float, float);
vec3 sumContributionAlongDir(vec2, float, float);

void setVarXY(){
	dH = t0;
	float coherenceLength = 65.0e-6;
	float sigSpatial = coherenceLength/4.0f;

	// temporary sigma
	float sigTemp;
	sigTemp = 0.5 / PI ;
	sigTemp = sigTemp /sigSpatial;
	sigTemp = sigTemp * dH;
	
	varX_InTxtUnits = sigTemp * sigTemp * fftWW * fftWW ; 
	varY_InTxtUnits = sigTemp * sigTemp * fftHH * fftHH;
	
	// Set coordinates for the Origin
	if(fftWW % 2 == 0){
		orgU = float(fftWW) / 2.0f  ; // -2 dur to rotational lochay
	}else{
		orgU = float(fftWW - 1.0) / 2.0f  ;
	}
	
	if(fftHH % 2 == 0){
		orgV = float(fftHH) / 2.0f  ;
	}else{
		orgV = float(fftHH - 1.0)/2.0f ;
	}
}

vec3 getBRDF_RGB_T_D65(mat3 T, vec3 brdf_xyz){
	vec3 D65 = vec3(0.95047, 1.0, 1.08883);
	vec3 output = vec3(0.0);

		 0.0052, -0.0144,  1.0090
);

// function declarations
void mainBRDFMap();
void mainRenderGeometry();
