未验证 提交 3bebab3b 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #17958 from WestLangley/dev_adreno

Revert Adreno double-sided front-facing workaround
......@@ -32,21 +32,10 @@ export default /* glsl */`
vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );
vec3 N = normalize( surf_norm );
#ifdef DOUBLE_SIDED
// Workaround for Adreno GPUs gl_FrontFacing bug. See #15850 and #10331
bool frontFacing = dot( cross( S, T ), N ) > 0.0;
mapN.xy *= ( float( frontFacing ) * 2.0 - 1.0 );
#else
mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );
mat3 tsn = mat3( S, T, N );
#endif
mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );
mat3 tsn = mat3( S, T, N );
return normalize( tsn * mapN );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册