istereo
annotate sdr/tunnel.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 | fb4c9641059f |
children |
rev | line source |
---|---|
nuclear@30 | 1 attribute vec4 attr_vertex, attr_color; |
nuclear@30 | 2 attribute vec2 attr_texcoord; |
nuclear@29 | 3 attribute vec4 attr_tangent; |
nuclear@29 | 4 attribute vec3 attr_normal; |
nuclear@29 | 5 |
nuclear@29 | 6 uniform mat4 matrix_modelview, matrix_projection, matrix_texture; |
nuclear@30 | 7 uniform mat3 matrix_normal; |
nuclear@29 | 8 uniform float t; |
nuclear@29 | 9 uniform vec4 light_pos; |
nuclear@29 | 10 |
nuclear@29 | 11 varying vec3 vpos, normal, tangent; |
nuclear@29 | 12 varying vec4 tc; |
nuclear@29 | 13 varying vec3 lpos; |
nuclear@29 | 14 |
nuclear@29 | 15 void main() |
nuclear@29 | 16 { |
nuclear@29 | 17 mat4 mvp = matrix_projection * matrix_modelview; |
nuclear@29 | 18 gl_Position = mvp * attr_vertex; |
nuclear@29 | 19 |
nuclear@29 | 20 vpos = (matrix_modelview * attr_vertex).xyz; |
nuclear@29 | 21 |
nuclear@30 | 22 normal = matrix_normal * attr_normal; |
nuclear@30 | 23 tangent = matrix_normal * attr_tangent.xyz; |
nuclear@29 | 24 |
nuclear@29 | 25 lpos = (matrix_modelview * light_pos).xyz; |
nuclear@29 | 26 |
nuclear@30 | 27 tc = matrix_texture * vec4(attr_texcoord, 0.0, 1.0); |
nuclear@29 | 28 } |