View Full Version : glColorTable

05-24-2006, 09:09 PM
I want to use glColorTable() for Volume rendering.
I created a color table with this function, but how can I use the table I created.

05-29-2006, 03:41 AM
Color tables are not accessible inside shaders.
The fragment shaders come AFTER the lookup.

Lookup tables for volume rendering are normally done with a dependent 1D texture lookup instead, like this:

float value = texture3D(volume, texcoord.xyz).r;
float4 color = texture1D(lookup, value);

Put your color table into the 1D texture.