qvolray

view sdr/slice.p.glsl @ 20:68c6eb619d1c

normals from gradient map
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 11 Apr 2012 06:43:34 +0300
parents a6765984e057
children 4c62be57fc1a
line source
1 uniform sampler3D volume;
2 uniform sampler1D xfer_tex;
4 void main()
5 {
6 vec3 val = texture3D(volume, gl_TexCoord[0].xyz).xyz * 0.5 + 0.5;
7 //gl_FragColor = vec4(texture1D(xfer_tex, val).xxx, 1.0);
8 gl_FragColor = vec4(val, 1.0);
9 }