bSupportsDiaphragmDOF
bSupportsDiaphragmDOF
#Overview
name: bSupportsDiaphragmDOF
The value of this variable can be defined or overridden in .ini config files. 8
.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 bSupportsDiaphragmDOF is to indicate whether a specific shader platform supports the Diaphragm Depth of Field (DOF) effect in Unreal Engine’s rendering system.
This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine. It is part of the FGenericDataDrivenShaderPlatformInfo class, which provides information about various capabilities of different shader platforms.
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 is likely populated from a configuration file or another data source that defines shader platform capabilities.
This variable interacts with other shader platform capability flags within the FGenericDataDrivenShaderPlatformInfo class, such as bSupportsArrayTextureCompression, bSupportsDistanceFields, and others. These flags collectively define the features supported by a particular shader platform.
Developers must be aware that this variable is platform-specific. Different rendering hardware or graphics APIs may have different support for Diaphragm DOF, so this flag helps the engine determine whether to enable or disable this feature based on the current platform.
Best practices when using this variable include:
- Always check this flag before attempting to use Diaphragm DOF in your rendering code.
- Provide fallback rendering methods for platforms that don’t support Diaphragm DOF.
- Use the provided static function GetSupportsDiaphragmDOF() to query this capability, rather than accessing the variable directly.
- Consider the performance implications of enabling Diaphragm DOF on platforms that support it, as it can be a computationally expensive effect.
- Ensure that your game’s minimum system requirements align with the platforms that support this feature if you plan to use it extensively in your game’s visuals.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:43, section: [ShaderPlatform METAL_SM5]
- INI Section:
ShaderPlatform METAL_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:83, section: [ShaderPlatform METAL_SM6]
- INI Section:
ShaderPlatform METAL_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:33, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:121, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:160, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:239, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:63, section: [ShaderPlatform PCD3D_SM5]
- INI Section:
ShaderPlatform PCD3D_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:112, 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:207
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
GET_SECTION_BOOL_HELPER(bSupportsArrayTextureCompression);
GET_SECTION_BOOL_HELPER(bSupportsDistanceFields);
GET_SECTION_BOOL_HELPER(bSupportsDiaphragmDOF);
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);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:33
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 bSupportsArrayTextureCompression : 1;
uint32 bSupportsDistanceFields : 1; // used for DFShadows and DFAO - since they had the same checks
uint32 bSupportsDiaphragmDOF : 1;
uint32 bSupportsRGBColorBuffer : 1;
uint32 bSupportsCapsuleShadows : 1;
uint32 bSupportsPercentageCloserShadows : 1;
uint32 bSupportsIndexBufferUAVs : 1;
uint32 bSupportsInstancedStereo : 1;
uint32 SupportsMultiViewport : int32(ERHIFeatureSupport::NumBits);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:257
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsDiaphragmDOF
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsDiaphragmDOF;
}
static FORCEINLINE_DEBUGGABLE const bool GetSupportsRGBColorBuffer(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return Infos[Platform].bSupportsRGBColorBuffer;