volmetrics

diff data/shaders/vol.v.glsl @ 25:4b6c952a83bd

works todo: 1- ta quads na nai to res tou volume * 2 2- conservative quad 3- to aspect ratio tou preview
author Eleni Maria Stea <elene.mst@gmail.com>
date Sun, 27 Apr 2014 18:13:44 +0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/shaders/vol.v.glsl	Sun Apr 27 18:13:44 2014 +0300
     1.3 @@ -0,0 +1,16 @@
     1.4 +#version 120
     1.5 +
     1.6 +varying vec3 pt;
     1.7 +
     1.8 +void main()
     1.9 +{
    1.10 +	mat4 mvbb = gl_ModelViewMatrix;
    1.11 +
    1.12 +	mvbb[0][0] = mvbb[1][1] = mvbb[2][2] = 1.0;
    1.13 +	mvbb[0][1] = mvbb[0][2] = mvbb[1][2] = 0.0;
    1.14 +	mvbb[1][0] = mvbb[2][0] = mvbb[2][1] = 0.0;
    1.15 +	
    1.16 +	gl_Position = gl_ProjectionMatrix * mvbb * gl_Vertex;
    1.17 +
    1.18 +	pt = (transpose(gl_NormalMatrix) * gl_Vertex.xyz) * 0.5 + 0.5;
    1.19 +}