4
$\begingroup$

You can perform color conversion as a post process step to convert a rendered frame's colors to a different set of colors.

You might make darker colors more blue for instance, to give it a night time feel, or just modify colors to give it a different mood.

One way of doing this is using a volume texture. You use the RGB value of a source pixel as texture coordinates into a volume texture, where you read out the RGB value that you should replace that pixel with.

This page on the 4d texture GL extension says this though:

Four-dimensional textures are used primarily as color lookup tables for color conversion.

Can anyone explain why you would use a 4d texture lookup for color grading?

Alpha (transparency) lookup doesn't seem like a plausible explanation, but perhaps something like normalizing an HDR color and using the intensity as the fourth component could be? Or perhaps time, to be able to interpolate between two different color gradings, when moving from inside to outside and exposure is changing or something?

$\endgroup$
  • $\begingroup$ You're idea of using one dimension at time is a pretty good one! I like it! $\endgroup$ – user1118321 Dec 7 '16 at 17:08
4
$\begingroup$

Offset.

While any transform between two RGB colour spaces can be accomplished with a pure 3x3 matrix, some alternate transforms, such as to YCbCr with given weights, requires an offset.

$\endgroup$
7
$\begingroup$

I think your quote refers to conversion between color spaces, rather than color grading. 4d textures could be used as lookup tables to convert color spaces like CMYK to some other space. Since CMYK has 4 components, a 3d texture wouldn't be enough.

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.