aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders/Flag.vert.glsl
diff options
context:
space:
mode:
authorAnanya Sen2012-02-23 13:52:32 -0800
committerAnanya Sen2012-02-23 13:52:32 -0800
commitec3d07c2fea4e79c68606234074f43d694982e5b (patch)
treedc7c830c361d35c04a4d9b6d55c6c36d7a5d61cd /assets/shaders/Flag.vert.glsl
parent7283884c39df537694b21419a3ea9e3ca7793b4b (diff)
parent287a0bad5b774a380ec6c8b3ddf24dc03234e248 (diff)
downloadninja-ec3d07c2fea4e79c68606234074f43d694982e5b.tar.gz
Merge branch 'refs/heads/FileIO-jose' into FileIO
Conflicts: js/document/html-document.js js/helper-classes/3D/snap-manager.js Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'assets/shaders/Flag.vert.glsl')
-rw-r--r--assets/shaders/Flag.vert.glsl35
1 files changed, 35 insertions, 0 deletions
diff --git a/assets/shaders/Flag.vert.glsl b/assets/shaders/Flag.vert.glsl
new file mode 100644
index 00000000..7dc932a7
--- /dev/null
+++ b/assets/shaders/Flag.vert.glsl
@@ -0,0 +1,35 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7
8#ifdef GL_ES
9precision highp float;
10#endif
11
12
13// attributes
14attribute vec3 a_pos;
15attribute vec2 texcoord;
16
17// scalar uniforms
18uniform float u_time;
19
20// matrix uniforms
21uniform mat4 u_mvMatrix;
22uniform mat4 u_projMatrix;
23uniform mat4 u_worldMatrix;
24
25void main()
26{
27 float angle = (u_time%360)*2;
28
29 a_pos.z = sin( a_pos.x + angle);
30 a_pos.z += sin( a_pos.y/2 + angle);
31 a_pos.z *= a_pos.x * 0.09;
32 gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0) ;
33
34 gl_FragColor = v_color;
35}