istereo
diff 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 diff
1.1 --- a/sdr/tunnel.v.glsl Thu Sep 08 08:31:15 2011 +0300 1.2 +++ b/sdr/tunnel.v.glsl Thu Sep 08 14:52:13 2011 +0300 1.3 @@ -1,9 +1,10 @@ 1.4 -attribute vec4 attr_vertex, attr_color, attr_texcoord; 1.5 +attribute vec4 attr_vertex, attr_color; 1.6 +attribute vec2 attr_texcoord; 1.7 attribute vec4 attr_tangent; 1.8 attribute vec3 attr_normal; 1.9 1.10 uniform mat4 matrix_modelview, matrix_projection, matrix_texture; 1.11 -uniform mat3 normmat; 1.12 +uniform mat3 matrix_normal; 1.13 uniform float t; 1.14 uniform vec4 light_pos; 1.15 1.16 @@ -18,10 +19,10 @@ 1.17 1.18 vpos = (matrix_modelview * attr_vertex).xyz; 1.19 1.20 - normal = normmat * attr_normal; 1.21 - tangent = normmat * attr_tangent.xyz; 1.22 + normal = matrix_normal * attr_normal; 1.23 + tangent = matrix_normal * attr_tangent.xyz; 1.24 1.25 lpos = (matrix_modelview * light_pos).xyz; 1.26 1.27 - tc = matrix_texture * attr_texcoord; 1.28 + tc = matrix_texture * vec4(attr_texcoord, 0.0, 1.0); 1.29 }