ShaderFX Textures and Gamma Correction

Convert a map to linear space

If the target engine is linear, then RGB textures should be gamma-corrected. To convert a texture map to linear space, select the Texture Map node, and enable ConvertToLinearSpace in the Attribute Editor.

Select Settings > Toggle Advanced Mode from the ShaderFX menu bar to enable advanced mode. Click the Group icon on the Texture Map node to visualize the group network. In the group network view, locate the ToLinearSpace group. Click its Group icon to expand the network and edit it to suit your needs.

Note: If you de-gamma color textures with ConvertToLinearSpace, then you should also enable gamma on the Material node.

Gamma Correction at the end of the shader

If you de-gamma color textures with ConvertToLinearSpace, then you should also enable gamma on the Material node. You can re-apply gamma correction at the end of the shader as follows:

  1. Select Settings > Toggle Advanced Mode from the ShaderFX menu bar to enable advanced mode.
  2. Select Graph Nodes > Values > Bool Value to create a Bool Value node.
  3. Connect the bool attribute of Bool Value to the Gamma attribute of the Material node.

    Gamma correction is applied when the Value of Bool Value is set to true.

    For more information regarding Graph Nodes, see Adding switches using Advanced Mode Graph Nodes.

Note: You can also enable gamma correction in Viewport 2.0 by going into the Render Settings window, then selecting Enable under Gamma Correction.