r.Lumen.Visualize.HiResSurface
r.Lumen.Visualize.HiResSurface
#Overview
name: r.Lumen.Visualize.HiResSurface
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether visualization should sample highest available surface data or use lowest res always resident pages.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.Visualize.HiResSurface is to control the visualization of surface data in the Lumen global illumination system within Unreal Engine 5. Specifically, it determines whether the visualization should sample the highest available surface data or use the lowest resolution, always-resident pages.
This setting variable is primarily used in the rendering system, particularly within the Lumen subsystem of Unreal Engine 5. Based on the callsites, it’s clear that this variable is utilized in the Lumen visualization module, which is part of the renderer.
The value of this variable is set through the console variable system in Unreal Engine. It’s initialized with a default value of 1 and can be changed at runtime using console commands.
The associated variable GVisualizeLumenSceneHiResSurface directly interacts with r.Lumen.Visualize.HiResSurface. They share the same value, with GVisualizeLumenSceneHiResSurface being the actual integer variable used in the C++ code.
Developers should be aware that this variable affects the visual debugging of the Lumen system. When enabled (set to 1), it will use the highest resolution surface data available, which may provide more detailed visualizations but could potentially impact performance. When disabled (set to 0), it will use the lowest resolution, always-resident pages, which might be less detailed but could be more performance-friendly.
Best practices when using this variable include:
- Use it primarily for debugging and development purposes.
- Be mindful of potential performance impacts when enabling high-resolution surface data visualization.
- Consider disabling it in shipping builds or performance-critical scenarios.
Regarding the associated variable GVisualizeLumenSceneHiResSurface:
- Its purpose is to store the actual integer value that corresponds to the r.Lumen.Visualize.HiResSurface setting.
- It’s used directly in the C++ code to control the behavior of the Lumen visualization system.
- The value is set through the console variable system and can be changed at runtime.
- It interacts directly with r.Lumen.Visualize.HiResSurface, sharing the same value.
- Developers should be aware that changes to r.Lumen.Visualize.HiResSurface will directly affect this variable.
- Best practices include using this variable for conditional logic in the rendering code related to Lumen visualization, and ensuring it’s properly synchronized with the console variable when making changes.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualize.cpp:84
Scope: file
Source code excerpt:
int32 GVisualizeLumenSceneHiResSurface = 1;
FAutoConsoleVariableRef CVarVisualizeLumenSceneHiResSurface(
TEXT("r.Lumen.Visualize.HiResSurface"),
GVisualizeLumenSceneHiResSurface,
TEXT("Whether visualization should sample highest available surface data or use lowest res always resident pages."),
ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarVisualizeLumenSceneSurfaceCacheFeedback(
#Associated Variable and Callsites
This variable is associated with another variable named GVisualizeLumenSceneHiResSurface
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualize.cpp:82
Scope: file
Source code excerpt:
);
int32 GVisualizeLumenSceneHiResSurface = 1;
FAutoConsoleVariableRef CVarVisualizeLumenSceneHiResSurface(
TEXT("r.Lumen.Visualize.HiResSurface"),
GVisualizeLumenSceneHiResSurface,
TEXT("Whether visualization should sample highest available surface data or use lowest res always resident pages."),
ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarVisualizeLumenSceneSurfaceCacheFeedback(
TEXT("r.Lumen.Visualize.SurfaceCacheFeedback"),
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualize.cpp:651
Scope (from outer to inner):
file
function void SetupVisualizeParameters
Source code excerpt:
CommonParameters.TonemappingParameters = LumenVisualize::GetTonemappingParameters(GraphBuilder, ColorGradingTexture, EyeAdaptationBuffer);
CommonParameters.VisualizeHiResSurface = GVisualizeLumenSceneHiResSurface ? 1 : 0;
CommonParameters.VisualizeMode = VisualizeMode;
CommonParameters.MaxReflectionBounces = MaxReflectionBounces;
CommonParameters.MaxRefractionBounces = MaxRefractionBounces;
LumenReflections::SetupCompositeParameters(View, CommonParameters.ReflectionsCompositeParameters);
CommonParameters.PreIntegratedGF = GSystemTextures.PreintegratedGF->GetRHI();