bSupportsRayTracingCallableShaders
bSupportsRayTracingCallableShaders
#Overview
name: bSupportsRayTracingCallableShaders
The value of this variable can be defined or overridden in .ini config files. 2
.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 bSupportsRayTracingCallableShaders is to indicate whether a specific shader platform supports callable shaders in ray tracing. This setting is part of Unreal Engine’s ray tracing system, which is a key feature of the rendering subsystem.
This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine. It’s part of the data-driven shader platform information system, which allows for flexible configuration of shader capabilities across different platforms.
The value of this variable is set through the data-driven shader platform information system. It’s parsed from a configuration section in the DataDrivenShaderPlatformInfo.cpp file, suggesting that it can be configured externally, possibly through engine configuration files.
bSupportsRayTracingCallableShaders interacts closely with other ray tracing related variables, particularly bSupportsRayTracing. The GetSupportsRayTracingCallableShaders function checks both bSupportsRayTracing and bSupportsRayTracingCallableShaders to determine if callable shaders are supported for ray tracing.
Developers must be aware that this variable is platform-specific. Its value can differ across different rendering platforms, so code that uses ray tracing callable shaders should always check for support using the provided getter function (GetSupportsRayTracingCallableShaders) rather than assuming availability.
Best practices when using this variable include:
- Always check for support using the provided getter function before attempting to use ray tracing callable shaders.
- Be prepared to provide alternative rendering techniques for platforms that don’t support this feature.
- Consider the performance implications of using callable shaders in ray tracing, as they can impact rendering speed.
- Keep in mind that this is part of a larger ray tracing feature set, and other ray tracing capabilities should also be checked when implementing advanced rendering techniques.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:44, section: [ShaderPlatform PCD3D_SM5]
- INI Section:
ShaderPlatform PCD3D_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:95, 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:222
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
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);
GET_SECTION_BOOL_HELPER(bSupportsHighEndRayTracingEffects);
GET_SECTION_BOOL_HELPER(bSupportsByteBufferComputeShaders);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:46
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 bSupportsRenderTargetWriteMask : 1;
uint32 bSupportsRayTracing : 1;
uint32 bSupportsRayTracingCallableShaders : 1;
uint32 bSupportsRayTracingProceduralPrimitive : 1;
uint32 bSupportsRayTracingTraversalStatistics : 1;
uint32 bSupportsRayTracingIndirectInstanceData : 1; // Whether instance transforms can be copied from the GPU to the TLAS instances buffer
uint32 bSupportsHighEndRayTracingEffects : 1; // Whether fully-featured RT effects can be used on the platform (with translucent shadow, etc.)
uint32 bSupportsPathTracing : 1; // Whether real-time path tracer is supported on this platform (avoids compiling unnecessary shaders)
uint32 bSupportsGPUScene : 1;
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:359
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsRayTracingCallableShaders
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsRayTracing && Infos[Platform].bSupportsRayTracingCallableShaders;
}
static FORCEINLINE_DEBUGGABLE const bool GetSupportsRayTracingProceduralPrimitive(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return Infos[Platform].bSupportsRayTracing && Infos[Platform].bSupportsRayTracingProceduralPrimitive;