bSupportsNanite

bSupportsNanite

#Overview

name: bSupportsNanite

The value of this variable can be defined or overridden in .ini config files. 6 .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 bSupportsNanite is to indicate whether the current shader platform supports Nanite, Unreal Engine 5’s virtualized geometry system.

This setting variable is primarily used within the RHI (Rendering Hardware Interface) subsystem 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 loaded from a configuration file or determined based on the capabilities of the current rendering hardware.

bSupportsNanite interacts with other rendering-related variables, such as bSupportsLumenGI, bSupportsSSDIndirect, and bSupportsTemporalHistoryUpscale. These variables collectively define the advanced rendering features available on a given platform.

Developers must be aware that this variable determines whether Nanite geometry can be used on a particular platform. If bSupportsNanite is false, Nanite features will not be available, and alternative rendering methods may need to be used.

Best practices when using this variable include:

  1. Checking its value before attempting to use Nanite features in your game or application.
  2. Providing fallback rendering options for platforms where Nanite is not supported.
  3. Using the GetSupportsNanite() function to query this value, rather than accessing the variable directly.
  4. Considering this variable when designing cross-platform applications to ensure compatibility and optimal performance across different hardware capabilities.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:61, section: [ShaderPlatform METAL_SM5]

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:101, section: [ShaderPlatform METAL_SM6]

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

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

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

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

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bSupportsUInt64ImageAtomics);
	GET_SECTION_BOOL_HELPER(bRequiresVendorExtensionsForAtomics);
	GET_SECTION_BOOL_HELPER(bSupportsNanite);
	GET_SECTION_BOOL_HELPER(bSupportsLumenGI);
	GET_SECTION_BOOL_HELPER(bSupportsSSDIndirect);
	GET_SECTION_BOOL_HELPER(bSupportsTemporalHistoryUpscale);
	GET_SECTION_BOOL_HELPER(bSupportsRTIndexFromVS);
	GET_SECTION_BOOL_HELPER(bSupportsIntrinsicWaveOnce);
	GET_SECTION_BOOL_HELPER(bSupportsConservativeRasterization);

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

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::UpdatePreviewPlatforms

Source code excerpt:


				// Settings that should be kept true if the runtime also supports it.
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsNanite);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsLumenGI);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsPrimitiveShaders);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsUInt64ImageAtomics);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsGen5TemporalAA);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsInlineRayTracing);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsRayTracingShaders);

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bSupportsUInt64ImageAtomics : 1;
	uint32 bRequiresVendorExtensionsForAtomics : 1;
	uint32 bSupportsNanite : 1;
	uint32 bSupportsLumenGI : 1;
	uint32 bSupportsSSDIndirect : 1;
	uint32 bSupportsTemporalHistoryUpscale : 1;
	uint32 bSupportsRTIndexFromVS : 1;
	uint32 bSupportsWaveOperations : int32(ERHIFeatureSupport::NumBits);
	uint32 bSupportsWavePermute : 1;

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsNanite

Source code excerpt:

	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsNanite;
	}

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsLumenGI(const FStaticShaderPlatform Platform)
	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsLumenGI;