r.SSProfilesPreIntegratedTextureForceUpdate
r.SSProfilesPreIntegratedTextureForceUpdate
#Overview
name: r.SSProfilesPreIntegratedTextureForceUpdate
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
0: Only update the preintegrated texture as needed.\n1: Force to update the preintegrated texture for debugging.\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.SSProfilesPreIntegratedTextureForceUpdate is to control the update behavior of the preintegrated texture used in subsurface scattering profiles. It is primarily used for debugging purposes in the rendering system of Unreal Engine 5.
This setting variable is utilized in the Unreal Engine’s rendering subsystem, specifically in the subsurface scattering profile functionality. It is defined and used within the Engine module, as evidenced by its location in the SubsurfaceProfile.cpp file.
The value of this variable is set through a console command, as it is defined using TAutoConsoleVariable. By default, it is set to 0, meaning the preintegrated texture is only updated as needed.
This variable interacts directly with its associated variable CVarSSProfilesPreIntegratedTextureForceUpdate. They share the same value and purpose.
Developers must be aware that this variable is only available in non-shipping and non-test builds. It is marked with ECVF_Cheat and ECVF_RenderThreadSafe flags, indicating it’s intended for debugging and is safe to use on the render thread.
Best practices when using this variable include:
- Only enable it (set to 1) when debugging issues related to subsurface scattering profiles.
- Remember to disable it (set back to 0) after debugging to avoid unnecessary performance overhead.
- Use it in conjunction with other rendering debugging tools for comprehensive analysis.
Regarding the associated variable CVarSSProfilesPreIntegratedTextureForceUpdate:
The purpose of CVarSSProfilesPreIntegratedTextureForceUpdate is identical to r.SSProfilesPreIntegratedTextureForceUpdate. It is the actual console variable that controls the force update behavior of the preintegrated texture for subsurface scattering profiles.
This variable is used in the Engine module, specifically in the rendering subsystem dealing with subsurface scattering.
The value of this variable is set through the console command “r.SSProfilesPreIntegratedTextureForceUpdate”. It can be set to 0 (default, update as needed) or 1 (force update for debugging).
CVarSSProfilesPreIntegratedTextureForceUpdate interacts directly with the ForceUpdateSSProfilesPreIntegratedTexture function, which checks the variable’s value to determine if a force update is required.
Developers should be aware that this variable is only available in development builds and is intended for debugging purposes. It should not be relied upon in shipping or test builds.
Best practices for using this variable include:
- Use it sparingly and only when investigating specific issues with subsurface scattering.
- Remember to reset it to 0 after debugging to avoid performance impacts.
- Be cautious when using it in multiplayer or networked environments, as it may cause inconsistencies between clients and servers.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Rendering/SubsurfaceProfile.cpp:30
Scope: file
Source code excerpt:
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
static TAutoConsoleVariable<int32> CVarSSProfilesPreIntegratedTextureForceUpdate(
TEXT("r.SSProfilesPreIntegratedTextureForceUpdate"),
0,
TEXT("0: Only update the preintegrated texture as needed.\n")
TEXT("1: Force to update the preintegrated texture for debugging.\n"),
ECVF_Cheat | ECVF_RenderThreadSafe);
#endif
#Associated Variable and Callsites
This variable is associated with another variable named CVarSSProfilesPreIntegratedTextureForceUpdate
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Rendering/SubsurfaceProfile.cpp:29
Scope: file
Source code excerpt:
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
static TAutoConsoleVariable<int32> CVarSSProfilesPreIntegratedTextureForceUpdate(
TEXT("r.SSProfilesPreIntegratedTextureForceUpdate"),
0,
TEXT("0: Only update the preintegrated texture as needed.\n")
TEXT("1: Force to update the preintegrated texture for debugging.\n"),
ECVF_Cheat | ECVF_RenderThreadSafe);
#endif
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Rendering/SubsurfaceProfile.cpp:40
Scope (from outer to inner):
file
function static bool ForceUpdateSSProfilesPreIntegratedTexture
Source code excerpt:
{
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
return (CVarSSProfilesPreIntegratedTextureForceUpdate.GetValueOnAnyThread() == 1);
#else
return false;
#endif
}