From 91a9e02bff0397ec9b1f55fdf61cef72eb0d8a0f Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 8 May 2012 15:53:35 -0700 Subject: Radial gradients to match CSS --- assets/shaders/radialGradient.vert.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'assets/shaders') 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; // matrix uniforms uniform mat4 u_mvMatrix; uniform mat4 u_projMatrix; +uniform mat3 u_texTransform; varying vec2 v_uv; void main(void) { gl_Position = u_projMatrix * u_mvMatrix * vec4(vert,1.0) ; - v_uv = texcoord; + vec3 tmp = u_texTransform * vec3( texcoord, 1.0); + v_uv = tmp.xy; } \ No newline at end of file -- cgit v1.2.3