PDA

View Full Version : lookup tables



guyinhell
01-24-2005, 05:46 AM
hi everybody:
it would be appreciated if you can answer my question.
i would like to do some image processing. but i need it to be excecuted on GPU. is it possible that i store a lookup table on the graphic card memory?
thanx
alex

mogumbo
01-24-2005, 12:03 PM
Lookup tables are generally stored as textures. Read any introductory book on shaders and it should become clear how this is done. Just map any variable to the range {0.0, 1.0} and look it up in a 1D texture. Or you can use 2D and 3D textures for more complicated lookups.

guyinhell
01-25-2005, 12:01 AM
hi: thanx a lot. i download the specification of the shading language. however there is no example inside. would you pls tell me where i can see some examples? thank you:)

shortstuff
01-26-2005, 01:03 PM
Originally posted by guyinhell:
hi: thanx a lot. i download the specification of the shading language. however there is no example inside. would you pls tell me where i can see some examples? thank you:)Hello,

I would also be interested in any examples that show you how to load a texture to the graphics card's memory and use it as a lookup table for your coloring scheme.

I have been working with Nvidia's new Cg programming language for GPUs and would like to be able to have either the vertex processor or fragment processor on the graphics card do the color lookups.

Thanks,

guyinhell
01-26-2005, 10:25 PM
hello:
actually i just found out that shader is not supported by the graphics card i am using now. i am trying to implement a lookup table with the texture shader extension(dependent texture). there is a program called DEPENDENT_GB_TEXTURE_2D_NV.
cheers