From 22cbc9644b79df60b3f6336f9563debd47fb3ea1 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 28 Jun 2012 11:44:15 -0700 Subject: Added capability to split a mesh into multiiple parts to avoid buffer overflow situations. --- assets/shaders/Flag.vert.glsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'assets/shaders/Flag.vert.glsl') diff --git a/assets/shaders/Flag.vert.glsl b/assets/shaders/Flag.vert.glsl index 1c842cb0..8ba00922 100644 --- a/assets/shaders/Flag.vert.glsl +++ b/assets/shaders/Flag.vert.glsl @@ -35,7 +35,8 @@ void main() const float pi = 3.14159; float angle = time; - v_uv = texcoord; + v_uv.x = texcoord.x; + v_uv.y = texcoord.y; float x = 2.0*pi*texcoord.x/u_waveWidth; float y = 2.0*pi*texcoord.y; -- cgit v1.2.3 From 648ee61ae84216d0236e0dbc211addc13b2cfa3a Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 11:52:06 -0700 Subject: Expand tabs --- assets/shaders/Flag.vert.glsl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'assets/shaders/Flag.vert.glsl') 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; void main() { - float time = u_time * u_speed; - const float pi = 3.14159; - float angle = time; + float time = u_time * u_speed; + const float pi = 3.14159; + float angle = time; v_uv = texcoord; - float x = 2.0*pi*texcoord.x/u_waveWidth; - float y = 2.0*pi*texcoord.y; + float x = 2.0*pi*texcoord.x/u_waveWidth; + float y = 2.0*pi*texcoord.y; vec3 v = a_pos; - v.z = sin( x + angle ); - v.z += sin( 0.2*y + angle); - v.z *= u_waveHeight; - v.z -= 2.0*u_waveHeight; - v.z *= x * 0.09; - + v.z = sin( x + angle ); + v.z += sin( 0.2*y + angle); + v.z *= u_waveHeight; + v.z -= 2.0*u_waveHeight; + v.z *= x * 0.09; + gl_Position = u_projMatrix * u_mvMatrix * vec4(v,1.0) ; } -- cgit v1.2.3 From 6803c0abd279fcb640c38b3881b751bab982cbe0 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 12:42:16 -0700 Subject: Remove trailing spaces --- assets/shaders/Flag.vert.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assets/shaders/Flag.vert.glsl') diff --git a/assets/shaders/Flag.vert.glsl b/assets/shaders/Flag.vert.glsl index 49eaaccb..51ec8f8b 100644 --- a/assets/shaders/Flag.vert.glsl +++ b/assets/shaders/Flag.vert.glsl @@ -70,6 +70,6 @@ void main() v.z *= u_waveHeight; v.z -= 2.0*u_waveHeight; v.z *= x * 0.09; - + gl_Position = u_projMatrix * u_mvMatrix * vec4(v,1.0) ; } -- cgit v1.2.3