istereo2

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/sdr/tunnel.v.glsl	Sat Sep 19 05:51:51 2015 +0300
     1.3 @@ -0,0 +1,28 @@
     1.4 +attribute vec4 attr_vertex, attr_color;
     1.5 +attribute vec2 attr_texcoord;
     1.6 +attribute vec4 attr_tangent;
     1.7 +attribute vec3 attr_normal;
     1.8 +
     1.9 +uniform mat4 matrix_modelview, matrix_projection, matrix_texture;
    1.10 +uniform mat3 matrix_normal;
    1.11 +uniform float t;
    1.12 +uniform vec4 light_pos;
    1.13 +
    1.14 +varying vec3 vpos, normal, tangent;
    1.15 +varying vec4 tc;
    1.16 +varying vec3 lpos;
    1.17 +
    1.18 +void main()
    1.19 +{
    1.20 +	mat4 mvp = matrix_projection * matrix_modelview;
    1.21 +	gl_Position = mvp * attr_vertex;
    1.22 +
    1.23 +	vpos = (matrix_modelview * attr_vertex).xyz;
    1.24 +
    1.25 +	normal = matrix_normal * attr_normal;
    1.26 +	tangent = matrix_normal * attr_tangent.xyz;
    1.27 +
    1.28 +	lpos = (matrix_modelview * light_pos).xyz;
    1.29 +
    1.30 +	tc = matrix_texture * vec4(attr_texcoord, 0.0, 1.0);
    1.31 +}