2013-12-09 20:58:22 -05:00
|
|
|
/*--- GENERIC HEADER ---*/
|
|
|
|
|
|
|
|
varying vec3 nor;
|
|
|
|
uniform mat4 invtworldm;
|
|
|
|
|
|
|
|
|
|
|
|
/*--- END OF GENERIC HEADER --*/
|
|
|
|
|
2013-11-30 16:33:06 -05:00
|
|
|
uniform vec3 windDir;
|
2013-05-11 19:09:03 -04:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2013-11-30 16:33:06 -05:00
|
|
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
|
|
|
|
|
|
|
vec4 vertexPosition = gl_Vertex;
|
|
|
|
vertexPosition.xyz += windDir * gl_Color.r;
|
|
|
|
|
2013-12-09 20:58:22 -05:00
|
|
|
nor = (invtworldm * vec4(gl_Normal, 0.0)).xyz;
|
|
|
|
nor = normalize(nor);
|
|
|
|
nor = nor * 0.5 + 0.5;
|
|
|
|
|
2013-11-30 16:33:06 -05:00
|
|
|
gl_Position = gl_ModelViewProjectionMatrix * vertexPosition;
|
2013-12-09 20:58:22 -05:00
|
|
|
|
|
|
|
|
2013-11-06 18:17:18 -05:00
|
|
|
}
|