r.TranslucencyVolumeBlur
r.TranslucencyVolumeBlur
#Overview
name: r.TranslucencyVolumeBlur
The value of this variable can be defined or overridden in .ini config files. 5
.ini config files referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to blur the translucent lighting volumes.\n0:off, otherwise on, default is 1
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.TranslucencyVolumeBlur is to control whether the translucent lighting volumes are blurred in Unreal Engine’s rendering system. This setting is part of the engine’s translucency and lighting features, specifically affecting the visual quality of translucent objects in the scene.
This setting variable is primarily used in the Renderer module of Unreal Engine, particularly in the translucent lighting system. It’s referenced in the TranslucentLighting.cpp file, which is part of the core rendering pipeline.
The value of this variable is set through the console variable system (CVarUseTranslucentLightingVolumeBlur). It’s initialized with a default value of 1 (enabled) but can be changed at runtime through console commands or project settings.
The r.TranslucencyVolumeBlur variable directly interacts with the GUseTranslucencyVolumeBlur global variable. They share the same value, with GUseTranslucencyVolumeBlur being the actual variable used in the C++ code to control the behavior.
Developers should be aware that this setting can impact performance and visual quality. Enabling the blur (value 1 or higher) may improve the visual quality of translucent objects but could also increase rendering time. Disabling it (value 0) might improve performance at the cost of visual fidelity.
Best practices when using this variable include:
- Testing the visual impact and performance with and without the blur enabled.
- Considering the target hardware when deciding whether to enable or disable this feature.
- Using it in conjunction with other translucency and lighting settings for optimal results.
Regarding the associated variable GUseTranslucencyVolumeBlur:
The purpose of GUseTranslucencyVolumeBlur is to serve as the actual implementation variable for the r.TranslucencyVolumeBlur setting. It’s used directly in the C++ code to control the behavior of the translucency volume blur.
This variable is used in the Renderer module, specifically in the translucent lighting system. It’s checked in the FilterTranslucencyLightingVolume function to determine whether to proceed with the blurring process.
The value of GUseTranslucencyVolumeBlur is set by the console variable system, mirroring the value of r.TranslucencyVolumeBlur.
GUseTranslucencyVolumeBlur interacts directly with other conditions in the rendering pipeline, such as GUseTranslucentLightingVolumes and GSupportsVolumeTextureRendering, to determine whether to apply the blur effect.
Developers should be aware that changes to r.TranslucencyVolumeBlur will directly affect GUseTranslucencyVolumeBlur, and vice versa. They should also note that this variable is used in conjunction with other rendering conditions.
Best practices for using GUseTranslucencyVolumeBlur include:
- Avoiding direct manipulation of this variable; instead, use the r.TranslucencyVolumeBlur console variable to change its value.
- Being aware of its interactions with other rendering conditions when debugging or optimizing the translucency lighting system.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseScalability.ini:617, section: [EffectsQuality@0]
- INI Section:
EffectsQuality@0
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:644, section: [EffectsQuality@1]
- INI Section:
EffectsQuality@1
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:671, section: [EffectsQuality@2]
- INI Section:
EffectsQuality@2
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:698, section: [EffectsQuality@3]
- INI Section:
EffectsQuality@3
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:726, section: [EffectsQuality@Cine]
- INI Section:
EffectsQuality@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/TranslucentLighting.cpp:87
Scope: file
Source code excerpt:
int32 GUseTranslucencyVolumeBlur = 1;
FAutoConsoleVariableRef CVarUseTranslucentLightingVolumeBlur(
TEXT("r.TranslucencyVolumeBlur"),
GUseTranslucencyVolumeBlur,
TEXT("Whether to blur the translucent lighting volumes.\n")
TEXT("0:off, otherwise on, default is 1"),
ECVF_Scalability | ECVF_RenderThreadSafe
);
#Associated Variable and Callsites
This variable is associated with another variable named GUseTranslucencyVolumeBlur
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/TranslucentLighting.cpp:85
Scope: file
Source code excerpt:
);
int32 GUseTranslucencyVolumeBlur = 1;
FAutoConsoleVariableRef CVarUseTranslucentLightingVolumeBlur(
TEXT("r.TranslucencyVolumeBlur"),
GUseTranslucencyVolumeBlur,
TEXT("Whether to blur the translucent lighting volumes.\n")
TEXT("0:off, otherwise on, default is 1"),
ECVF_Scalability | ECVF_RenderThreadSafe
);
int32 GTranslucencyLightingVolumeDim = 64;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/TranslucentLighting.cpp:1387
Scope (from outer to inner):
file
function void FilterTranslucencyLightingVolume
Source code excerpt:
FTranslucencyLightingVolumeTextures& Textures)
{
if (!GUseTranslucentLightingVolumes || !GSupportsVolumeTextureRendering || !GUseTranslucencyVolumeBlur)
{
return;
}
FRHISamplerState* SamplerStateRHI = TStaticSamplerState<SF_Bilinear, AM_Clamp, AM_Clamp, AM_Clamp>::GetRHI();