istereo
diff sdr/test.v.glsl @ 24:70309d71c899
added the texture translation
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Thu, 08 Sep 2011 03:06:46 +0300 |
parents | 889dade25667 |
children |
line diff
1.1 --- a/sdr/test.v.glsl Thu Sep 08 02:57:29 2011 +0300 1.2 +++ b/sdr/test.v.glsl Thu Sep 08 03:06:46 2011 +0300 1.3 @@ -1,4 +1,4 @@ 1.4 -uniform mat4 matrix_modelview, matrix_projection; 1.5 +uniform mat4 matrix_modelview, matrix_projection, matrix_texture; 1.6 1.7 attribute vec4 attr_vertex, attr_color; 1.8 attribute vec2 attr_texcoord; 1.9 @@ -13,5 +13,5 @@ 1.10 gl_Position = mvp * attr_vertex; 1.11 vpos = (matrix_modelview * attr_vertex).xyz; 1.12 var_color = attr_color; 1.13 - var_texcoord = attr_texcoord; 1.14 + var_texcoord = (matrix_texture * vec4(attr_texcoord, 0.0, 1.0)).xy; 1.15 }