istereo2

annotate sdr/tunnel.v.glsl @ 2:81d35769f546

added the tunnel effect source
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 19 Sep 2015 05:51:51 +0300
parents
children
rev   line source
nuclear@2 1 attribute vec4 attr_vertex, attr_color;
nuclear@2 2 attribute vec2 attr_texcoord;
nuclear@2 3 attribute vec4 attr_tangent;
nuclear@2 4 attribute vec3 attr_normal;
nuclear@2 5
nuclear@2 6 uniform mat4 matrix_modelview, matrix_projection, matrix_texture;
nuclear@2 7 uniform mat3 matrix_normal;
nuclear@2 8 uniform float t;
nuclear@2 9 uniform vec4 light_pos;
nuclear@2 10
nuclear@2 11 varying vec3 vpos, normal, tangent;
nuclear@2 12 varying vec4 tc;
nuclear@2 13 varying vec3 lpos;
nuclear@2 14
nuclear@2 15 void main()
nuclear@2 16 {
nuclear@2 17 mat4 mvp = matrix_projection * matrix_modelview;
nuclear@2 18 gl_Position = mvp * attr_vertex;
nuclear@2 19
nuclear@2 20 vpos = (matrix_modelview * attr_vertex).xyz;
nuclear@2 21
nuclear@2 22 normal = matrix_normal * attr_normal;
nuclear@2 23 tangent = matrix_normal * attr_tangent.xyz;
nuclear@2 24
nuclear@2 25 lpos = (matrix_modelview * light_pos).xyz;
nuclear@2 26
nuclear@2 27 tc = matrix_texture * vec4(attr_texcoord, 0.0, 1.0);
nuclear@2 28 }