Skip to content

Commit 3bebab3

Browse files
authored
Merge pull request #17958 from WestLangley/dev_adreno
Revert Adreno double-sided front-facing workaround
2 parents 6892dd0 + 92b7d48 commit 3bebab3

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,10 @@ export default /* glsl */`
3232
vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );
3333
vec3 N = normalize( surf_norm );
3434
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 );
35+
mat3 tsn = mat3( S, T, N );
4636
47-
#endif
37+
mapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );
4838
49-
mat3 tsn = mat3( S, T, N );
5039
return normalize( tsn * mapN );
5140
5241
}

0 commit comments

Comments
 (0)