source:
nanovis/tags/1.1.2/shaders/cutplane_fp.cg
@
4809
Last change on this file since 4809 was 3362, checked in by ldelgass, 11 years ago | |
---|---|
File size: 432 bytes |
Line | |
---|---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
2 | |
3 | float4 main(in float4 texcoord : TEXCOORD0, |
4 | uniform sampler3D volume, |
5 | uniform sampler1D tf) : COLOR |
6 | { |
7 | float4 sample = tex3D(volume, texcoord.xyz); |
8 | |
9 | // sample the transfer function texture |
10 | float4 color = tex1D(tf, sample.x); |
11 | |
12 | // single slice render, only flat shading, completely opaque. |
13 | color.w = 1; |
14 | |
15 | return color; |
16 | } |
Note: See TracBrowser
for help on using the repository browser.