r.Lumen.TranslucencyReflections.FrontLayer.Allow
r.Lumen.TranslucencyReflections.FrontLayer.Allow
#Overview
name: r.Lumen.TranslucencyReflections.FrontLayer.Allow
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.Allow 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 Lumen global illumination system.
The value of this variable is set through the console variable system in Unreal Engine. It’s defined as an FAutoConsoleVariableRef, which means it can be modified at runtime through console commands or configuration files.
The associated variable GLumenFrontLayerTranslucencyReflectionsAllowed directly interacts with r.Lumen.TranslucencyReflections.FrontLayer.Allow. They share the same value and are used interchangeably in the code.
Developers should be aware that this variable affects the quality and performance of translucent reflections. When enabled (set to 1), it allows for higher quality reflections on the frontmost layer of translucent surfaces, while other layers will use a lower quality method that can only produce glossy reflections.
Best practices for 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 to achieve the desired balance between visual quality and performance.
- Be aware that it’s marked with ECVF_Scalability, indicating it’s part of the scalability system and may be automatically adjusted based on quality settings.
Regarding the associated variable GLumenFrontLayerTranslucencyReflectionsAllowed:
- It’s an integer variable that directly corresponds to the console variable.
- It’s used in the UseLumenFrontLayerTranslucencyReflections function to determine if the feature should be enabled.
- Developers should treat it as read-only within their code, as its value is controlled by the console variable system.
- When using this variable in code, always check if it’s non-zero to determine if the feature is enabled.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:361, section: [ReflectionQuality@2]
- INI Section:
ReflectionQuality@2
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:371, section: [ReflectionQuality@3]
- INI Section:
ReflectionQuality@3
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:381, 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:33
Scope: file
Source code excerpt:
int32 GLumenFrontLayerTranslucencyReflectionsAllowed = 1;
FAutoConsoleVariableRef CVarLumenTranslucencyReflectionsFrontLayerAllowed(
TEXT("r.Lumen.TranslucencyReflections.FrontLayer.Allow"),
GLumenFrontLayerTranslucencyReflectionsAllowed,
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
);
static TAutoConsoleVariable<float> CVarLumenFrontLayerDepthThreshold(
#Associated Variable and Callsites
This variable is associated with another variable named GLumenFrontLayerTranslucencyReflectionsAllowed
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenFrontLayerTranslucency.cpp:31
Scope: file
Source code excerpt:
// Whether the user setting should be respected based on the current scalability level
int32 GLumenFrontLayerTranslucencyReflectionsAllowed = 1;
FAutoConsoleVariableRef CVarLumenTranslucencyReflectionsFrontLayerAllowed(
TEXT("r.Lumen.TranslucencyReflections.FrontLayer.Allow"),
GLumenFrontLayerTranslucencyReflectionsAllowed,
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
);
static TAutoConsoleVariable<float> CVarLumenFrontLayerDepthThreshold(
TEXT("r.Lumen.TranslucencyReflections.FrontLayer.DepthThreshold"),
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenFrontLayerTranslucency.cpp:53
Scope (from outer to inner):
file
namespace Lumen
function bool UseLumenFrontLayerTranslucencyReflections
Source code excerpt:
{
return (View.FinalPostProcessSettings.LumenFrontLayerTranslucencyReflections || GLumenFrontLayerTranslucencyReflectionsEnabled)
&& GLumenFrontLayerTranslucencyReflectionsAllowed != 0
&& View.Family->EngineShowFlags.LumenReflections;
}
bool ShouldRenderInFrontLayerTranslucencyGBufferPass(bool bShouldRenderInMainPass, const FMaterial& Material)
{
return bShouldRenderInMainPass