istereo

view sdr/tunnel.v.glsl @ 30:8dd271942543

fixed everything
author John Tsiombikas <nuclear@mutantstargoat.com>
date Thu, 08 Sep 2011 14:52:13 +0300
parents fb4c9641059f
children
line source
1 attribute vec4 attr_vertex, attr_color;
2 attribute vec2 attr_texcoord;
3 attribute vec4 attr_tangent;
4 attribute vec3 attr_normal;
6 uniform mat4 matrix_modelview, matrix_projection, matrix_texture;
7 uniform mat3 matrix_normal;
8 uniform float t;
9 uniform vec4 light_pos;
11 varying vec3 vpos, normal, tangent;
12 varying vec4 tc;
13 varying vec3 lpos;
15 void main()
16 {
17 mat4 mvp = matrix_projection * matrix_modelview;
18 gl_Position = mvp * attr_vertex;
20 vpos = (matrix_modelview * attr_vertex).xyz;
22 normal = matrix_normal * attr_normal;
23 tangent = matrix_normal * attr_tangent.xyz;
25 lpos = (matrix_modelview * light_pos).xyz;
27 tc = matrix_texture * vec4(attr_texcoord, 0.0, 1.0);
28 }