View Full Version : glColorTable
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, 04: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.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.