r.BloomQuality
r.BloomQuality
#Overview
name: r.BloomQuality
The value of this variable can be defined or overridden in .ini config files. 14
.ini config files referencing this setting variable.
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
0: off, no performance impact.\n 1: average quality, least performance impact.\n 2: average quality, least performance impact.\n 3: good quality.\n 4: good quality.\n 5: Best quality, most significant performance impact. (default)\n>5: force experimental higher quality on mobile (can be quite slow on some hardware)
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.BloomQuality is to control the quality level of the bloom post-processing effect in Unreal Engine 5. Bloom is a rendering technique that adds a glow effect to bright areas of an image, simulating the way light behaves in real-world cameras and the human eye.
This setting variable is primarily used by the rendering system, specifically the post-processing pipeline. It is referenced in the Engine and Renderer modules of Unreal Engine.
The value of this variable is set through the console variable system. It is initialized with a default value of 5, but can be changed at runtime using console commands or through game code.
The r.BloomQuality variable interacts with other post-processing settings, particularly those related to bloom intensity. For example, in SceneView.cpp, if r.BloomQuality is set to 0, the BloomIntensity in FinalPostProcessSettings is set to 0, effectively disabling the bloom effect.
Developers must be aware that this variable has a significant impact on both visual quality and performance. Higher quality settings will produce better-looking bloom effects but may have a greater performance cost.
Best practices when using this variable include:
- Adjusting it based on the target hardware capabilities and performance requirements.
- Testing different quality levels to find the best balance between visual quality and performance for your specific game or application.
- Considering dynamic adjustment of this setting based on the current scene complexity or performance metrics.
- Being mindful of its interaction with other post-processing effects and settings.
- Using it in conjunction with other bloom-related settings for fine-tuning the overall bloom effect.
The variable offers a range of quality options from 0 (off) to 5 (highest quality), allowing developers to scale the effect according to their needs and performance targets.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseDeviceProfiles.ini:894, section: [Android_Vulkan_SM5 DeviceProfile]
- INI Section:
Android_Vulkan_SM5 DeviceProfile
- Raw value:
2
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:400, section: [PostProcessQuality@0]
- INI Section:
PostProcessQuality@0
- Raw value:
4
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:420, section: [PostProcessQuality@1]
- INI Section:
PostProcessQuality@1
- Raw value:
4
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:453, section: [PostProcessQuality@2]
- INI Section:
PostProcessQuality@2
- Raw value:
5
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:488, section: [PostProcessQuality@3]
- INI Section:
PostProcessQuality@3
- Raw value:
5
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseScalability.ini:526, section: [PostProcessQuality@Cine]
- INI Section:
PostProcessQuality@Cine
- Raw value:
5
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/AndroidScalability.ini:90, section: [PostProcessQuality@0]
- INI Section:
PostProcessQuality@0
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/AndroidScalability.ini:100, section: [PostProcessQuality@1]
- INI Section:
PostProcessQuality@1
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/AndroidScalability.ini:110, section: [PostProcessQuality@2]
- INI Section:
PostProcessQuality@2
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/AndroidScalability.ini:120, section: [PostProcessQuality@3]
- INI Section:
PostProcessQuality@3
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/IOSScalability.ini:90, section: [PostProcessQuality@0]
- INI Section:
PostProcessQuality@0
- Raw value:
0
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/IOSScalability.ini:100, section: [PostProcessQuality@1]
- INI Section:
PostProcessQuality@1
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/IOSScalability.ini:110, section: [PostProcessQuality@2]
- INI Section:
PostProcessQuality@2
- Raw value:
1
- Is Array:
False
Location: <Workspace>/Engine/Config/IOS/IOSScalability.ini:120, section: [PostProcessQuality@3]
- INI Section:
PostProcessQuality@3
- 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/Core/Private/HAL/ConsoleManager.cpp:3609
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarBloomQuality(
TEXT("r.BloomQuality"),
5,
TEXT(" 0: off, no performance impact.\n"
" 1: average quality, least performance impact.\n"
" 2: average quality, least performance impact.\n"
" 3: good quality.\n"
" 4: good quality.\n"
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SceneView.cpp:2067
Scope (from outer to inner):
file
function void FSceneView::EndFinalPostprocessSettings
Source code excerpt:
{
static const auto BloomQualityCVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.BloomQuality"));
int Value = BloomQualityCVar->GetValueOnGameThread();
if(Value <= 0)
{
FinalPostProcessSettings.BloomIntensity = 0.0f;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessBloomSetup.cpp:186
Scope (from outer to inner):
file
function EBloomQuality GetBloomQuality
Source code excerpt:
EBloomQuality GetBloomQuality()
{
static const auto CVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.BloomQuality"));
return static_cast<EBloomQuality>(FMath::Clamp(
CVar->GetValueOnRenderThread(),
static_cast<int32>(EBloomQuality::Disabled),
static_cast<int32>(EBloomQuality::MAX) - 1));
}