glviewvol

view sdr/fast.v.glsl @ 8:fb6d93471352

main thing done
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 30 Dec 2014 20:03:32 +0200
parents 04330eb80b36
children 89efc666105c
line source
1 void main()
2 {
3 mat4 mvmat = gl_ModelViewMatrix;
4 mvmat[0][0] = mvmat[1][1] = mvmat[2][2] = 1.0;
5 mvmat[0][1] = mvmat[0][2] = mvmat[1][2] = mvmat[1][0] = mvmat[2][0] = mvmat[2][1] = 0.0;
7 vec4 vertex = gl_Vertex;
8 gl_Position = gl_ProjectionMatrix * mvmat * vertex;
9 gl_TexCoord[0].xyz = gl_NormalMatrix * (vertex.xyz * vec3(1.0, 1.0, -1.0) * 1.732051) * 0.5 + 0.5;
10 }