r.LumenScene.Radiosity.VisualizeProbeRadius
r.LumenScene.Radiosity.VisualizeProbeRadius
#Overview
name: r.LumenScene.Radiosity.VisualizeProbeRadius
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Radius of a visualized radiosity probe.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.LumenScene.Radiosity.VisualizeProbeRadius is to control the radius of visualized radiosity probes in the Lumen scene rendering system. This setting is part of Unreal Engine 5’s Lumen global illumination system, specifically the radiosity component.
This setting variable is primarily used in the Lumen Radiosity subsystem, which is part of the rendering module in Unreal Engine 5. It’s referenced in the LumenRadiosity.cpp file, indicating its direct involvement in the Lumen global illumination calculations.
The value of this variable is set as a console variable (CVar) with an initial value of 10.0f. It can be modified at runtime through the console or configuration files.
The associated variable CVarLumenSceneRadiosityVisualizeProbeRadius interacts directly with r.LumenScene.Radiosity.VisualizeProbeRadius. They share the same value and are used interchangeably in the code.
Developers should be aware that this variable affects visualization only and does not impact the actual radiosity calculations. It’s primarily used for debugging and visual inspection of the radiosity probes in the scene.
Best practices when using this variable include:
- Adjusting it only when debugging or inspecting the radiosity system.
- Being cautious with extreme values, as they might make the visualization less useful or potentially impact performance if set too high.
- Using it in conjunction with other Lumen visualization tools for a comprehensive understanding of the global illumination system.
Regarding the associated variable CVarLumenSceneRadiosityVisualizeProbeRadius:
- It’s the actual CVar implementation of the r.LumenScene.Radiosity.VisualizeProbeRadius setting.
- It’s used directly in the rendering code to set the VisualizeProbeRadius parameter in shader passes.
- The value is retrieved using GetValueOnRenderThread(), ensuring thread-safe access in the render thread.
- It’s used in multiple shader parameter sets, indicating its importance in the visualization process.
Developers should treat CVarLumenSceneRadiosityVisualizeProbeRadius as the internal representation of the r.LumenScene.Radiosity.VisualizeProbeRadius setting and use it when accessing the value in C++ code, particularly within the rendering system.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:166
Scope: file
Source code excerpt:
TAutoConsoleVariable<int32> CVarLumenSceneRadiosityVisualizeProbeRadius(
TEXT("r.LumenScene.Radiosity.VisualizeProbeRadius"),
10.0f,
TEXT("Radius of a visualized radiosity probe."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
namespace LumenRadiosity
#Associated Variable and Callsites
This variable is associated with another variable named CVarLumenSceneRadiosityVisualizeProbeRadius
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:165
Scope: file
Source code excerpt:
);
TAutoConsoleVariable<int32> CVarLumenSceneRadiosityVisualizeProbeRadius(
TEXT("r.LumenScene.Radiosity.VisualizeProbeRadius"),
10.0f,
TEXT("Radius of a visualized radiosity probe."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:1163
Scope: file
Source code excerpt:
PassParameters->View = GetShaderBinding(View.ViewUniformBuffer);
PassParameters->LumenCardScene = FrameTemporaries.LumenCardSceneUniformBuffer;
PassParameters->VisualizeProbeRadius = CVarLumenSceneRadiosityVisualizeProbeRadius.GetValueOnRenderThread();
PassParameters->ProbesPerPhysicalPage = ProbesPerPhysicalPage;
PassParameters->ProbeTileSize = ProbeSpacing;
PassParameters->MaxVisualizeProbes = MaxVisualizeProbes;
PassParameters->MaxVisualizeProbes = MaxVisualizeProbes;
PassParameters->RWVisualizeProbeAllocator = GraphBuilder.CreateUAV(VisualizeProbeAllocator);
PassParameters->RWVisualizeProbeData = GraphBuilder.CreateUAV(VisualizeProbeData);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenRadiosity.cpp:1186
Scope: file
Source code excerpt:
PassParameters->VS.View = GetShaderBinding(View.ViewUniformBuffer);
PassParameters->VS.LumenCardScene = FrameTemporaries.LumenCardSceneUniformBuffer;
PassParameters->VS.VisualizeProbeRadius = CVarLumenSceneRadiosityVisualizeProbeRadius.GetValueOnRenderThread();
PassParameters->VS.ProbesPerPhysicalPage = ProbesPerPhysicalPage;
PassParameters->VS.ProbeTileSize = ProbeSpacing;
PassParameters->VS.MaxVisualizeProbes = MaxVisualizeProbes;
PassParameters->VS.VisualizeProbeAllocator = GraphBuilder.CreateSRV(VisualizeProbeAllocator);
PassParameters->VS.VisualizeProbeData = GraphBuilder.CreateSRV(VisualizeProbeData);
PassParameters->PS.View = GetShaderBinding(View.ViewUniformBuffer);