MacOS X glFrustum generates -0.0 in W column of projection matrix; Windows glFrustum generates 0.0. This causes sign differences in the gl_ProjectionMatrixInverse between platforms. manually force the z coordinate sign in terrain sky projection to be negative like it ought to be
parent
0378c612c6
commit
2da256063f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue