glviewvol

diff 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 diff
     1.1 --- a/sdr/fast.v.glsl	Tue Dec 30 17:28:38 2014 +0200
     1.2 +++ b/sdr/fast.v.glsl	Tue Dec 30 20:03:32 2014 +0200
     1.3 @@ -1,5 +1,10 @@
     1.4  void main()
     1.5  {
     1.6 -	gl_Position = ftransform();
     1.7 -	gl_TexCoord[0] = gl_MultiTexCoord0;
     1.8 +	mat4 mvmat = gl_ModelViewMatrix;
     1.9 +	mvmat[0][0] = mvmat[1][1] = mvmat[2][2] = 1.0;
    1.10 +	mvmat[0][1] = mvmat[0][2] = mvmat[1][2] = mvmat[1][0] = mvmat[2][0] = mvmat[2][1] = 0.0;
    1.11 +
    1.12 +	vec4 vertex = gl_Vertex;
    1.13 +	gl_Position = gl_ProjectionMatrix * mvmat * vertex;
    1.14 +	gl_TexCoord[0].xyz = gl_NormalMatrix * (vertex.xyz * vec3(1.0, 1.0, -1.0) * 1.732051) * 0.5 + 0.5;
    1.15  }