Browse Source

Explicitly optimized, rather than theoretically pure.

Ben Houston 9 years ago
parent
commit
181973a280
1 changed files with 8 additions and 4 deletions
  1. 8 4
      src/renderers/shaders/ShaderChunk/lights_lambert_vertex.glsl

+ 8 - 4
src/renderers/shaders/ShaderChunk/lights_lambert_vertex.glsl

@@ -93,13 +93,17 @@ GeometricContext backGeometry = GeometricContext( geometry.position, -geometry.n
 
 		#endif
 
-		float frontDotNL = saturate( dot( geometry.normal, frontIndirectLight.direction ) );
-		vLightFront += frontDotNL * frontIndirectLight.color * BRDF_Diffuse_Lambert( frontIndirectLight, geometry, diffuse );
+		//float frontDotNL = saturate( dot( geometry.normal, frontIndirectLight.direction ) );
+		//vLightFront += frontDotNL * frontIndirectLight.color * BRDF_Diffuse_Lambert( frontIndirectLight, geometry, diffuse );
+		// the following is equivalent to the above
+		vLightFront += frontIndirectLight.color;
 
 		#ifdef DOUBLE_SIDED
 
-			float backDotNL = saturate( dot( -geometry.normal, backIndirectLight.direction ) );
-			vLightBack += backDotNL * backIndirectLight.color * BRDF_Diffuse_Lambert( backIndirectLight, backGeometry, diffuse );
+			//float backDotNL = saturate( dot( -geometry.normal, backIndirectLight.direction ) );
+			//vLightBack += backDotNL * backIndirectLight.color * BRDF_Diffuse_Lambert( backIndirectLight, backGeometry, diffuse );
+			// the following is equivalent to the above
+			vLightBack += backIndirectLight.color;
 
 		#endif