We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6892dd0 + 92b7d48 commit 3bebab3Copy full SHA for 3bebab3
src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.js
@@ -32,21 +32,10 @@ export default /* glsl */`
32
vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );
33
vec3 N = normalize( surf_norm );
34
35
- #ifdef DOUBLE_SIDED
36
-
37
- // Workaround for Adreno GPUs gl_FrontFacing bug. See #15850 and #10331
38
39
- bool frontFacing = dot( cross( S, T ), N ) > 0.0;
40
41
- mapN.xy *= ( float( frontFacing ) * 2.0 - 1.0 );
42
43
- #else
44
45
- mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );
+ mat3 tsn = mat3( S, T, N );
46
47
- #endif
+ mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );
48
49
- mat3 tsn = mat3( S, T, N );
50
return normalize( tsn * mapN );
51
52
}
0 commit comments