ShaderFX Textures and Gamma Correction

By default, ShaderFX texture nodes do not include color management. This differs from texture handling elsewhere in the 3ds Max interface.

The reason is that for game and real-time texturing, many textures should not be gamma-corrected. In particular, normal maps, displacement maps, density maps, and ambient-occlusion (AO) maps do not work correctly when gamma-corrected.

For textures that provide RGB colors, whether you need gamma correction depends on the target. Some game engines use linear color space; others do not. If the target engine is linear, then RGB textures should be gamma-corrected, except for linear formats such as EXR or CIN. RGB textures to be rendered should also be gamma-corrected, again excepting linear or high dynamic formats.

To gamma-correct an RGB texture, do one of the following:

Important: Use one of these methods, but not both. Adjusting gamma twice will give erroneous results.

Use the Material Node for Gamma Correction

The default Material node has a Gamma socket that globally sets gamma correction for the shader tree.

To set gamma correction for the shader tree output:

  1. Right-click and from the menu, choose Tools Toggle Advanced Mode to make sure advanced mode is on.
  2. Right-click again and choose Graph Nodes Values Bool Value.
  3. Wire the BoolValue node's Bool socket to the Material node's Gamma socket.

    While the Value of BoolValue is on (true), the shader tree is gamma corrected.

  4. Important: If you turn on ConvertToLinearSpace for one or more TextureMap nodes, or enable gamma correction via the 3ds Max file dialog, then you should enable Gamma on the Material node.

    Alternatively, instead of enabling gamma for the Material node, you can use the Display gamma controls to re-apply gamma correction.