openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openexr-devel] OT: examples on doing simple 1D LUTs with Cg?


From: Paul Miller
Subject: [Openexr-devel] OT: examples on doing simple 1D LUTs with Cg?
Date: Fri, 24 Jun 2005 10:44:44 -0500
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Hey guys. I have code to read in a text file of float values (256 right now) and stuff them into a 256x1 RGB texture, with component values in the range of 0-255.

I'm using the Cg Toolkit to specify the value of my sampler1D uniform to the texture ID of the LUT texture.

Now I'm a bit hazy on how to access the texture for each channel in my display shader. But all I get is black output.

Either I'm setting up the sampler uniform improperly, or accessing the 1D texels wrong in the shader.

Does anyone have some pointers to the proper way to do simple 1D LUTs using Cg? I'm not even sure of the correct way to make sure the LUT texture is sampled using bilinear interpolation.

Thanks for any tips!

--
Paul Miller | address@hidden | www.fxtech.com | Got Tivo?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]