Skip to content

Commit

Permalink
Shaders: Simplify envmap encoding logic (#22233)
Browse files Browse the repository at this point in the history
* Clean up

* Simplify encoding logic
  • Loading branch information
WestLangley authored Aug 2, 2021
1 parent a10f9ec commit d7601e1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export default /* glsl */`
vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
envColor = envMapTexelToLinear( envColor );
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );
Expand All @@ -48,12 +50,6 @@ export default /* glsl */`
#endif
#ifndef ENVMAP_TYPE_CUBE_UV
envColor = envMapTexelToLinear( envColor );
#endif
#ifdef ENVMAP_BLENDING_MULTIPLY
outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
Expand Down

0 comments on commit d7601e1

Please sign in to comment.