lookup tables

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

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.

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:)

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,

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