未验证 提交 d7601e11 编写于 作者: W WestLangley 提交者: GitHub

Shaders: Simplify envmap encoding logic (#22233)

* Clean up

* Simplify encoding logic
上级 a10f9eca
......@@ -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 );
......@@ -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 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册