istereo
diff sdr/text.v.glsl @ 29:fb4c9641059f
added more forgotten files
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Thu, 08 Sep 2011 08:31:15 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/sdr/text.v.glsl Thu Sep 08 08:31:15 2011 +0300 1.3 @@ -0,0 +1,21 @@ 1.4 +attribute vec4 attr_vertex, attr_texcoord, attr_color; 1.5 + 1.6 +uniform mat4 matrix_modelview, matrix_projection; 1.7 +uniform float idx; 1.8 + 1.9 +varying vec4 color; 1.10 +varying vec3 vpos; 1.11 +varying vec2 tc; 1.12 + 1.13 +void main() 1.14 +{ 1.15 + mat4 mvp = matrix_projection * matrix_modelview; 1.16 + gl_Position = mvp * attr_vertex; 1.17 + 1.18 + vpos = (matrix_modelview * attr_vertex).xyz; 1.19 + 1.20 + float sz = 1.0 / 17.0; 1.21 + tc = vec2(attr_texcoord.x, (attr_texcoord.y + idx) * sz); 1.22 + 1.23 + color = attr_color; 1.24 +}