istereo

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