volmetrics
view data/shaders/vol.v.glsl @ 33:3e4eb9a0d999
fixed t1, t2 selection with the mouse
author | Eleni Maria Stea <elene.mst@gmail.com> |
---|---|
date | Sun, 17 Aug 2014 02:25:01 +0300 |
parents | |
children |
line source
1 #version 120
3 varying vec3 pt;
5 void main()
6 {
7 mat4 mvbb = gl_ModelViewMatrix;
9 mvbb[0][0] = mvbb[1][1] = mvbb[2][2] = 1.0;
10 mvbb[0][1] = mvbb[0][2] = mvbb[1][2] = 0.0;
11 mvbb[1][0] = mvbb[2][0] = mvbb[2][1] = 0.0;
13 gl_Position = gl_ProjectionMatrix * mvbb * gl_Vertex;
15 pt = (transpose(gl_NormalMatrix) * gl_Vertex.xyz) * 0.5 + 0.5;
16 }