Fix bug#123: 3d cloud flicker on Mac
This commit is contained in:
parent
92b3358f83
commit
cc37e63561
1 changed files with 6 additions and 2 deletions
|
@ -36,8 +36,12 @@ void main(void)
|
|||
|
||||
// Determine a lighting normal based on the vertex position from the
|
||||
// center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker.
|
||||
float n = dot(normalize(-gl_LightSource[0].position.xyz),
|
||||
normalize(mat3x3(gl_ModelViewMatrix) * (- gl_Position.xyz)));;
|
||||
|
||||
// fix flickering of 3d clouds on some macs
|
||||
// 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));
|
||||
|
||||
// Determine the position - used for fog and shading calculations
|
||||
vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position);
|
||||
|
|
Loading…
Add table
Reference in a new issue