qvolray
diff 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 diff
1.1 --- a/sdr/slice.p.glsl Sun Apr 08 14:31:03 2012 +0300 1.2 +++ b/sdr/slice.p.glsl Wed Apr 11 06:43:34 2012 +0300 1.3 @@ -3,6 +3,7 @@ 1.4 1.5 void main() 1.6 { 1.7 - float val = texture3D(volume, gl_TexCoord[0].xyz).a; 1.8 - gl_FragColor = vec4(texture1D(xfer_tex, val).xxx, 1.0); 1.9 + vec3 val = texture3D(volume, gl_TexCoord[0].xyz).xyz * 0.5 + 0.5; 1.10 + //gl_FragColor = vec4(texture1D(xfer_tex, val).xxx, 1.0); 1.11 + gl_FragColor = vec4(val, 1.0); 1.12 }