Skip to content

Commit 2dc5d1e

Browse files
committed
1 parent 263109a commit 2dc5d1e

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

examples/js/ShaderSkin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

examples/js/ShaderTerrain.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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" ],

examples/js/shaders/NormalDisplacementShader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)