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 d58ec08 + d29a9cd commit 0317e8eCopy full SHA for 0317e8e
src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl
@@ -16,6 +16,8 @@
16
vec2 st1 = dFdy( vUv.st );
17
18
float scale = sign( st1.t * st0.s - st0.t * st1.s ); // we do not care about the magnitude
19
+ scale *= float( gl_FrontFacing ) * 2.0 - 1.0;
20
+
21
vec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );
22
vec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );
23
vec3 N = normalize( surf_norm );
0 commit comments