istereo
annotate sdr/text.v.glsl @ 36:834503dcb486
fixed the rotated gui problem
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 09 Sep 2011 10:25:03 +0300 |
parents | |
children |
rev | line source |
---|---|
nuclear@29 | 1 attribute vec4 attr_vertex, attr_texcoord, attr_color; |
nuclear@29 | 2 |
nuclear@29 | 3 uniform mat4 matrix_modelview, matrix_projection; |
nuclear@29 | 4 uniform float idx; |
nuclear@29 | 5 |
nuclear@29 | 6 varying vec4 color; |
nuclear@29 | 7 varying vec3 vpos; |
nuclear@29 | 8 varying vec2 tc; |
nuclear@29 | 9 |
nuclear@29 | 10 void main() |
nuclear@29 | 11 { |
nuclear@29 | 12 mat4 mvp = matrix_projection * matrix_modelview; |
nuclear@29 | 13 gl_Position = mvp * attr_vertex; |
nuclear@29 | 14 |
nuclear@29 | 15 vpos = (matrix_modelview * attr_vertex).xyz; |
nuclear@29 | 16 |
nuclear@29 | 17 float sz = 1.0 / 17.0; |
nuclear@29 | 18 tc = vec2(attr_texcoord.x, (attr_texcoord.y + idx) * sz); |
nuclear@29 | 19 |
nuclear@29 | 20 color = attr_color; |
nuclear@29 | 21 } |