 
 	uniform HemisphereLight hemisphereLights[ MAX_HEMI_LIGHTS ];
 
-	void getHemisphereIncidentLight( const in HemisphereLight hemiLight, const in GeometricContext geometryContext, out IncidentLight incidentLight ) { 
-	
-		float dotNL = dot( geometryContext.normal, hemiLight.direction );
+	void getHemisphereIncidentLight( const in HemisphereLight hemiLight, const in GeometricContext geometry, out IncidentLight incidentLight ) { 
+	
+		float dotNL = dot( geometry.normal, hemiLight.direction );
 
 		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
 
 		incidentLight.color = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
 
-		incidentLight.direction = geometryContext.normal;
-
-	}
-
-#endif
+		incidentLight.direction = geometry.normal;
+
+	}
+
+#endif


}

void BRDF_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometryContext, const in vec3 specularColor, const in float shininess, inout ReflectedLight reflectedLight ) {

	vec3 halfDir = normalize( incidentLight.direction + geometryContext.viewDir );
	float dotNH = saturate( dot( geometryContext.normal, halfDir ) );
	float dotLH = saturate( dot( incidentLight.direction, halfDir ) );

	vec3 F = F_Schlick( specularColor, dotLH );

#define RECIPROCAL_PI2 0.15915494
#define LOG2 1.442695
#define EPSILON 1e-6
#define saturate(a) clamp( a, 0.0, 1.0 )
#define whiteCompliment(a) ( 1.0 - saturate( a ) )

float luminance( const in vec3 color ) {
    return dot( color, vec3(0.2125, 0.7154, 0.0721) );
}

float average( const in vec3 color ) {
    return dot( color, vec3(0.3333, 0.3333, 0.3333) );
}

vec3 transformDirection( in vec3 normal, in mat4 matrix ) {
