volmetrics

annotate data/shaders/vol.v.glsl @ 30:e548d95e0667

fixed lighting, added parameter for volume rotation
author Eleni Maria Stea <elene.mst@gmail.com>
date Thu, 01 May 2014 15:28:51 +0300
parents
children
rev   line source
elene@25 1 #version 120
elene@25 2
elene@25 3 varying vec3 pt;
elene@25 4
elene@25 5 void main()
elene@25 6 {
elene@25 7 mat4 mvbb = gl_ModelViewMatrix;
elene@25 8
elene@25 9 mvbb[0][0] = mvbb[1][1] = mvbb[2][2] = 1.0;
elene@25 10 mvbb[0][1] = mvbb[0][2] = mvbb[1][2] = 0.0;
elene@25 11 mvbb[1][0] = mvbb[2][0] = mvbb[2][1] = 0.0;
elene@25 12
elene@25 13 gl_Position = gl_ProjectionMatrix * mvbb * gl_Vertex;
elene@25 14
elene@25 15 pt = (transpose(gl_NormalMatrix) * gl_Vertex.xyz) * 0.5 + 0.5;
elene@25 16 }