r.Translucent.UsesIESProfiles
r.Translucent.UsesIESProfiles
#Overview
name: r.Translucent.UsesIESProfiles
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable IES profiles support for translucent surfaces. When enabled, it will add an extrat sampler to the pixel shader (limited to 16 on dx11 based system)
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Translucent.UsesIESProfiles is to enable or disable IES (Illuminating Engineering Society) profile support for translucent surfaces in Unreal Engine’s rendering system.
This setting variable is primarily used by the rendering system, specifically for handling translucent materials and lighting. It’s part of the RenderCore module, which is a core component of Unreal Engine’s rendering pipeline.
The value of this variable is set through the console variable system in Unreal Engine. It’s initialized with a default value of 0 (disabled) and can be changed at runtime.
The associated variable CVarIESProfileTranslucent interacts directly with r.Translucent.UsesIESProfiles. It’s a TAutoConsoleVariable that stores the actual value of the setting.
Developers must be aware that enabling this feature will add an extra sampler to the pixel shader, which can impact performance, especially on systems with limited texture samplers (such as DX11-based systems, which are limited to 16 samplers).
Best practices for using this variable include:
- Only enable it when IES profile support for translucent surfaces is necessary for your project.
- Be mindful of the performance impact, especially on lower-end hardware.
- Test thoroughly after enabling to ensure it doesn’t negatively impact your game’s performance or visual quality.
Regarding the associated variable CVarIESProfileTranslucent:
Its purpose is to store and provide access to the value of r.Translucent.UsesIESProfiles within the engine’s C++ code.
This variable is used in the RenderCore module, specifically in the GetTranslucentUsesLightIESProfiles() function, which likely informs other parts of the rendering system whether IES profiles should be used for translucent surfaces.
The value of CVarIESProfileTranslucent is set when r.Translucent.UsesIESProfiles is modified through the console variable system.
Developers should be aware that this variable is marked as ECVF_ReadOnly and ECVF_RenderThreadSafe, meaning it can be safely read from any thread, but changing its value might require special considerations.
Best practices for using CVarIESProfileTranslucent include accessing its value through the provided GetTranslucentUsesLightIESProfiles() function rather than directly, as this function handles any necessary thread-safety concerns.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp:1678
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarIESProfileTranslucent(
TEXT("r.Translucent.UsesIESProfiles"),
0,
TEXT("Enable IES profiles support for translucent surfaces. When enabled, it will add an extrat sampler to the pixel shader (limited to 16 on dx11 based system)"),
ECVF_ReadOnly | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarHairStrandsUsesTriangleStrips(
TEXT("r.HairStrands.Strands.UseTriangleStrips"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarIESProfileTranslucent
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp:1677
Scope: file
Source code excerpt:
ECVF_ReadOnly | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarIESProfileTranslucent(
TEXT("r.Translucent.UsesIESProfiles"),
0,
TEXT("Enable IES profiles support for translucent surfaces. When enabled, it will add an extrat sampler to the pixel shader (limited to 16 on dx11 based system)"),
ECVF_ReadOnly | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarHairStrandsUsesTriangleStrips(
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp:1717
Scope (from outer to inner):
file
function bool GetTranslucentUsesLightIESProfiles
Source code excerpt:
bool GetTranslucentUsesLightIESProfiles()
{
return CVarIESProfileTranslucent.GetValueOnAnyThread() > 0;
}
bool GetHairStrandsUsesTriangleStrips()
{
return CVarHairStrandsUsesTriangleStrips.GetValueOnAnyThread() > 0;
}