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
+14
View File
@@ -0,0 +1,14 @@
// Sun Most Representative Point (used for MRP area lighting method)
// From "Frostbite going PBR" paper
vec3 SunMRP(vec3 normal, vec3 eyedir)
{
vec3 local_sundir = normalize((transpose(u_inverse_view_matrix) * vec4(sundirection, 0.)).xyz);
vec3 R = reflect(-eyedir, normal);
float angularRadius = 3.14 * sun_angle / 180.;
vec3 D = local_sundir;
float d = cos(angularRadius);
float r = sin(angularRadius);
float DdotR = dot(D, R);
vec3 S = R - DdotR * D;
return (DdotR < d) ? normalize(d * D + normalize (S) * r) : R;
}