aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders/Taper.vert.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'assets/shaders/Taper.vert.glsl')
-rw-r--r--assets/shaders/Taper.vert.glsl61
1 files changed, 0 insertions, 61 deletions
diff --git a/assets/shaders/Taper.vert.glsl b/assets/shaders/Taper.vert.glsl
deleted file mode 100644
index 46f04fb3..00000000
--- a/assets/shaders/Taper.vert.glsl
+++ /dev/null
@@ -1,61 +0,0 @@
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 vert;
15attribute vec3 normal;
16attribute vec2 texcoord;
17
18// scalar uniforms
19uniform float u_limit1;
20uniform float u_limit2;
21uniform float u_limit3;
22uniform float u_taperAmount;
23
24uniform vec4 color;
25
26
27// matrix uniforms
28uniform mat4 u_mvMatrix;
29uniform mat4 u_projMatrix;
30uniform mat4 u_worldMatrix;
31
32varying vec4 v_color;
33
34
35void main(void)
36{
37 vec3 pos = vert;
38 vec2 uv = texcoord;
39
40 v_color = vec4(0, 1, 0, 1);
41 if (uv.x > u_limit1)
42 {
43 if (uv.x < u_limit2)
44 {
45 float t = (uv.x - u_limit1)/(u_limit2 - u_limit1);
46 pos.y = pos.y - t*u_taperAmount;
47 v_color = vec4( 1, 1, 0, 1 );
48 }
49 else if (uv.x < u_limit3)
50 {
51 float t = 1.0 - (uv.x - u_limit2)/(u_limit3 - u_limit2);
52 pos.y = pos.y - t*u_taperAmount;
53 v_color = vec4( 0, 1, 1, 1 );
54 }
55 else
56 v_color = vec4(0,0,1,1);
57 }
58
59
60 gl_Position = u_projMatrix * u_mvMatrix * vec4(pos,1.0) ;
61} \ No newline at end of file