aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders/Flag.vert.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'assets/shaders/Flag.vert.glsl')
-rw-r--r--assets/shaders/Flag.vert.glsl22
1 files changed, 11 insertions, 11 deletions
diff --git a/assets/shaders/Flag.vert.glsl b/assets/shaders/Flag.vert.glsl
index fe3ff722..49eaaccb 100644
--- a/assets/shaders/Flag.vert.glsl
+++ b/assets/shaders/Flag.vert.glsl
@@ -55,21 +55,21 @@ varying vec2 v_uv;
55 55
56void main() 56void main()
57{ 57{
58 float time = u_time * u_speed; 58 float time = u_time * u_speed;
59 const float pi = 3.14159; 59 const float pi = 3.14159;
60 float angle = time; 60 float angle = time;
61 61
62 v_uv = texcoord; 62 v_uv = texcoord;
63 63
64 float x = 2.0*pi*texcoord.x/u_waveWidth; 64 float x = 2.0*pi*texcoord.x/u_waveWidth;
65 float y = 2.0*pi*texcoord.y; 65 float y = 2.0*pi*texcoord.y;
66 66
67 vec3 v = a_pos; 67 vec3 v = a_pos;
68 v.z = sin( x + angle ); 68 v.z = sin( x + angle );
69 v.z += sin( 0.2*y + angle); 69 v.z += sin( 0.2*y + angle);
70 v.z *= u_waveHeight; 70 v.z *= u_waveHeight;
71 v.z -= 2.0*u_waveHeight; 71 v.z -= 2.0*u_waveHeight;
72 v.z *= x * 0.09; 72 v.z *= x * 0.09;
73 73
74 gl_Position = u_projMatrix * u_mvMatrix * vec4(v,1.0) ; 74 gl_Position = u_projMatrix * u_mvMatrix * vec4(v,1.0) ;
75} 75}