glviewvol

view sdr/fast.v.glsl @ 10:89efc666105c

mostly done
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 31 Dec 2014 05:21:47 +0200
parents fb6d93471352
children
line source
1 uniform float zscale;
3 void main()
4 {
5 mat4 mvmat = gl_ModelViewMatrix;
6 mvmat[0][0] = mvmat[1][1] = mvmat[2][2] = 1.0;
7 mvmat[0][1] = mvmat[0][2] = mvmat[1][2] = mvmat[1][0] = mvmat[2][0] = mvmat[2][1] = 0.0;
9 vec4 vertex = gl_Vertex;
10 gl_Position = gl_ProjectionMatrix * mvmat * vertex;
11 gl_TexCoord[0].xyz = gl_NormalMatrix * (vertex.xyz * vec3(1.0, 1.0, -1.0) * 1.732051) * vec3(1.0, 1.0, zscale) * 0.5 + 0.5;
12 }