ShowFlag.LumenShortRangeAmbientOcclusion
ShowFlag.LumenShortRangeAmbientOcclusion
#Overview
name: ShowFlag.LumenShortRangeAmbientOcclusion
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allows to override a specific showflag (works in editor and game, \
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.LumenShortRangeAmbientOcclusion is to control the computation and display of short-range ambient occlusion in the Lumen global illumination system within Unreal Engine 5.
-
This setting variable is primarily used by the Lumen subsystem, which is part of Unreal Engine 5’s rendering system.
-
The value of this variable is likely set through the engine’s show flags system, which allows for runtime toggling of various rendering features.
-
It interacts with other Lumen-related variables and settings, particularly those related to ambient occlusion and global illumination.
-
Developers must be aware that this variable affects the visual quality and performance of the Lumen global illumination system. Enabling it will provide more accurate short-range shadows and occlusion but may have a performance cost.
-
Best practices when using this variable include:
- Only enabling it when higher visual fidelity is required, as it may impact performance.
- Testing the impact on different hardware configurations to ensure acceptable performance.
- Using it in conjunction with other Lumen settings for optimal results.
Regarding the associated variable LumenShortRangeAmbientOcclusion:
-
This variable serves the same purpose as ShowFlag.LumenShortRangeAmbientOcclusion, controlling the short-range ambient occlusion feature in Lumen.
-
It is used in the Renderer module, specifically in the Lumen-related components such as LumenReSTIRGather and LumenScreenProbeGather.
-
The value is checked in conditional statements to determine whether to compute and apply short-range ambient occlusion.
-
It interacts with other Lumen settings like GLumenReSTIRGatherShortRangeAmbientOcclusion and GLumenShortRangeAmbientOcclusion.
-
Developers should be aware that this variable directly affects the rendering pipeline and can influence both visual quality and performance.
-
Best practices include:
- Coordinating its use with other Lumen settings for consistent results.
- Profiling the performance impact when enabled, especially in complex scenes.
- Considering its interaction with other ambient occlusion techniques in the engine.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:441
Scope: file
Source code excerpt:
SHOWFLAG_ALWAYS_ACCESSIBLE(LumenSecondaryBounces, SFG_Lumen, NSLOCTEXT("UnrealEd", "LumenSecondaryBouncesSF", "Secondary Bounces"))
/** Compute screen space directional occlusion in Lumen */
SHOWFLAG_ALWAYS_ACCESSIBLE(LumenShortRangeAmbientOcclusion, SFG_Lumen, NSLOCTEXT("UnrealEd", "LumenShortRangeAmbientOcclusionSF", "Short Range Ambient Occlusion"))
/** Draw Nanite meshes */
SHOWFLAG_ALWAYS_ACCESSIBLE(NaniteMeshes, SFG_Nanite, NSLOCTEXT("UnrealEd", "NaniteMeshesSF", "Meshes"))
/** Draw Nanite streaming geometry */
SHOWFLAG_ALWAYS_ACCESSIBLE(NaniteStreamingGeometry, SFG_Nanite, NSLOCTEXT("UnrealEd", "NaniteStreamingGeometrySF", "Streaming Geometry"))
#Associated Variable and Callsites
This variable is associated with another variable named LumenShortRangeAmbientOcclusion
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:441
Scope: file
Source code excerpt:
SHOWFLAG_ALWAYS_ACCESSIBLE(LumenSecondaryBounces, SFG_Lumen, NSLOCTEXT("UnrealEd", "LumenSecondaryBouncesSF", "Secondary Bounces"))
/** Compute screen space directional occlusion in Lumen */
SHOWFLAG_ALWAYS_ACCESSIBLE(LumenShortRangeAmbientOcclusion, SFG_Lumen, NSLOCTEXT("UnrealEd", "LumenShortRangeAmbientOcclusionSF", "Short Range Ambient Occlusion"))
/** Draw Nanite meshes */
SHOWFLAG_ALWAYS_ACCESSIBLE(NaniteMeshes, SFG_Nanite, NSLOCTEXT("UnrealEd", "NaniteMeshesSF", "Meshes"))
/** Draw Nanite streaming geometry */
SHOWFLAG_ALWAYS_ACCESSIBLE(NaniteStreamingGeometry, SFG_Nanite, NSLOCTEXT("UnrealEd", "NaniteStreamingGeometrySF", "Streaming Geometry"))
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenReSTIRGather.cpp:1294
Scope (from outer to inner):
file
function FSSDSignalTextures FDeferredShadingSceneRenderer::RenderLumenReSTIRGather
Source code excerpt:
DenoiserOutputs.Textures[2] = RoughSpecularIndirect;
if (GLumenReSTIRGatherShortRangeAmbientOcclusion != 0 && ViewFamily.EngineShowFlags.LumenShortRangeAmbientOcclusion)
{
float MaxScreenTraceFraction = GLumenReSTIRGatherShortRangeAOMaxScreenTraceFraction;
ScreenSpaceBentNormalParameters = ComputeScreenSpaceShortRangeAO(GraphBuilder, Scene, View, SceneTextures, LightingChannelsTexture, BlueNoise, MaxScreenTraceFraction, 1.0f, ComputePassFlags);
}
return DenoiserOutputs;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:369
Scope (from outer to inner):
file
namespace LumenScreenProbeGather
function bool UseShortRangeAmbientOcclusion
Source code excerpt:
bool UseShortRangeAmbientOcclusion(const FEngineShowFlags& ShowFlags)
{
return GLumenScreenProbeGatherReferenceMode ? false : (GLumenShortRangeAmbientOcclusion != 0 && ShowFlags.LumenShortRangeAmbientOcclusion);
}
bool ApplyShortRangeAODuringIntegration()
{
return GLumenShortRangeAOApplyDuringIntegration != 0;
}