SuperTuxKart 1.5 upstream source (from official release tarball)

This commit is contained in:
Benjamin
2026-06-11 20:04:02 +02:00
commit 2957e51aaa
8551 changed files with 1801800 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
// Octahedron Normal Vector
vec2 OctWrap(vec2 v)
{
vec2 w = 1.0 - abs( v.yx );
if (v.x < 0.0) w.x = -w.x;
if (v.y < 0.0) w.y = -w.y;
return w;
}
vec2 EncodeNormal(vec3 n)
{
n /= (abs(n.x) + abs(n.y) + abs(n.z));
n.xy = n.z >= 0.0 ? n.xy : OctWrap(n.xy);
n.xy = n.xy * 0.5 + 0.5;
return n.xy;
}