I'm trying to implement color correction with the 3d lookup table. The lookup table is actually just a 2d texture 256x16 and consists of 16 squares which one is 16x16.
When it comes to rendering, I pass 2 textures to shader: first one is whatever I rendered on the screen and the second is a lookup table. Shader takes RGB components of the rendered image, and uses it to find a replacement in a lookup table.
And there is two problems: first, I can't use filter to smooth colors (16 for each dimension is not enough) because it also smoothes the line between two contiguous 16x16 squares and that's inappropriate; second problem is no interpolation for a B-component.
Using a volume texture could solve both problems, but, unfortunately I'm short on time and there are not so many information about using 3d-textures in shaders. So, here's my questions.
- Is it possible to pass a 3d-texture to shader (HLSL)?
- If it is possible, could the filter be applied to the 3d dimension?
- Maybe there is a better way to implement color-grading that I don't know?