bSupportsPercentageCloserShadows
bSupportsPercentageCloserShadows
#Overview
name: bSupportsPercentageCloserShadows
The value of this variable can be defined or overridden in .ini config files. 6
.ini config files referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bSupportsPercentageCloserShadows is to indicate whether a specific shader platform supports Percentage Closer Shadows (PCS), which is a technique used in rendering to improve the quality of shadow edges.
This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine 5. It’s part of the FGenericDataDrivenShaderPlatformInfo class, which provides information about various shader platform capabilities.
The value of this variable is set during the parsing of data-driven shader information, specifically in the ParseDataDrivenShaderInfo function within the DataDrivenShaderPlatformInfo.cpp file. It’s likely populated from a configuration file or platform-specific data.
This variable interacts with other shader platform capability flags in the FGenericDataDrivenShaderPlatformInfo class, such as bSupportsRGBColorBuffer, bSupportsCapsuleShadows, and bSupportsMSAA. These flags collectively define the features supported by a particular shader platform.
Developers must be aware that this variable is platform-specific and its value may vary depending on the target hardware. It’s crucial to check this flag before attempting to use Percentage Closer Shadows in rendering code to ensure compatibility across different platforms.
Best practices when using this variable include:
- Always use the GetSupportsPercentageCloserShadows() function to access its value, rather than directly accessing the member variable.
- Implement fallback rendering techniques for platforms that don’t support PCS.
- Consider the performance implications of using PCS on platforms where it’s supported, as it can be computationally expensive.
- Use this information in conjunction with other platform capabilities to make informed decisions about rendering techniques and quality settings in your game or application.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:49, section: [ShaderPlatform METAL_SM5]
- INI Section:
ShaderPlatform METAL_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:89, section: [ShaderPlatform METAL_SM6]
- INI Section:
ShaderPlatform METAL_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:36, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:163, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:68, section: [ShaderPlatform PCD3D_SM5]
- INI Section:
ShaderPlatform PCD3D_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:127, section: [ShaderPlatform PCD3D_SM6]
- INI Section:
ShaderPlatform PCD3D_SM6
- Raw value:
true
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:210
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
GET_SECTION_BOOL_HELPER(bSupportsRGBColorBuffer);
GET_SECTION_BOOL_HELPER(bSupportsCapsuleShadows);
GET_SECTION_BOOL_HELPER(bSupportsPercentageCloserShadows);
GET_SECTION_BOOL_HELPER(bSupportsIndexBufferUAVs);
GET_SECTION_BOOL_HELPER(bSupportsInstancedStereo);
GET_SECTION_SUPPORT_HELPER(SupportsMultiViewport);
GET_SECTION_BOOL_HELPER(bSupportsMSAA);
GET_SECTION_BOOL_HELPER(bSupports4ComponentUAVReadWrite);
GET_SECTION_BOOL_HELPER(bSupportsShaderRootConstants);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:36
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 bSupportsRGBColorBuffer : 1;
uint32 bSupportsCapsuleShadows : 1;
uint32 bSupportsPercentageCloserShadows : 1;
uint32 bSupportsIndexBufferUAVs : 1;
uint32 bSupportsInstancedStereo : 1;
uint32 SupportsMultiViewport : int32(ERHIFeatureSupport::NumBits);
uint32 bSupportsMSAA : 1;
uint32 bSupports4ComponentUAVReadWrite : 1;
uint32 bSupportsShaderRootConstants : 1;
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:275
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsPercentageCloserShadows
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsPercentageCloserShadows;
}
static FORCEINLINE_DEBUGGABLE const bool GetSupportsIndexBufferUAVs(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return Infos[Platform].bSupportsIndexBufferUAVs;