Make grass speed and amplitude configurable

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12735 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2013-05-12 00:14:53 +00:00
parent fd54f68a92
commit 3b20637b48
3 changed files with 25 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
uniform float angle;
uniform float amplitude;
varying vec4 coord;
@@ -6,7 +7,7 @@ void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
vec4 vertexPosition = ftransform(); //gl_ModelViewMatrix * gl_Vertex;
vertexPosition += vec4(1,1,0,0) * 0.25 * gl_Color.r * sin(angle);
vertexPosition += vec4(1,1,0,0) * amplitude * gl_Color.r * sin(angle);
gl_Position = vertexPosition;
gl_FrontColor = vec4(1,1,1,1);
gl_BackColor = vec4(1,1,1,1);