I found that Battlefield 3 as well as Saint's Row the Third use this texture in their final tone-mapping stage. Can anyone share a link to an article about how this texture is used?

BF3 tone-mapping texture

UPDATE: As there are hardly any examples of Color Grading implementation on the net, I will post my quick and dirty sample for XNA 4.0. This does nothing but builds the default 2d colormap from scratch on GPU, copies it's contents into a 3d texture on CPU and performs the actual color-correction with the shader code from the article provided in the answer.

XNA 4.0 Color Correction Sample

If you want to know what you can do with this, look here:


In short the author explains there, how you can basically make a screenshot of your normal in-game image with the default color grading palette on top, perform screenshot color correction in photoshop, cut and copy the deformed color correction palette into the engine and have that color correction applied for every in-game scene automatically.


1 Answer 1


This looks like the bottom layer of a volume texture that many games these days use to perform color correction. The idea is that the final RGB screen color, after rendering and tonemapping, is used as a texture coordinate to index into this texture, and the color found in the texture replaces the original color.

This allows artists to arbitrarily modify the colors of the scene, by loading a volume texture that represents the desired modifications. The "identity" texture - which results in no modification of the color at all - consists of a texture which has a red gradient along the X axis, a green gradient along the Y axis, and a blue gradient along the Z axis (i.e. the volume texture depth axis). The first layer (Z = 0) would therefore look like the texture you posted.

GPU Gems 2 describes the technique in more detail.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .