From 24417212f9fad7e992697e9370047fcf2f037913 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 8 May 2012 16:14:28 -0700 Subject: WebGL linear gradients to match CSS --- assets/shaders/linearGradient.vert.glsl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'assets/shaders') 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; uniform float u_colorStop4; uniform vec2 u_cos_sin_angle; //uniform int u_colorCount; // currently using 4 +uniform mat3 u_texTransform; varying vec2 v_uv; @@ -44,5 +45,7 @@ varying vec2 v_uv; void main(void) { gl_Position = u_projMatrix * u_mvMatrix * vec4(vert,1.0) ; - v_uv = texcoord; + //v_uv = texcoord; + vec3 tmp = u_texTransform * vec3( texcoord, 1.0); + v_uv = tmp.xy; } -- cgit v1.2.3