Explorar o código

Changed ambient term to influence also texture in Phong / normal map materials.

This feels more intuitive, otherwise ambiently lit textured surfaces look weird.
alteredq %!s(int64=14) %!d(string=hai) anos
pai
achega
7355c2b68b

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
build/Three.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
build/custom/ThreeExtras.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
build/custom/ThreeWebGL.js


+ 1 - 1
src/extras/ShaderUtils.js

@@ -280,7 +280,7 @@ THREE.ShaderUtils = {
 
 					"#endif",
 
-					"gl_FragColor.xyz = gl_FragColor.xyz * totalDiffuse + totalSpecular + ambientLightColor * uAmbientColor;",
+					"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * uAmbientColor) + totalSpecular;",
 
 					"if ( enableReflection ) {",
 

+ 1 - 1
src/renderers/WebGLShaders.js

@@ -439,7 +439,7 @@ THREE.ShaderChunk = {
 
 		"#endif",
 
-		"gl_FragColor.xyz = gl_FragColor.xyz * totalDiffuse + totalSpecular + ambientLightColor * ambient;"
+		"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * ambient ) + totalSpecular;"
 
 	].join("\n"),
 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio