Skip to content

Commit 47b7f88

Browse files
committed
1 parent 8cb82c8 commit 47b7f88

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

examples/js/ShaderSkin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ THREE.ShaderSkin = {
269269

270270
"#endif",
271271

272-
"outgoingLight.xyz += diffuseColor.xyz * ( totalDiffuseLight + ambientLightColor * diffuse ) + totalSpecularLight;",
272+
"outgoingLight += diffuseColor.xyz * ( totalDiffuseLight + ambientLightColor * diffuse ) + totalSpecularLight;",
273273

274274
THREE.ShaderChunk[ "shadowmap_fragment" ],
275275
THREE.ShaderChunk[ "linear_to_gamma_fragment" ],
@@ -526,11 +526,11 @@ THREE.ShaderSkin = {
526526

527527
"#ifdef VERSION1",
528528

529-
"vec3 nonblurColor = sqrt(outgoingLight.xyz );",
529+
"vec3 nonblurColor = sqrt(outgoingLight );",
530530

531531
"#else",
532532

533-
"vec3 nonblurColor = outgoingLight.xyz;",
533+
"vec3 nonblurColor = outgoingLight;",
534534

535535
"#endif",
536536

examples/js/shaders/NormalDisplacementShader.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,11 @@ THREE.NormalDisplacementShader = {
387387

388388
" #ifdef METAL",
389389

390-
" outgoingLight.xyz += diffuseColor.xyz * ( totalDiffuseLight + ambientLightColor * diffuse + totalSpecularLight );",
390+
" outgoingLight += diffuseColor.xyz * ( totalDiffuseLight + ambientLightColor * diffuse + totalSpecularLight );",
391391

392392
" #else",
393393

394-
" outgoingLight.xyz += diffuseColor.xyz * ( totalDiffuseLight + ambientLightColor * diffuse ) + totalSpecularLight;",
394+
" outgoingLight += diffuseColor.xyz * ( totalDiffuseLight + ambientLightColor * diffuse ) + totalSpecularLight;",
395395

396396
" #endif",
397397

@@ -417,7 +417,7 @@ THREE.NormalDisplacementShader = {
417417

418418
" #endif",
419419

420-
" outgoingLight.xyz = mix( outgoingLight.xyz, cubeColor.xyz, specularTex.r * reflectivity );",
420+
" outgoingLight = mix( outgoingLight.xyz, cubeColor.xyz, specularTex.r * reflectivity );",
421421

422422
" }",
423423

src/renderers/shaders/ShaderChunk/envmap_fragment.glsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
sampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );
3838
sampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;
3939
vec4 envColor = texture2D( envMap, sampleUV );
40-
40+
4141
#elif defined( ENVMAP_TYPE_SPHERE )
4242
vec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));
4343
vec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );
@@ -47,15 +47,15 @@
4747

4848
#ifdef ENVMAP_BLENDING_MULTIPLY
4949

50-
outgoingLight.xyz = mix( outgoingLight.xyz, outgoingLight.xyz * envColor.xyz, specularStrength * reflectivity );
50+
outgoingLight = mix( outgoingLight, outgoingLight. * envColor.xyz, specularStrength * reflectivity );
5151

5252
#elif defined( ENVMAP_BLENDING_MIX )
5353

54-
outgoingLight.xyz = mix( outgoingLight.xyz, envColor.xyz, specularStrength * reflectivity );
54+
outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
5555

5656
#elif defined( ENVMAP_BLENDING_ADD )
5757

58-
outgoingLight.xyz += envColor.xyz * specularStrength * reflectivity;
58+
outgoingLight += envColor.xyz * specularStrength * reflectivity;
5959

6060
#endif
6161

0 commit comments

Comments
 (0)