Skip to content

Commit

Permalink
Merge pull request #17958 from WestLangley/dev_adreno
Browse files Browse the repository at this point in the history
Revert Adreno double-sided front-facing workaround
  • Loading branch information
mrdoob authored Nov 22, 2019
2 parents 6892dd0 + 92b7d48 commit 3bebab3
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit 3bebab3

Please sign in to comment.