bSupportsRayTracingShaders
bSupportsRayTracingShaders
#Overview
name: bSupportsRayTracingShaders
The value of this variable can be defined or overridden in .ini config files. 7
.ini config files referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bSupportsRayTracingShaders is to indicate whether a specific shader platform supports ray tracing shaders in Unreal Engine 5. This variable is part of the rendering system, specifically related to ray tracing capabilities.
Based on the callsites, this setting variable is primarily used in the RHI (Rendering Hardware Interface) module of Unreal Engine. It is a part of the FGenericDataDrivenShaderPlatformInfo class, which is responsible for managing shader platform information.
The value of this variable is set during the parsing of data-driven shader information, as seen in the ParseDataDrivenShaderInfo function. It is likely initialized from configuration files or platform-specific settings.
This variable interacts closely with other ray tracing-related variables, such as bSupportsRayTracing, bSupportsInlineRayTracing, and bSupportsRayTracingCallableShaders. It is often used in conjunction with bSupportsRayTracing to determine if a platform fully supports ray tracing shaders.
Developers must be aware that this variable is platform-specific and may not be supported on all hardware or rendering backends. It’s crucial to check for its support before attempting to use ray tracing shaders in your project.
Best practices when using this variable include:
- Always check for support using the GetSupportsRayTracingShaders function before enabling ray tracing shader features in your game.
- Consider providing fallback rendering methods for platforms that don’t support ray tracing shaders.
- Be mindful of performance implications when using ray tracing shaders, as they can be computationally expensive.
- Use this variable in conjunction with other ray tracing support flags to ensure full compatibility and optimal performance.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:111, section: [ShaderPlatform VULKAN_SM5_ANDROID]
- INI Section:
ShaderPlatform VULKAN_SM5_ANDROID
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:56, section: [ShaderPlatform METAL_SM5]
- INI Section:
ShaderPlatform METAL_SM5
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:96, section: [ShaderPlatform METAL_SM6]
- INI Section:
ShaderPlatform METAL_SM6
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:51, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:175, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:42, section: [ShaderPlatform PCD3D_SM5]
- INI Section:
ShaderPlatform PCD3D_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:93, 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:220
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
GET_SECTION_BOOL_HELPER(bSupportsRenderTargetWriteMask);
GET_SECTION_BOOL_HELPER(bSupportsRayTracing);
GET_SECTION_BOOL_HELPER(bSupportsRayTracingShaders);
GET_SECTION_BOOL_HELPER(bSupportsInlineRayTracing);
GET_SECTION_BOOL_HELPER(bSupportsRayTracingCallableShaders);
GET_SECTION_BOOL_HELPER(bSupportsRayTracingProceduralPrimitive);
GET_SECTION_BOOL_HELPER(bSupportsRayTracingTraversalStatistics);
GET_SECTION_BOOL_HELPER(bSupportsRayTracingIndirectInstanceData);
GET_SECTION_BOOL_HELPER(bSupportsPathTracing);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:463
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::UpdatePreviewPlatforms
Source code excerpt:
PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsGen5TemporalAA);
PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsInlineRayTracing);
PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsRayTracingShaders);
PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsMeshShadersTier0);
PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsMeshShadersTier1);
PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsMobileMultiView);
// Settings that need to match the runtime
PREVIEW_USE_RUNTIME_VALUE(bSupportsGPUScene);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:103
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 bSupportsFFTBloom : 1;
uint32 bSupportsInlineRayTracing : 1;
uint32 bSupportsRayTracingShaders : 1;
uint32 bSupportsVertexShaderLayer : 1;
uint32 BindlessSupport : int32(ERHIBindlessSupport::NumBits);
uint32 bSupportsVolumeTextureAtomics : 1;
uint32 bSupportsROV : 1;
uint32 bSupportsOIT : 1;
uint32 bSupportsRealTypes : int32(ERHIFeatureSupport::NumBits);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:347
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsRayTracingShaders
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsRayTracing && Infos[Platform].bSupportsRayTracingShaders;
}
static FORCEINLINE_DEBUGGABLE const bool GetSupportsInlineRayTracing(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return Infos[Platform].bSupportsRayTracing && Infos[Platform].bSupportsInlineRayTracing;