r.Lumen.ScreenProbeGather.ShortRangeAO.MaxMultibounceAlbedo
r.Lumen.ScreenProbeGather.ShortRangeAO.MaxMultibounceAlbedo
#Overview
name: r.Lumen.ScreenProbeGather.ShortRangeAO.MaxMultibounceAlbedo
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Maximum albedo used for the AO multi-bounce approximation. Useful for forcing near-white albedo to have some occlusion.
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.ScreenProbeGather.ShortRangeAO.MaxMultibounceAlbedo is to control the maximum albedo used for the ambient occlusion (AO) multi-bounce approximation in Lumen’s screen probe gathering process. It is specifically designed for the rendering system, particularly for the Lumen global illumination system in Unreal Engine 5.
This setting variable is primarily used in the Lumen subsystem of Unreal Engine’s rendering module. It’s referenced in files related to screen space bent normal calculations, screen probe gathering, and indirect light rendering.
The value of this variable is set through the console variable system, as indicated by the FAutoConsoleVariableRef declaration. It’s initialized with a default value of 0.5f.
The associated variable GLumenMaxShortRangeAOMultibounceAlbedo directly interacts with this console variable, sharing the same value. This variable is used in various rendering calculations, particularly in setting up pass parameters for screen probe gathering and integration.
Developers must be aware that this variable affects the visual quality of the ambient occlusion in scenes, especially for surfaces with high albedo values. It’s particularly useful for forcing near-white albedo surfaces to have some occlusion, which can improve the realism of the rendered image.
Best practices when using this variable include:
- Adjusting it carefully to balance between realism and performance.
- Testing its impact on various lighting scenarios, especially those with bright, highly reflective surfaces.
- Considering its interaction with other Lumen settings for optimal results.
Regarding the associated variable GLumenMaxShortRangeAOMultibounceAlbedo:
- Its purpose is to store and provide the maximum albedo value for AO multi-bounce calculations within the Lumen system.
- It’s used in the rendering subsystem, specifically in screen probe gathering and indirect light rendering processes.
- Its value is set by the console variable r.Lumen.ScreenProbeGather.ShortRangeAO.MaxMultibounceAlbedo.
- It directly interacts with various shader parameters in the rendering pipeline.
- Developers should be aware that modifying this variable will affect the appearance of ambient occlusion, particularly on bright surfaces.
- Best practices include monitoring its impact on both visual quality and performance when adjusting related Lumen settings.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenSpaceBentNormal.cpp:30
Scope: file
Source code excerpt:
float GLumenMaxShortRangeAOMultibounceAlbedo = .5f;
FAutoConsoleVariableRef CVarLumenMaxShortRangeAOMultibounceAlbedo(
TEXT("r.Lumen.ScreenProbeGather.ShortRangeAO.MaxMultibounceAlbedo"),
GLumenMaxShortRangeAOMultibounceAlbedo,
TEXT("Maximum albedo used for the AO multi-bounce approximation. Useful for forcing near-white albedo to have some occlusion."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenShortRangeAOHairStrandsVoxelTrace = 1;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenMaxShortRangeAOMultibounceAlbedo
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/IndirectLightRendering.cpp:1300
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::RenderDiffuseIndirectAndAmbientOcclusion
lambda-function
Source code excerpt:
extern float GLumenShortRangeAOFoliageOcclusionStrength;
PassParameters->LumenFoliageOcclusionStrength = GLumenShortRangeAOFoliageOcclusionStrength;
extern float GLumenMaxShortRangeAOMultibounceAlbedo;
PassParameters->LumenMaxAOMultibounceAlbedo = GLumenMaxShortRangeAOMultibounceAlbedo;
PassParameters->LumenReflectionSpecularScale = GetLumenReflectionSpecularScale();
PassParameters->LumenReflectionContrast = GetLumenReflectionContrast();
PassParameters->bVisualizeDiffuseIndirect = bIsVisualizePass;
PassParameters->DiffuseIndirect_Lumen_0 = SetDefaultBlackIfNotTexture2DArray(DenoiserOutputs.Textures[0]);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:1075
Scope: file
Source code excerpt:
}
extern float GLumenMaxShortRangeAOMultibounceAlbedo;
void InterpolateAndIntegrate(
FRDGBuilder& GraphBuilder,
const FSceneTextures& SceneTextures,
FViewInfo& View,
FScreenProbeParameters ScreenProbeParameters,
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:1262
Scope (from outer to inner):
file
function void InterpolateAndIntegrate
lambda-function
Source code excerpt:
PassParameters->MaxRoughnessToEvaluateRoughSpecular = GLumenScreenProbeMaxRoughnessToEvaluateRoughSpecular;
PassParameters->ApplyMaterialAO = GLumenScreenProbeMaterialAO;
PassParameters->MaxAOMultibounceAlbedo = GLumenMaxShortRangeAOMultibounceAlbedo;
PassParameters->LumenReflectionInputIsSSR = bSSREnabled ? 1 : 0;
PassParameters->ScreenSpaceBentNormalParameters = ScreenSpaceBentNormalParameters;
PassParameters->DefaultDiffuseIntegrationMethod = (uint32)LumenScreenProbeGather::GetDiffuseIntegralMethod();
PassParameters->ViewportTileDimensions = ViewportIntegrateTileDimensions;
PassParameters->ViewportTileDimensionsWithOverflow = TileClassificationBufferDimensions;
PassParameters->IndirectArgs = IntegrateIndirectArgs;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:1331
Scope (from outer to inner):
file
function void InterpolateAndIntegrate
lambda-function
Source code excerpt:
PassParameters->MaxRoughnessToEvaluateRoughSpecular = GLumenScreenProbeMaxRoughnessToEvaluateRoughSpecular;
PassParameters->ApplyMaterialAO = GLumenScreenProbeMaterialAO;
PassParameters->MaxAOMultibounceAlbedo = GLumenMaxShortRangeAOMultibounceAlbedo;
PassParameters->ScreenSpaceBentNormalParameters = ScreenSpaceBentNormalParameters;
PassParameters->DefaultDiffuseIntegrationMethod = (uint32)LumenScreenProbeGather::GetDiffuseIntegralMethod();
PassParameters->ViewportTileDimensions = FIntPoint(0, 0);
PassParameters->ViewportTileDimensionsWithOverflow = FIntPoint(0, 0);
PassParameters->Substrate = Substrate::BindSubstrateGlobalUniformParameters(View);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenSpaceBentNormal.cpp:28
Scope: file
Source code excerpt:
);
float GLumenMaxShortRangeAOMultibounceAlbedo = .5f;
FAutoConsoleVariableRef CVarLumenMaxShortRangeAOMultibounceAlbedo(
TEXT("r.Lumen.ScreenProbeGather.ShortRangeAO.MaxMultibounceAlbedo"),
GLumenMaxShortRangeAOMultibounceAlbedo,
TEXT("Maximum albedo used for the AO multi-bounce approximation. Useful for forcing near-white albedo to have some occlusion."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenShortRangeAOHairStrandsVoxelTrace = 1;
FAutoConsoleVariableRef GVarLumenShortRangeAOHairStrandsVoxelTrace(