istereo2
view sdr/text.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 source
1 attribute vec4 attr_vertex, attr_texcoord, attr_color;
3 uniform mat4 matrix_modelview, matrix_projection;
4 uniform float idx;
6 varying vec4 color;
7 varying vec3 vpos;
8 varying vec2 tc;
10 void main()
11 {
12 mat4 mvp = matrix_projection * matrix_modelview;
13 gl_Position = mvp * attr_vertex;
15 vpos = (matrix_modelview * attr_vertex).xyz;
17 float sz = 1.0 / 17.0;
18 tc = vec2(attr_texcoord.x, (attr_texcoord.y + idx) * sz);
20 color = attr_color;
21 }