File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ THREE.ShaderSkin = {
293293 "totalLight += hemiTotal;" ,
294294 "#endif" ,
295295
296- "gl_FragColor.xyz = gl_FragColor.xyz * ( totalLight + ambientLightColor ) + specularTotal;" ,
296+ "gl_FragColor.xyz = gl_FragColor.xyz * ( totalLight + ambientLightColor * diffuse ) + specularTotal;" ,
297297
298298 THREE . ShaderChunk [ "shadowmap_fragment" ] ,
299299 THREE . ShaderChunk [ "linear_to_gamma_fragment" ] ,
@@ -591,7 +591,7 @@ THREE.ShaderSkin = {
591591
592592 "gl_FragColor.xyz *= pow( colDiffuse.xyz, vec3( 0.5 ) );" ,
593593
594- "gl_FragColor.xyz += ambientLightColor * colDiffuse.xyz + specularTotal;" ,
594+ "gl_FragColor.xyz += ambientLightColor * diffuse * colDiffuse.xyz + specularTotal;" ,
595595
596596 "#ifndef VERSION1" ,
597597
Original file line number Diff line number Diff line change @@ -286,8 +286,8 @@ THREE.ShaderTerrain = {
286286
287287 "#endif" ,
288288
289- //"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor) + totalSpecular;",
290- "gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor + totalSpecular );" ,
289+ //"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * diffuse ) + totalSpecular;",
290+ "gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * diffuse + totalSpecular );" ,
291291
292292 THREE . ShaderChunk [ "shadowmap_fragment" ] ,
293293 THREE . ShaderChunk [ "linear_to_gamma_fragment" ] ,
Original file line number Diff line number Diff line change @@ -428,11 +428,11 @@ THREE.NormalDisplacementShader = {
428428
429429 " #ifdef METAL" ,
430430
431- " gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor + totalSpecular );" ,
431+ " gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * diffuse + totalSpecular );" ,
432432
433433 " #else" ,
434434
435- " gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor ) + totalSpecular;" ,
435+ " gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * diffuse ) + totalSpecular;" ,
436436
437437 " #endif" ,
438438
You can’t perform that action at this time.
0 commit comments