r.Translucency.DynamicRes.ChangePercentageThreshold
r.Translucency.DynamicRes.ChangePercentageThreshold
#Overview
name: r.Translucency.DynamicRes.ChangePercentageThreshold
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Minimal increase percentage threshold to alow when changing resolution of translucency.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Translucency.DynamicRes.ChangePercentageThreshold is to control the minimal increase percentage threshold allowed when changing the resolution of translucency in Unreal Engine’s dynamic resolution system.
This setting variable is part of Unreal Engine’s rendering system, specifically the dynamic resolution scaling feature for translucent objects. It is primarily used in the TranslucentRendering module, which is responsible for rendering translucent objects in the scene.
The value of this variable is set using a console variable (CVar) system. It’s defined as a TAutoConsoleVariable, which allows it to be changed at runtime through console commands or configuration files.
The associated variable CVarTranslucencyChangeThreshold directly interacts with r.Translucency.DynamicRes.ChangePercentageThreshold. They share the same value and purpose.
Developers must be aware that this variable affects the performance and visual quality trade-off for translucent objects. It determines how aggressively the engine can change the resolution of translucent objects when attempting to maintain performance.
Best practices when using this variable include:
- Carefully balancing it with other dynamic resolution settings to achieve optimal performance and visual quality.
- Testing its impact across various hardware configurations, as its effects may vary depending on the capabilities of the target system.
- Considering its interaction with other translucency and rendering settings for a holistic approach to performance optimization.
Regarding the associated variable CVarTranslucencyChangeThreshold:
The purpose of CVarTranslucencyChangeThreshold is identical to r.Translucency.DynamicRes.ChangePercentageThreshold, as they share the same value and functionality.
This variable is used within the GetDynamicTranslucencyResolutionSettings function to configure the dynamic resolution settings for translucent objects. It’s part of a broader set of settings that control how the engine adjusts rendering resolution to maintain performance.
The value of CVarTranslucencyChangeThreshold is set when the engine initializes the console variable system, and it can be modified at runtime.
Other variables that interact with CVarTranslucencyChangeThreshold include CVarTranslucencyMaxScreenPercentage, CVarTranslucencyTimeBudget, CVarTranslucencyTargetedHeadRoomPercentage, and CVarTranslucencyUpperBoundQuantization. These variables collectively define the behavior of dynamic resolution scaling for translucent objects.
Developers should be aware that changes to CVarTranslucencyChangeThreshold will directly affect how aggressively the engine adjusts the resolution of translucent objects in response to performance demands.
Best practices for using CVarTranslucencyChangeThreshold are the same as those for r.Translucency.DynamicRes.ChangePercentageThreshold, as they are essentially the same variable.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/TranslucentRendering.cpp:74
Scope: file
Source code excerpt:
static TAutoConsoleVariable<float> CVarTranslucencyChangeThreshold(
TEXT("r.Translucency.DynamicRes.ChangePercentageThreshold"),
DynamicRenderScaling::FractionToPercentage(DynamicRenderScaling::FHeuristicSettings::kDefaultChangeThreshold),
TEXT("Minimal increase percentage threshold to alow when changing resolution of translucency."),
ECVF_RenderThreadSafe | ECVF_Default);
static TAutoConsoleVariable<int32> CVarTranslucencyUpperBoundQuantization(
TEXT("r.Translucency.DynamicRes.UpperBoundQuantization"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarTranslucencyChangeThreshold
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/TranslucentRendering.cpp:73
Scope: file
Source code excerpt:
ECVF_RenderThreadSafe | ECVF_Default);
static TAutoConsoleVariable<float> CVarTranslucencyChangeThreshold(
TEXT("r.Translucency.DynamicRes.ChangePercentageThreshold"),
DynamicRenderScaling::FractionToPercentage(DynamicRenderScaling::FHeuristicSettings::kDefaultChangeThreshold),
TEXT("Minimal increase percentage threshold to alow when changing resolution of translucency."),
ECVF_RenderThreadSafe | ECVF_Default);
static TAutoConsoleVariable<int32> CVarTranslucencyUpperBoundQuantization(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/TranslucentRendering.cpp:119
Scope (from outer to inner):
file
function DynamicRenderScaling::FHeuristicSettings GetDynamicTranslucencyResolutionSettings
Source code excerpt:
BucketSetting.MaxResolutionFraction = DynamicRenderScaling::GetPercentageCVarToFraction(CVarTranslucencyMaxScreenPercentage);
BucketSetting.BudgetMs = CVarTranslucencyTimeBudget.GetValueOnAnyThread();
BucketSetting.ChangeThreshold = DynamicRenderScaling::GetPercentageCVarToFraction(CVarTranslucencyChangeThreshold);
BucketSetting.TargetedHeadRoom = DynamicRenderScaling::GetPercentageCVarToFraction(CVarTranslucencyTargetedHeadRoomPercentage);
BucketSetting.UpperBoundQuantization = CVarTranslucencyUpperBoundQuantization.GetValueOnAnyThread();
return BucketSetting;
}
DynamicRenderScaling::FBudget GDynamicTranslucencyResolution(TEXT("DynamicTranslucencyResolution"), &GetDynamicTranslucencyResolutionSettings);