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.
1 parent 49e5304 commit 134169aCopy full SHA for 134169a
src/shader-chunks/shaders/normal-codec-pars.frag
@@ -9,7 +9,7 @@
9
vec2 pp_encodeNormal(vec3 n) {
10
11
n /= (abs(n.x) + abs(n.y) + abs(n.z));
12
- n.xy = (n.z >= 0.0) ? n.xy : (1.0 - abs(n.yx)) * sign(n.xy);
+ n.xy = (n.z >= 0.0) ? n.xy : (1.0 - abs(n.yx)) * vec2(n.x >= 0.0 ? 1.0 : -1.0, n.y >= 0.0 ? 1.0 : -1.0);
13
return n.xy;
14
15
}
0 commit comments