diff options
author | Jose Antonio Marquez | 2012-05-22 18:02:36 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-22 18:02:36 -0700 |
commit | 27e6e1238ec1adb34aa396074e2559801c7e4314 (patch) | |
tree | d27f27fd071d9df575c6014eed0efee252ff0390 /assets/shaders | |
parent | 75fe4f36a6768d688792bc1925cfa4bfa508ac3e (diff) | |
parent | a341522e3603c18ab3b93defa894e3be702dd0f4 (diff) | |
download | ninja-27e6e1238ec1adb34aa396074e2559801c7e4314.tar.gz |
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Diffstat (limited to 'assets/shaders')
-rwxr-xr-x | assets/shaders/linearGradient.vert.glsl | 5 | ||||
-rw-r--r-- | assets/shaders/radialGradient.vert.glsl | 4 |
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; | |||
37 | uniform float u_colorStop4; | 37 | uniform float u_colorStop4; |
38 | uniform vec2 u_cos_sin_angle; | 38 | uniform vec2 u_cos_sin_angle; |
39 | //uniform int u_colorCount; // currently using 4 | 39 | //uniform int u_colorCount; // currently using 4 |
40 | uniform mat3 u_texTransform; | ||
40 | 41 | ||
41 | varying vec2 v_uv; | 42 | varying vec2 v_uv; |
42 | 43 | ||
@@ -44,5 +45,7 @@ varying vec2 v_uv; | |||
44 | void main(void) | 45 | void 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 |
19 | uniform mat4 u_mvMatrix; | 19 | uniform mat4 u_mvMatrix; |
20 | uniform mat4 u_projMatrix; | 20 | uniform mat4 u_projMatrix; |
21 | uniform mat3 u_texTransform; | ||
21 | 22 | ||
22 | varying vec2 v_uv; | 23 | varying vec2 v_uv; |
23 | 24 | ||
24 | void main(void) | 25 | void 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 |