aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders
diff options
context:
space:
mode:
authorhwc4872012-05-08 16:14:28 -0700
committerhwc4872012-05-08 16:14:28 -0700
commit24417212f9fad7e992697e9370047fcf2f037913 (patch)
tree249ef89e903e0bc0cf32b237521ee4b0439b9280 /assets/shaders
parent7af54816bb6311421f976661d07b7776d5cd37c9 (diff)
downloadninja-24417212f9fad7e992697e9370047fcf2f037913.tar.gz
WebGL linear gradients to match CSS
Diffstat (limited to 'assets/shaders')
-rwxr-xr-xassets/shaders/linearGradient.vert.glsl5
1 files changed, 4 insertions, 1 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}