istereo2

view sdr/tunnel.v.glsl @ 9:64e15874f3bd

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 26 Sep 2015 02:56:07 +0300
parents
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 }