float BeckmanGeometricShadowingFunction (float NdotL, float NdotV, float roughness){
float roughnessSqr = roughness*roughness;
float NdotLSqr = NdotL*NdotL;
float NdotVSqr = NdotV*NdotV;
float calulationL = (NdotL)/(roughnessSqr * sqrt(1- NdotLSqr));
float calulationV = (NdotV)/(roughnessSqr * sqrt(1- NdotVSqr));
float SmithL = calulationL < 1.6 ? (((3.535 * calulationL)
+ (2.181 * calulationL * calulationL))/(1 + (2.276 * calulationL) +
(2.577 * calulationL * calulationL))) : 1.0;
float SmithV = calulationV < 1.6 ? (((3.535 * calulationV)
+ (2.181 * calulationV * calulationV))/(1 + (2.276 * calulationV) +
(2.577 * calulationV * calulationV))) : 1.0;
float Gs = (SmithL * SmithV);
return Gs;
}