Files
stk-code_catmod/data/shaders/grass.vert
T
samuncle 14432a8689 Now the grass shader can be used with the new pipeline.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14695 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-10 01:58:22 +00:00

26 lines
426 B
GLSL

/*--- GENERIC HEADER ---*/
varying vec3 nor;
uniform mat4 invtworldm;
/*--- END OF GENERIC HEADER --*/
uniform vec3 windDir;
void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
vec4 vertexPosition = gl_Vertex;
vertexPosition.xyz += windDir * gl_Color.r;
nor = (invtworldm * vec4(gl_Normal, 0.0)).xyz;
nor = normalize(nor);
nor = nor * 0.5 + 0.5;
gl_Position = gl_ModelViewProjectionMatrix * vertexPosition;
}