r.Lumen.TranslucencyReflections.FrontLayer.Enable
r.Lumen.TranslucencyReflections.FrontLayer.Enable
#Overview
name: r.Lumen.TranslucencyReflections.FrontLayer.Enable
The value of this variable can be defined or overridden in .ini config files. 3
.ini config files referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to render Lumen Reflections on the frontmost layer of Translucent Surfaces. Other layers will use the lower quality Radiance Cache method that can only produce glossy reflections.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.TranslucencyReflections.FrontLayer.Enable is to control whether Lumen Reflections are rendered on the frontmost layer of Translucent Surfaces in Unreal Engine 5’s rendering system.
This setting variable is primarily used by the Lumen rendering subsystem within Unreal Engine 5. It specifically affects the handling of translucency reflections in the front layer of rendered objects.
The value of this variable is set through the Unreal Engine console or configuration files. It’s defined as an FAutoConsoleVariableRef, which means it can be modified at runtime through console commands.
The variable interacts closely with GLumenFrontLayerTranslucencyReflectionsEnabled, which is an associated integer variable that directly controls the feature’s state. They share the same value, with the console variable serving as the interface for adjusting the setting.
Developers must be aware that this variable affects rendering quality and performance. Enabling it provides higher quality reflections for the front layer of translucent surfaces, while other layers will use a lower quality method (Radiance Cache) that can only produce glossy reflections.
Best practices when using this variable include:
- Consider the performance impact when enabling this feature, especially on lower-end hardware.
- Use it in conjunction with other Lumen settings for optimal results.
- Test thoroughly in different scenarios to ensure the desired visual quality is achieved without significant performance drops.
Regarding the associated variable GLumenFrontLayerTranslucencyReflectionsEnabled:
The purpose of GLumenFrontLayerTranslucencyReflectionsEnabled is to serve as the internal representation of the Lumen Front Layer Translucency Reflections setting.
This variable is used within the Lumen subsystem of the Unreal Engine 5 renderer. It’s directly accessed in the UseLumenFrontLayerTranslucencyReflections function to determine if the feature should be active.
The value of this variable is set by the r.Lumen.TranslucencyReflections.FrontLayer.Enable console variable.
It interacts with other rendering flags and settings, such as View.FinalPostProcessSettings.LumenFrontLayerTranslucencyReflections and View.Family->EngineShowFlags.LumenReflections, to determine the final state of the feature.
Developers should be aware that this variable is part of a larger system of flags and settings that control Lumen’s behavior. Changes to this variable alone may not be sufficient to enable or disable the feature entirely.
Best practices include:
- Avoid modifying this variable directly in code; instead, use the console variable to change its value.
- Consider the interaction with other Lumen settings when debugging or optimizing rendering performance.
- Use this variable in conjunction with profiling tools to understand its impact on rendering performance in different scenarios.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:362, section: [ReflectionQuality@2]
- INI Section:
ReflectionQuality@2
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:372, section: [ReflectionQuality@3]
- INI Section:
ReflectionQuality@3
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:382, section: [ReflectionQuality@Cine]
- INI Section:
ReflectionQuality@Cine
- Raw value:
1
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenFrontLayerTranslucency.cpp:16
Scope: file
Source code excerpt:
int32 GLumenFrontLayerTranslucencyReflectionsEnabled = 0;
FAutoConsoleVariableRef CVarLumenTranslucencyReflectionsFrontLayerEnabled(
TEXT("r.Lumen.TranslucencyReflections.FrontLayer.Enable"),
GLumenFrontLayerTranslucencyReflectionsEnabled,
TEXT("Whether to render Lumen Reflections on the frontmost layer of Translucent Surfaces. Other layers will use the lower quality Radiance Cache method that can only produce glossy reflections."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
// Note: Driven by URendererSettings
#Associated Variable and Callsites
This variable is associated with another variable named GLumenFrontLayerTranslucencyReflectionsEnabled
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenFrontLayerTranslucency.cpp:14
Scope: file
Source code excerpt:
// Whether to enable Front Layer Translucency reflections from scalability
int32 GLumenFrontLayerTranslucencyReflectionsEnabled = 0;
FAutoConsoleVariableRef CVarLumenTranslucencyReflectionsFrontLayerEnabled(
TEXT("r.Lumen.TranslucencyReflections.FrontLayer.Enable"),
GLumenFrontLayerTranslucencyReflectionsEnabled,
TEXT("Whether to render Lumen Reflections on the frontmost layer of Translucent Surfaces. Other layers will use the lower quality Radiance Cache method that can only produce glossy reflections."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
// Note: Driven by URendererSettings
static TAutoConsoleVariable<int32> CVarLumenFrontLayerTranslucencyReflectionsEnabledForProject(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenFrontLayerTranslucency.cpp:52
Scope (from outer to inner):
file
namespace Lumen
function bool UseLumenFrontLayerTranslucencyReflections
Source code excerpt:
bool UseLumenFrontLayerTranslucencyReflections(const FViewInfo& View)
{
return (View.FinalPostProcessSettings.LumenFrontLayerTranslucencyReflections || GLumenFrontLayerTranslucencyReflectionsEnabled)
&& GLumenFrontLayerTranslucencyReflectionsAllowed != 0
&& View.Family->EngineShowFlags.LumenReflections;
}
bool ShouldRenderInFrontLayerTranslucencyGBufferPass(bool bShouldRenderInMainPass, const FMaterial& Material)
{