bSupportsRayTracingProceduralPrimitive

bSupportsRayTracingProceduralPrimitive

#Overview

name: bSupportsRayTracingProceduralPrimitive

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 bSupportsRayTracingProceduralPrimitive is to indicate whether a specific shader platform supports ray tracing for procedural primitives. This setting is part of Unreal Engine’s ray tracing system, which is a key component of its rendering capabilities.

This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine. It’s specifically 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 in the ParseDataDrivenShaderInfo function, which reads configuration data from a config section. This suggests that the value can be customized for different platforms through configuration files.

bSupportsRayTracingProceduralPrimitive interacts closely with other ray tracing related variables, such as bSupportsRayTracing, bSupportsRayTracingCallableShaders, and bSupportsHighEndRayTracingEffects. It’s part of a broader set of flags that define the ray tracing capabilities of a platform.

Developers must be aware that this variable is dependent on the general ray tracing support (bSupportsRayTracing). The GetSupportsRayTracingProceduralPrimitive function checks both bSupportsRayTracing and bSupportsRayTracingProceduralPrimitive, indicating that general ray tracing support is a prerequisite for procedural primitive support.

Best practices when using this variable include:

  1. Ensure that the platform supports ray tracing in general before relying on procedural primitive support.
  2. Use the provided GetSupportsRayTracingProceduralPrimitive function to check for support, rather than accessing the variable directly.
  3. Be prepared to provide alternative rendering methods for platforms that don’t support ray tracing procedural primitives.
  4. Consider the performance implications of using procedural primitives in ray tracing, as they may be more computationally expensive than traditional primitives.
  5. Keep in mind that this is part of a data-driven system, so its value can potentially be configured differently for different platforms or builds.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:45, section: [ShaderPlatform PCD3D_SM5]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:96, section: [ShaderPlatform PCD3D_SM6]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:223

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	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);
	GET_SECTION_BOOL_HELPER(bSupportsGPUScene);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:47

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	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;
	uint32 bSupportsByteBufferComputeShaders : 1;

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:365

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsRayTracingProceduralPrimitive

Source code excerpt:

	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsRayTracing && Infos[Platform].bSupportsRayTracingProceduralPrimitive;
	}

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsRayTracingTraversalStatistics(const FStaticShaderPlatform Platform)
	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsRayTracing && Infos[Platform].bSupportsRayTracingTraversalStatistics;