]> gitweb.factorcode.org Git - factor.git/commitdiff
MacOS X glFrustum generates -0.0 in W column of projection matrix; Windows glFrustum...
authorJoe Groff <arcata@gmail.com>
Thu, 14 May 2009 02:28:12 +0000 (21:28 -0500)
committerJoe Groff <arcata@gmail.com>
Thu, 14 May 2009 02:28:12 +0000 (21:28 -0500)
extra/terrain/shaders/shaders.factor

index 630163c724adcc75e79a5c98cfbae9c429638889..9233ab3f36cf1ff82be1690226990a351b8b1c74 100644 (file)
@@ -12,6 +12,7 @@ void main()
     gl_Position = v;
 
     vec4 p = gl_ProjectionMatrixInverse * v;
+    p.z = -abs(p.z);
     
     float s = sin(sky_theta), c = cos(sky_theta);
     direction = mat3(1, 0, 0,  0, c, s,  0, -s, c)