Can someone please supply me with a fragment shader sample that applies a 3D sampler texture lut to be used as a lookup table to be applied to a 2D texture image for the purpose of color correction?
Also, is there any sample code that shows how the red, green and blue input/output values are arranged in the separate ranks of the 3d texture?
Thanks much, Rennie.
I don’t get your question. To fetch a texel from a 3D texture, use texture3D() function. The rest is a no-brainer. And what do you mean by “separate ranks of the texture”?
He/She means rows and columns.
Rennie, check out GPU Gems 2. It may be online by now. There’s a discussion of this technique. In short, RGB of your fragColor needs to map to xyz of your texture. It’s best to use a float or half float texture with Linear filtering enabled and as small as you can manage.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.