1
0
Fork 0

Another attempt to fix #123: 3d clouds flicker on mac

Thanks to Stuart for providing this patch.
This commit is contained in:
Torsten Dreyer 2011-06-28 20:03:59 +02:00
parent e4aed318d0
commit 9998a658ec

View file

@ -41,7 +41,8 @@ void main(void)
// http://code.google.com/p/flightgear-bugs/issues/detail?id=123
// float n = dot(normalize(-gl_LightSource[0].position.xyz),
// normalize(mat3x3(gl_ModelViewMatrix) * (- gl_Position.xyz)));;
float n = dot(normalize(-gl_LightSource[0].position.xyz), vec3(0.0,0.0,-1.0));
float n = dot(normalize(-gl_LightSource[0].position.xyz),
normalize(vec3(gl_ModelViewMatrix * vec4(- gl_Position.xyz,0.0))));
// Determine the position - used for fog and shading calculations
vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position);