Sfoglia il codice sorgente

fix double application of ambient light.

Ben Houston 10 anni fa
parent
commit
2d3f69905f
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      src/renderers/shaders/ShaderLib.js

+ 3 - 3
src/renderers/shaders/ShaderLib.js

@@ -230,13 +230,13 @@ THREE.ShaderLib = {
 			"	#ifdef DOUBLE_SIDED",
 			"	#ifdef DOUBLE_SIDED",
 
 
 			"		if ( gl_FrontFacing )",
 			"		if ( gl_FrontFacing )",
-			"			outgoingLight += diffuseColor.rgb * ( vLightFront * shadowMask + totalAmbientLight ) + emissive;",
+			"			outgoingLight += diffuseColor.rgb * ( vLightFront * shadowMask ) + emissive;",
 			"		else",
 			"		else",
-			"			outgoingLight += diffuseColor.rgb * ( vLightBack * shadowMask + totalAmbientLight ) + emissive;",
+			"			outgoingLight += diffuseColor.rgb * ( vLightBack * shadowMask ) + emissive;",
 
 
 			"	#else",
 			"	#else",
 
 
-			"		outgoingLight += diffuseColor.rgb * ( vLightFront * shadowMask + totalAmbientLight ) + emissive;",
+			"		outgoingLight += diffuseColor.rgb * ( vLightFront * shadowMask ) + emissive;",
 
 
 			"	#endif",
 			"	#endif",