istereo
diff sdr/tunnel.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 | 8dd271942543 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/sdr/tunnel.v.glsl Thu Sep 08 08:31:15 2011 +0300 1.3 @@ -0,0 +1,27 @@ 1.4 +attribute vec4 attr_vertex, attr_color, attr_texcoord; 1.5 +attribute vec4 attr_tangent; 1.6 +attribute vec3 attr_normal; 1.7 + 1.8 +uniform mat4 matrix_modelview, matrix_projection, matrix_texture; 1.9 +uniform mat3 normmat; 1.10 +uniform float t; 1.11 +uniform vec4 light_pos; 1.12 + 1.13 +varying vec3 vpos, normal, tangent; 1.14 +varying vec4 tc; 1.15 +varying vec3 lpos; 1.16 + 1.17 +void main() 1.18 +{ 1.19 + mat4 mvp = matrix_projection * matrix_modelview; 1.20 + gl_Position = mvp * attr_vertex; 1.21 + 1.22 + vpos = (matrix_modelview * attr_vertex).xyz; 1.23 + 1.24 + normal = normmat * attr_normal; 1.25 + tangent = normmat * attr_tangent.xyz; 1.26 + 1.27 + lpos = (matrix_modelview * light_pos).xyz; 1.28 + 1.29 + tc = matrix_texture * attr_texcoord; 1.30 +}