diff --git a/examples/js/ShaderSkin.js b/examples/js/ShaderSkin.js index 0433864af4564e..7398f0a628d5f2 100644 --- a/examples/js/ShaderSkin.js +++ b/examples/js/ShaderSkin.js @@ -293,7 +293,7 @@ THREE.ShaderSkin = { "totalLight += hemiTotal;", "#endif", - "gl_FragColor.xyz = gl_FragColor.xyz * ( totalLight + ambientLightColor ) + specularTotal;", + "gl_FragColor.xyz = gl_FragColor.xyz * ( totalLight + ambientLightColor * diffuse ) + specularTotal;", THREE.ShaderChunk[ "shadowmap_fragment" ], THREE.ShaderChunk[ "linear_to_gamma_fragment" ], @@ -591,7 +591,7 @@ THREE.ShaderSkin = { "gl_FragColor.xyz *= pow( colDiffuse.xyz, vec3( 0.5 ) );", - "gl_FragColor.xyz += ambientLightColor * colDiffuse.xyz + specularTotal;", + "gl_FragColor.xyz += ambientLightColor * diffuse * colDiffuse.xyz + specularTotal;", "#ifndef VERSION1", diff --git a/examples/js/ShaderTerrain.js b/examples/js/ShaderTerrain.js index a9ea9d89ee2c45..ac6b2f1b687921 100644 --- a/examples/js/ShaderTerrain.js +++ b/examples/js/ShaderTerrain.js @@ -286,8 +286,8 @@ THREE.ShaderTerrain = { "#endif", - //"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor) + totalSpecular;", - "gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor + totalSpecular );", + //"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * diffuse ) + totalSpecular;", + "gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * diffuse + totalSpecular );", THREE.ShaderChunk[ "shadowmap_fragment" ], THREE.ShaderChunk[ "linear_to_gamma_fragment" ], diff --git a/examples/js/shaders/NormalDisplacementShader.js b/examples/js/shaders/NormalDisplacementShader.js index ef7ecf408232cf..a95ce1abb7b9e8 100644 --- a/examples/js/shaders/NormalDisplacementShader.js +++ b/examples/js/shaders/NormalDisplacementShader.js @@ -428,11 +428,11 @@ THREE.NormalDisplacementShader = { " #ifdef METAL", - " gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor + totalSpecular );", + " gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * diffuse + totalSpecular );", " #else", - " gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor ) + totalSpecular;", + " gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * diffuse ) + totalSpecular;", " #endif",