r.AutoExposure.IgnoreMaterials.EvaluationPositionBias

r.AutoExposure.IgnoreMaterials.EvaluationPositionBias

#Overview

name: r.AutoExposure.IgnoreMaterials.EvaluationPositionBias

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.EvaluationPositionBias is to provide a bias for the evaluation position when ignoring materials in the auto-exposure calculation within Unreal Engine’s rendering system.

This setting variable is primarily used in the rendering subsystem of Unreal Engine, specifically in the post-processing module related to eye adaptation and auto-exposure.

The value of this variable is set through a console variable (CVar) named CVarAutoExposureIgnoreMaterialsEvaluationPositionBias. It is initialized with a default value of 10.0f and can be modified at runtime.

The associated variable CVarAutoExposureIgnoreMaterialsEvaluationPositionBias interacts directly with r.AutoExposure.IgnoreMaterials.EvaluationPositionBias, as they share the same value. This variable is used to retrieve the current value of the setting in the rendering thread.

Developers must be aware that this variable affects the auto-exposure calculation, particularly when ignoring certain materials. It provides a bias to the evaluation position, which can influence how the engine determines the overall scene exposure.

Best practices when using this variable include:

  1. Carefully adjusting the value to achieve the desired auto-exposure effect.
  2. Testing the impact of different values in various lighting conditions and scenes.
  3. Considering the interaction with other auto-exposure and eye adaptation settings.
  4. Using it in conjunction with other related settings like r.AutoExposure.IgnoreMaterials.LuminanceScale for fine-tuned control.

Regarding the associated variable CVarAutoExposureIgnoreMaterialsEvaluationPositionBias:

This is a TAutoConsoleVariable that directly corresponds to the r.AutoExposure.IgnoreMaterials.EvaluationPositionBias setting. It is used internally by the engine to access and modify the setting value.

The purpose of this variable is to provide a programmatic interface for the engine to interact with the r.AutoExposure.IgnoreMaterials.EvaluationPositionBias setting.

It is primarily used in the rendering subsystem, specifically in the eye adaptation and auto-exposure calculations.

The value of this variable is set when the engine initializes the console variables, and it can be modified at runtime through console commands or programmatically.

This variable interacts directly with the r.AutoExposure.IgnoreMaterials.EvaluationPositionBias setting, as they represent the same value.

Developers should be aware that modifying this variable will directly affect the auto-exposure calculation in the rendering pipeline.

Best practices for using this variable include:

  1. Accessing its value using GetValueOnRenderThread() when used in render thread operations.
  2. Considering thread safety when modifying or accessing the variable.
  3. Using it in conjunction with other related auto-exposure variables for comprehensive control over the exposure calculation.

#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:93

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:


	TAutoConsoleVariable<float> CVarAutoExposureIgnoreMaterialsEvaluationPositionBias(
		TEXT("r.AutoExposure.IgnoreMaterials.EvaluationPositionBias"),
		10.0f,
		TEXT(""),
		ECVF_RenderThreadSafe);

	TAutoConsoleVariable<float> CVarAutoExposureIgnoreMaterialsLuminanceScale(
		TEXT("r.AutoExposure.IgnoreMaterials.LuminanceScale"),

#Associated Variable and Callsites

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

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

Scope (from outer to inner):

file
namespace    anonymous

Source code excerpt:

		ECVF_RenderThreadSafe);

	TAutoConsoleVariable<float> CVarAutoExposureIgnoreMaterialsEvaluationPositionBias(
		TEXT("r.AutoExposure.IgnoreMaterials.EvaluationPositionBias"),
		10.0f,
		TEXT(""),
		ECVF_RenderThreadSafe);

	TAutoConsoleVariable<float> CVarAutoExposureIgnoreMaterialsLuminanceScale(

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

Scope (from outer to inner):

file
function     FEyeAdaptationParameters GetEyeAdaptationParameters

Source code excerpt:

	Parameters.StartDistance = StartDistance;
	Parameters.LuminanceMax = LuminanceMax;
	Parameters.IgnoreMaterialsEvaluationPositionBias = CVarAutoExposureIgnoreMaterialsEvaluationPositionBias.GetValueOnRenderThread();
	Parameters.IgnoreMaterialsLuminanceScale = CVarAutoExposureIgnoreMaterialsLuminanceScale.GetValueOnRenderThread();
	Parameters.IgnoreMaterialsMinBaseColorLuminance = CVarAutoExposureIgnoreMaterialsMinBaseColorLuminance.GetValueOnRenderThread();
	Parameters.IgnoreMaterialsReconstructFromSceneColor = CVarAutoExposureIgnoreMaterialsReconstructFromSceneColor.GetValueOnRenderThread();
	Parameters.ForceTarget = ForceTarget;
	Parameters.VisualizeDebugType = CVarEyeAdaptationVisualizeDebugType.GetValueOnRenderThread();
	Parameters.MeterMaskTexture = MeterMask;