Make sun/moon vert shaders use calcAtmospherics in hopes it will get OSX GL to link the shaders without complaining about unwritten varying vars.
parent
5fade93da8
commit
c7478f200c
|
|
@ -32,6 +32,8 @@ ATTRIBUTE vec2 texcoord0;
|
|||
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
void calcAtmospherics(vec3 eye_pos);
|
||||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
|
|
@ -39,6 +41,8 @@ void main()
|
|||
vec4 pos = (modelview_matrix * vert);
|
||||
|
||||
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
|
||||
|
||||
calcAtmospherics(pos.xyz);
|
||||
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ ATTRIBUTE vec2 texcoord0;
|
|||
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
void calcAtmospherics(vec3 eye_pos);
|
||||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
|
|
@ -40,5 +42,6 @@ void main()
|
|||
|
||||
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
|
||||
|
||||
calcAtmospherics(pos.xyz);
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ uniform mat4 modelview_projection_matrix;
|
|||
ATTRIBUTE vec3 position;
|
||||
ATTRIBUTE vec2 texcoord0;
|
||||
|
||||
//void calcAtmospherics(vec3 inPositionEye);
|
||||
void calcAtmospherics(vec3 inPositionEye);
|
||||
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
|
|
@ -44,5 +44,5 @@ void main()
|
|||
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
|
||||
//calcAtmospherics(pos.xyz);
|
||||
calcAtmospherics(pos.xyz);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ ATTRIBUTE vec2 texcoord0;
|
|||
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
void calcAtmospherics(vec3 eye_pos);
|
||||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
|
|
@ -40,5 +42,7 @@ void main()
|
|||
|
||||
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
|
||||
|
||||
calcAtmospherics(pos.xyz);
|
||||
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue