PDA

View Full Version : Color Lookup Table via Dependent Textures



XaVinci
08-14-2002, 08:42 AM
Hi there,
I am writing a volume renderer and would like to use each of the volume's intensity value as an index to lookup into a 1D color table(each element is of type RGBA). As I m working on the GeForce3, I would like to achieve post-classification , so paletted textures (which does pre-classification) does not provide good enough quality.
I heard that the post-classification can be done through dependent textures. I have tried the following
1) tex 0 - bind 3d texture
2) tex 1 - bind 256x1 texture;, use AR dependency; previous input is tex 0.
but am getting the wrong results.
I think my mistake lies in not encoding the color table in a 2d texture such that the tex coord (A,R)from tex 0 would index nicely as it would in the 1D texture. So how can the 2d texture be properly encoded ?
I have read in the forum that GL_DOT_PRODUCT_TEXTURE_2D_NV is involved. If so, how it is used to solve my problem?
Thanks

XaVinci
08-14-2002, 09:57 AM
Please ignore my question.
I found out my mistake.
A stupid one.

Thanks