提交 033c1d25 编写于 作者: W WestLangley

Avoid if-statement

上级 d6f1f896
......@@ -40,7 +40,9 @@ export default /* glsl */`
// Workaround for Adreno GPUs gl_FrontFacing bug. See #15850 and #10331
if ( dot( cross( S, T ), N ) < 0.0 ) mapN.xy *= - 1.0;
bool frontFacing = dot( cross( S, T ), N ) > 0.0;
mapN.xy *= ( float( frontFacing ) * 2.0 - 1.0 );
#else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册