r.AutoExposure.IgnoreMaterials.Debug

r.AutoExposure.IgnoreMaterials.Debug

#Overview

name: r.AutoExposure.IgnoreMaterials.Debug

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of r.AutoExposure.IgnoreMaterials.Debug is to provide a debug option for the auto-exposure system in Unreal Engine’s rendering pipeline. It is specifically related to the handling of materials in the auto-exposure calculation process.

This setting variable is primarily used in the Renderer module of Unreal Engine, specifically within the post-processing system for eye adaptation (auto-exposure).

The value of this variable is set through a console variable (CVar) system. It is initialized as a boolean value, defaulting to false, and can be changed at runtime.

The associated variable CVarAutoExposureIgnoreMaterialsDebug directly interacts with r.AutoExposure.IgnoreMaterials.Debug. They share the same value and purpose.

Developers should be aware that this is a debug-only variable, as indicated by its name. It should not be relied upon for regular gameplay or production builds. Its primary use is for debugging and testing the auto-exposure system’s interaction with materials.

Best practices when using this variable include:

  1. Only enable it when specifically debugging auto-exposure issues related to materials.
  2. Remember to disable it after debugging to ensure normal rendering behavior.
  3. Use it in conjunction with other auto-exposure debugging tools for comprehensive analysis.

Regarding the associated variable CVarAutoExposureIgnoreMaterialsDebug:

The purpose of CVarAutoExposureIgnoreMaterialsDebug is to act as the internal representation of the r.AutoExposure.IgnoreMaterials.Debug console variable within the engine’s C++ code.

It is used in the Renderer module, specifically in the post-processing eye adaptation system.

The value is set when the console variable is initialized or changed through the console.

It directly interacts with the r.AutoExposure.IgnoreMaterials.Debug console variable, effectively serving as its C++ counterpart.

Developers should be aware that this variable is used to control a permutation in the auto-exposure shader compilation process. It affects how the engine builds shader permutations for auto-exposure calculations.

Best practices for using this variable include:

  1. Avoid directly modifying this variable in C++ code; instead, use the console variable system to change its value.
  2. Be cautious when changing its value, as it can impact shader compilation and rendering performance.
  3. Use it primarily for debugging purposes and not as a gameplay feature.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessEyeAdaptation.cpp:123

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:


	TAutoConsoleVariable<bool> CVarAutoExposureIgnoreMaterialsDebug(
		TEXT("r.AutoExposure.IgnoreMaterials.Debug"),
		false,
		TEXT(""),
		ECVF_RenderThreadSafe);
}

namespace AutoExposurePermutation

#Associated Variable and Callsites

This variable is associated with another variable named CVarAutoExposureIgnoreMaterialsDebug. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessEyeAdaptation.cpp:122

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:

		ECVF_Scalability | ECVF_RenderThreadSafe);

	TAutoConsoleVariable<bool> CVarAutoExposureIgnoreMaterialsDebug(
		TEXT("r.AutoExposure.IgnoreMaterials.Debug"),
		false,
		TEXT(""),
		ECVF_RenderThreadSafe);
}

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessEyeAdaptation.cpp:157

Scope (from outer to inner):

file
namespace    AutoExposurePermutation
function     FCommonDomain BuildCommonPermutationDomain

Source code excerpt:

		}

		PermutationVector.Set<FUseDebugOutputDim>(CVarAutoExposureIgnoreMaterialsDebug.GetValueOnRenderThread());

		return PermutationVector;
	}
} // namespace TonemapperPermutation

// Basic eye adaptation is supported everywhere except mobile when MobileHDR is disabled