r.Lumen.TranslucencyVolume.Enable
r.Lumen.TranslucencyVolume.Enable
#Overview
name: r.Lumen.TranslucencyVolume.Enable
This variable is created as a Console Variable (cvar).
- type:
Var
- help: ``
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.TranslucencyVolume.Enable is to control the enabling or disabling of the Lumen Translucency Volume feature in Unreal Engine 5’s rendering system. This setting is specifically related to the Lumen global illumination system, focusing on the translucency volume lighting calculations.
This setting variable is primarily used in the Renderer module of Unreal Engine 5, specifically within the Lumen subsystem. It’s referenced in files related to Lumen translucency volume lighting and radiance cache visualization.
The value of this variable is set through the Unreal Engine console variable system. It’s defined as an FAutoConsoleVariableRef, which allows it to be modified at runtime through console commands or configuration files.
The associated variable GLumenTranslucencyVolume directly interacts with r.Lumen.TranslucencyVolume.Enable. They share the same value, meaning that changing one will affect the other.
Developers should be aware that this variable has the ECVF_Scalability and ECVF_RenderThreadSafe flags. The scalability flag indicates that this setting can affect performance and visual quality, while the render thread safe flag means it can be safely changed from any thread.
Best practices when using this variable include:
- Consider the performance impact when enabling or disabling this feature, especially on less powerful hardware.
- Use it in conjunction with other Lumen settings for optimal results.
- Be cautious when modifying it at runtime, as it may cause visual changes or performance fluctuations.
Regarding the associated variable GLumenTranslucencyVolume:
- Its purpose is to serve as an internal representation of the r.Lumen.TranslucencyVolume.Enable setting.
- It’s used within the rendering code to quickly check if the Lumen Translucency Volume feature is enabled.
- This variable is checked in various parts of the Lumen translucency volume lighting code to conditionally execute certain rendering paths.
- Developers should not modify this variable directly, but instead use the r.Lumen.TranslucencyVolume.Enable console variable to control the feature.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:20
Scope: file
Source code excerpt:
int32 GLumenTranslucencyVolume = 1;
FAutoConsoleVariableRef CVarLumenTranslucencyVolume(
TEXT("r.Lumen.TranslucencyVolume.Enable"),
GLumenTranslucencyVolume,
TEXT(""),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenTranslucencyVolumeTraceFromVolume = 1;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenTranslucencyVolume
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:18
Scope: file
Source code excerpt:
#include "LumenRadianceCache.h"
int32 GLumenTranslucencyVolume = 1;
FAutoConsoleVariableRef CVarLumenTranslucencyVolume(
TEXT("r.Lumen.TranslucencyVolume.Enable"),
GLumenTranslucencyVolume,
TEXT(""),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GLumenTranslucencyVolumeTraceFromVolume = 1;
FAutoConsoleVariableRef CVarLumenTranslucencyVolumeTraceFromVolume(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:692
Scope (from outer to inner):
file
function LumenRadianceCache::FUpdateInputs FDeferredShadingSceneRenderer::GetLumenTranslucencyGIVolumeRadianceCacheInputs
Source code excerpt:
FMarkUsedRadianceCacheProbes MarkUsedRadianceCacheProbesCallbacks;
if (GLumenTranslucencyVolume && GLumenTranslucencyVolumeRadianceCache)
{
MarkUsedRadianceCacheProbesCallbacks.AddLambda([VolumeParameters, ComputePassFlags](
FRDGBuilder& GraphBuilder,
const FViewInfo& View,
const LumenRadianceCache::FRadianceCacheMarkParameters& RadianceCacheMarkParameters)
{
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyVolumeLighting.cpp:727
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::ComputeLumenTranslucencyGIVolume
Source code excerpt:
ERDGPassFlags ComputePassFlags)
{
if (GLumenTranslucencyVolume)
{
RDG_EVENT_SCOPE(GraphBuilder, "TranslucencyVolumeLighting");
if (GLumenTranslucencyVolumeRadianceCache && !RadianceCacheParameters.RadianceProbeIndirectionTexture)
{
LumenRadianceCache::TInlineArray<LumenRadianceCache::FUpdateInputs> InputArray;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualizeRadianceCache.cpp:126
Scope: file
Source code excerpt:
}
extern int32 GLumenTranslucencyVolume;
extern int32 GLumenVisualizeTranslucencyVolumeRadianceCache;
void FDeferredShadingSceneRenderer::RenderLumenRadianceCacheVisualization(FRDGBuilder& GraphBuilder, const FMinimalSceneTextures& SceneTextures)
{
const FViewInfo& View = Views[0];
const FPerViewPipelineState& ViewPipelineState = GetViewPipelineState(View);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenVisualizeRadianceCache.cpp:138
Scope (from outer to inner):
file
function void FDeferredShadingSceneRenderer::RenderLumenRadianceCacheVisualization
Source code excerpt:
&& View.ViewState
&& bAnyLumenActive
&& (LumenScreenProbeGather::UseRadianceCache(Views[0]) || (GLumenVisualizeTranslucencyVolumeRadianceCache && GLumenTranslucencyVolume))
&& GLumenRadianceCacheVisualize != 0)
{
RDG_EVENT_SCOPE(GraphBuilder, "VisualizeLumenRadianceCache");
const FRadianceCacheState& RadianceCacheState = GLumenVisualizeTranslucencyVolumeRadianceCache != 0 ? Views[0].ViewState->Lumen.TranslucencyVolumeRadianceCacheState : Views[0].ViewState->Lumen.RadianceCacheState;