aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders
diff options
context:
space:
mode:
authorPushkar Joshi2012-05-31 12:20:03 -0700
committerPushkar Joshi2012-05-31 12:20:03 -0700
commit4bc52365b1f81a386c3c59fd7c6ad874bb387cb5 (patch)
treec5b17297aba04bd54a59cf6214d29486e089031b /assets/shaders
parent75a862d305bc4502e22bc5aa65fa271143b8cf6c (diff)
parent6042bdc5f2aada4412912fd01602d32c9088dc26 (diff)
downloadninja-4bc52365b1f81a386c3c59fd7c6ad874bb387cb5.tar.gz
Merge branch 'master' into pentool
Diffstat (limited to 'assets/shaders')
-rwxr-xr-xassets/shaders/linearGradient.vert.glsl5
-rw-r--r--assets/shaders/radialGradient.vert.glsl4
2 files changed, 7 insertions, 2 deletions
diff --git a/assets/shaders/linearGradient.vert.glsl b/assets/shaders/linearGradient.vert.glsl
index aac9cbee..f0800812 100755
--- a/assets/shaders/linearGradient.vert.glsl
+++ b/assets/shaders/linearGradient.vert.glsl
@@ -37,6 +37,7 @@ uniform float u_colorStop3;
37uniform float u_colorStop4; 37uniform float u_colorStop4;
38uniform vec2 u_cos_sin_angle; 38uniform vec2 u_cos_sin_angle;
39//uniform int u_colorCount; // currently using 4 39//uniform int u_colorCount; // currently using 4
40uniform mat3 u_texTransform;
40 41
41varying vec2 v_uv; 42varying vec2 v_uv;
42 43
@@ -44,5 +45,7 @@ varying vec2 v_uv;
44void main(void) 45void main(void)
45{ 46{
46 gl_Position = u_projMatrix * u_mvMatrix * vec4(vert,1.0) ; 47 gl_Position = u_projMatrix * u_mvMatrix * vec4(vert,1.0) ;
47 v_uv = texcoord; 48 //v_uv = texcoord;
49 vec3 tmp = u_texTransform * vec3( texcoord, 1.0);
50 v_uv = tmp.xy;
48} 51}
diff --git a/assets/shaders/radialGradient.vert.glsl b/assets/shaders/radialGradient.vert.glsl
index c3e1b50a..7994ac12 100644
--- a/assets/shaders/radialGradient.vert.glsl
+++ b/assets/shaders/radialGradient.vert.glsl
@@ -18,11 +18,13 @@ attribute vec2 texcoord;
18// matrix uniforms 18// matrix uniforms
19uniform mat4 u_mvMatrix; 19uniform mat4 u_mvMatrix;
20uniform mat4 u_projMatrix; 20uniform mat4 u_projMatrix;
21uniform mat3 u_texTransform;
21 22
22varying vec2 v_uv; 23varying vec2 v_uv;
23 24
24void main(void) 25void main(void)
25{ 26{
26 gl_Position = u_projMatrix * u_mvMatrix * vec4(vert,1.0) ; 27 gl_Position = u_projMatrix * u_mvMatrix * vec4(vert,1.0) ;
27 v_uv = texcoord; 28 vec3 tmp = u_texTransform * vec3( texcoord, 1.0);
29 v_uv = tmp.xy;
28} \ No newline at end of file 30} \ No newline at end of file