Color management with the DirectX 11 shader

If you enable Color Management (under the Color Management section of the Preferences window) and enable Linear Space Lighting in the dx11Shader using the Attribute Editor, gamma is only applied once and your shading renders correctly.

You can use the semantic MayaGammaCorrection to query if gamma is enabled in the viewport.

Note: Turtle renders everything in linear intensity space (not gamma corrected). This means Turtle assumes that all colors selected as inputs on Maya shaders are treated as linear, the same applies to all file textures. The output image produced by Turtle is also in linear space. If this is not desired Gamma Correction can be automatically applied to the input colors and textures, and to the output image.