This feels more intuitive, otherwise ambiently lit textured surfaces look weird.
@@ -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 ) {",
@@ -439,7 +439,7 @@ THREE.ShaderChunk = {
- "gl_FragColor.xyz = gl_FragColor.xyz * totalDiffuse + totalSpecular + ambientLightColor * ambient;"
+ "gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * ambient ) + totalSpecular;"
].join("\n"),