Skip to content

Commit

Permalink
deal with @WestLangley's issues #1, #2, #3, #4 from here: mrdoob#5809…
Browse files Browse the repository at this point in the history
  • Loading branch information
bhouston committed Dec 30, 2014
1 parent 263109a commit 2dc5d1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/js/ShaderSkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" ],
Expand Down Expand Up @@ -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",

Expand Down
4 changes: 2 additions & 2 deletions examples/js/ShaderTerrain.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" ],
Expand Down
4 changes: 2 additions & 2 deletions examples/js/shaders/NormalDisplacementShader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down

0 comments on commit 2dc5d1e

Please sign in to comment.