bSupportsDualSourceBlending
bSupportsDualSourceBlending
#Overview
name: bSupportsDualSourceBlending
The value of this variable can be defined or overridden in .ini config files. 13
.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 bSupportsDualSourceBlending is to indicate whether the current shader platform supports dual-source blending. This is a rendering feature that allows for more advanced blending operations in graphics rendering.
This setting variable is primarily used in the RHI (Rendering Hardware Interface) subsystem of Unreal Engine. It’s part of the FGenericDataDrivenShaderPlatformInfo class, which suggests it’s used to provide information about shader platform capabilities.
The value of this variable is set through data-driven configuration, likely loaded from a configuration file or determined at runtime based on the capabilities of the current rendering hardware. The ParseDataDrivenShaderInfo function in DataDrivenShaderPlatformInfo.cpp is responsible for parsing and setting this value.
This variable interacts with other shader platform capability flags in the FGenericDataDrivenShaderPlatformInfo class, such as bSupportsComputeFramework, bSupportsAnisotropicMaterials, and others. These flags collectively describe the features supported by a particular shader platform.
Developers must be aware that this variable’s value can vary depending on the target platform and hardware capabilities. It’s not a setting that can be arbitrarily changed, but rather reflects the actual capabilities of the rendering system.
Best practices when using this variable include:
- Always check its value before attempting to use dual-source blending in shaders or rendering code.
- Provide fallback rendering paths for platforms that don’t support dual-source blending.
- Use the GetSupportsDualSourceBlending() static function to query this capability, rather than accessing the variable directly.
- Consider the performance implications of dual-source blending, even on platforms that support it, as it can be a relatively expensive operation.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:91, section: [ShaderPlatform VULKAN_ES3_1_ANDROID]
- INI Section:
ShaderPlatform VULKAN_ES3_1_ANDROID
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:121, section: [ShaderPlatform VULKAN_SM5_ANDROID]
- INI Section:
ShaderPlatform VULKAN_SM5_ANDROID
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:53, section: [ShaderPlatform METAL_SM5]
- INI Section:
ShaderPlatform METAL_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:93, section: [ShaderPlatform METAL_SM6]
- INI Section:
ShaderPlatform METAL_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:122, section: [ShaderPlatform METAL_MRT_MAC]
- INI Section:
ShaderPlatform METAL_MRT_MAC
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:135, section: [ShaderPlatform METAL_MACES3_1]
- INI Section:
ShaderPlatform METAL_MACES3_1
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/TVOS/DataDrivenPlatformInfo.ini:28, section: [ShaderPlatform METAL_MRT_TVOS]
- INI Section:
ShaderPlatform METAL_MRT_TVOS
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:98, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:217, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:276, section: [ShaderPlatform VULKAN_PCES3_1]
- INI Section:
ShaderPlatform VULKAN_PCES3_1
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:75, section: [ShaderPlatform PCD3D_SM5]
- INI Section:
ShaderPlatform PCD3D_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:135, section: [ShaderPlatform PCD3D_SM6]
- INI Section:
ShaderPlatform PCD3D_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:161, section: [ShaderPlatform PCD3D_ES3_1]
- INI Section:
ShaderPlatform PCD3D_ES3_1
- 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:250
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
GET_SECTION_BOOL_HELPER(bSupportsComputeFramework);
GET_SECTION_BOOL_HELPER(bSupportsAnisotropicMaterials);
GET_SECTION_BOOL_HELPER(bSupportsDualSourceBlending);
GET_SECTION_BOOL_HELPER(bRequiresGeneratePrevTransformBuffer);
GET_SECTION_BOOL_HELPER(bRequiresRenderTargetDuringRaster);
GET_SECTION_BOOL_HELPER(bRequiresDisableForwardLocalLights);
GET_SECTION_BOOL_HELPER(bCompileSignalProcessingPipeline);
GET_SECTION_BOOL_HELPER(bSupportsMeshShadersTier0);
GET_SECTION_BOOL_HELPER(bSupportsMeshShadersTier1);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:74
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 bSupportsComputeFramework : 1;
uint32 bSupportsAnisotropicMaterials : 1;
uint32 bSupportsDualSourceBlending : 1;
uint32 bRequiresGeneratePrevTransformBuffer : 1;
uint32 bRequiresRenderTargetDuringRaster : 1;
uint32 bRequiresDisableForwardLocalLights : 1;
uint32 bCompileSignalProcessingPipeline : 1;
uint32 bSupportsMeshShadersTier0 : 1;
uint32 bSupportsMeshShadersTier1 : 1;
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:527
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsDualSourceBlending
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsDualSourceBlending;
}
static FORCEINLINE_DEBUGGABLE const bool GetRequiresGeneratePrevTransformBuffer(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return Infos[Platform].bRequiresGeneratePrevTransformBuffer;