bSupportsOIT

bSupportsOIT

#Overview

name: bSupportsOIT

The value of this variable can be defined or overridden in .ini config files. 4 .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 bSupportsOIT is to indicate whether a specific shader platform supports Order-Independent Transparency (OIT). OIT is a rendering technique used to correctly render transparent objects without the need for depth sorting.

This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine 5. It’s part of the data-driven shader platform information system, which allows for flexible configuration of shader platform capabilities.

The value of this variable is set in the FGenericDataDrivenShaderPlatformInfo class, specifically in the ParseDataDrivenShaderInfo function. It’s likely populated from a configuration file or system that defines the capabilities of different shader platforms.

bSupportsOIT interacts with other shader platform capability flags, such as bSupportsVolumeTextureAtomics, bSupportsROV, and bSupportsRealTypes. These flags collectively define the features supported by a particular shader platform.

Developers should be aware that the support for OIT can significantly impact rendering performance and visual quality, especially in scenes with complex transparent objects. When using this variable, developers should consider the performance implications of enabling OIT on different platforms.

Best practices when using this variable include:

  1. Only enabling OIT on platforms that can handle its performance requirements.
  2. Testing thoroughly on all target platforms to ensure consistent rendering quality.
  3. Providing fallback rendering methods for platforms that don’t support OIT.
  4. Using the GetSupportsOIT() function to check for OIT support rather than accessing the variable directly, as this provides a consistent interface and allows for potential future changes in implementation.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:130, section: [ShaderPlatform VULKAN_SM5]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:248, section: [ShaderPlatform VULKAN_SM6]

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

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:131, 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:283

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bSupportsVolumeTextureAtomics);
	GET_SECTION_BOOL_HELPER(bSupportsROV);
	GET_SECTION_BOOL_HELPER(bSupportsOIT);
	GET_SECTION_SUPPORT_HELPER(bSupportsRealTypes);
	GET_SECTION_INT_HELPER(EnablesHLSL2021ByDefault);
	GET_SECTION_BOOL_HELPER(bSupportsSceneDataCompressedTransforms);
	GET_SECTION_BOOL_HELPER(bSupportsSwapchainUAVs);
	GET_SECTION_BOOL_HELPER(bSupportsClipDistance);
	GET_SECTION_BOOL_HELPER(bSupportsNNEShaders);

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bSupportsVolumeTextureAtomics : 1;
	uint32 bSupportsROV : 1;
	uint32 bSupportsOIT : 1;
	uint32 bSupportsRealTypes : int32(ERHIFeatureSupport::NumBits);
	uint32 EnablesHLSL2021ByDefault : 2; // 0: disabled, 1: global shaders only, 2: all shaders
	uint32 bSupportsSceneDataCompressedTransforms : 1;
	uint32 bIsPreviewPlatform : 1;
	uint32 bSupportsSwapchainUAVs : 1;
	uint32 bSupportsClipDistance : 1;

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsOIT

Source code excerpt:

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsOIT(const FStaticShaderPlatform Platform)
	{
		return Infos[Platform].bSupportsOIT;
	}

	static FORCEINLINE_DEBUGGABLE const bool GetIsPreviewPlatform(const FStaticShaderPlatform Platform)
	{
		return Infos[Platform].bIsPreviewPlatform;
	}