r.Lumen.IrradianceFieldGather.ProbeOcclusionViewBias
r.Lumen.IrradianceFieldGather.ProbeOcclusionViewBias
#Overview
name: r.Lumen.IrradianceFieldGather.ProbeOcclusionViewBias
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Bias along the view direction to reduce self-occlusion artifacts from Probe Occlusion
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.IrradianceFieldGather.ProbeOcclusionViewBias is to control the bias along the view direction to reduce self-occlusion artifacts from Probe Occlusion in Lumen’s Irradiance Field Gather system.
This setting variable is primarily used in the rendering system, specifically within Lumen’s Irradiance Field Gather functionality. Based on the callsites, it appears to be part of the Lumen module in Unreal Engine’s renderer subsystem.
The value of this variable is set through the console variable system using FAutoConsoleVariableRef. It’s initialized with a default value of 20 in the C++ code.
The variable interacts directly with GLumenIrradianceFieldProbeOcclusionViewBias, which is the C++ variable that stores the actual value. It’s also used alongside GLumenIrradianceFieldProbeOcclusionNormalBias, which likely serves a similar purpose but for normal-based occlusion.
Developers should be aware that this variable affects the rendering quality and performance of Lumen’s Irradiance Field Gather system. Adjusting this value can help reduce self-occlusion artifacts, but may also impact performance or introduce other visual artifacts if set incorrectly.
Best practices when using this variable include:
- Experimenting with different values to find the optimal balance between artifact reduction and performance.
- Testing the changes across various scenes and lighting conditions to ensure consistent quality.
- Considering the interaction with other Lumen settings, particularly those related to probe occlusion.
Regarding the associated variable GLumenIrradianceFieldProbeOcclusionViewBias:
The purpose of GLumenIrradianceFieldProbeOcclusionViewBias is to store the actual value of the view bias used in the Lumen Irradiance Field Gather system.
This variable is used directly in the rendering code, specifically in the FDeferredShadingSceneRenderer::RenderLumenIrradianceFieldGather function. It’s part of the Lumen module in the renderer subsystem.
The value of this variable is set by the console variable system through r.Lumen.IrradianceFieldGather.ProbeOcclusionViewBias.
It interacts with the PassParameters->ProbeOcclusionViewBias in the rendering pass setup.
Developers should be aware that modifying this variable directly in code will be overwritten by the console variable system unless the console variable is removed or modified.
Best practices for this variable include:
- Using the console variable r.Lumen.IrradianceFieldGather.ProbeOcclusionViewBias to modify its value rather than changing it directly in code.
- Considering its impact on rendering performance and quality when adjusting its value.
- Documenting any non-default values used in production to ensure consistency across different development environments.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:103
Scope: file
Source code excerpt:
float GLumenIrradianceFieldProbeOcclusionViewBias = 20;
FAutoConsoleVariableRef CVarLumenIrradianceFieldProbeOcclusionViewBias(
TEXT("r.Lumen.IrradianceFieldGather.ProbeOcclusionViewBias"),
GLumenIrradianceFieldProbeOcclusionViewBias,
TEXT("Bias along the view direction to reduce self-occlusion artifacts from Probe Occlusion"),
ECVF_RenderThreadSafe
);
float GLumenIrradianceFieldProbeOcclusionNormalBias = 20;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenIrradianceFieldProbeOcclusionViewBias
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:101
Scope: file
Source code excerpt:
);
float GLumenIrradianceFieldProbeOcclusionViewBias = 20;
FAutoConsoleVariableRef CVarLumenIrradianceFieldProbeOcclusionViewBias(
TEXT("r.Lumen.IrradianceFieldGather.ProbeOcclusionViewBias"),
GLumenIrradianceFieldProbeOcclusionViewBias,
TEXT("Bias along the view direction to reduce self-occlusion artifacts from Probe Occlusion"),
ECVF_RenderThreadSafe
);
float GLumenIrradianceFieldProbeOcclusionNormalBias = 20;
FAutoConsoleVariableRef CVarLumenIrradianceFieldProbeOcclusionNormalBias(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenIrradianceFieldGather.cpp:330
Scope (from outer to inner):
file
function FSSDSignalTextures FDeferredShadingSceneRenderer::RenderLumenIrradianceFieldGather
Source code excerpt:
PassParameters->Substrate = Substrate::BindSubstrateGlobalUniformParameters(View);
LumenReflections::SetupCompositeParameters(View, PassParameters->ReflectionsCompositeParameters);
PassParameters->ProbeOcclusionViewBias = GLumenIrradianceFieldProbeOcclusionViewBias;
PassParameters->ProbeOcclusionNormalBias = GLumenIrradianceFieldProbeOcclusionNormalBias;
FIrradianceFieldGatherCS::FPermutationDomain PermutationVector;
auto ComputeShader = View.ShaderMap->GetShader<FIrradianceFieldGatherCS>(PermutationVector);
FComputeShaderUtils::AddPass(