UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RenderUtils.cpp File Reference
#include "RenderUtils.h"
#include "Containers/DynamicRHIResourceArray.h"
#include "Containers/StaticBitArray.h"
#include "DataDrivenShaderPlatformInfo.h"
#include "Misc/ConfigCacheIni.h"
#include "Misc/CoreMisc.h"
#include "Misc/DataDrivenPlatformInfoRegistry.h"
#include "PackedNormal.h"
#include "PipelineStateCache.h"
#include "RenderResource.h"
#include "RHI.h"
#include "RHIResourceUtils.h"
#include "Shader.h"
#include "ShaderPlatformCachedIniValue.h"
#include "RenderCore.h"
#include "SubstrateDefinitions.h"
#include "Animation/MeshDeformerProvider.h"
#include "Interfaces/ITargetPlatform.h"

Classes

class  FVector4VertexDeclaration
 
class  FVector3VertexDeclaration
 
class  FVector2VertexDeclaration
 
class  FUnitCubeVertexBuffer
 
class  FUnitCubeIndexBuffer
 

Namespaces

namespace  Substrate
 

Typedefs

using ShaderPlatformMaskType = TStaticBitArray< EShaderPlatform::SP_NumPlatforms >
 

Functions

FAutoConsoleVariableRef CVarAllowNanite (TEXT("r.Nanite.ProjectEnabled"), GNaniteProjectEnabled, TEXT("This setting allows you to disable Nanite on platforms that support it to reduce the number of shaders. It cannot be used to force Nanite on on unsupported platforms.\n"), ECVF_ReadOnly|ECVF_RenderThreadSafe)
 
FAutoConsoleVariableRef CVarAllowTranslucencyShadowsInProject (TEXT("r.Shadow.TranslucentPerObject.ProjectEnabled"), GAllowTranslucencyShadowsInProject, TEXT("Enable/Disable translucency shadows on a per-project basis. Turning off can significantly reduce the number of permutations if your project has many translucent materials.\n"), ECVF_ReadOnly|ECVF_RenderThreadSafe)
 
FArchiveoperator<< (FArchive &Ar, FDeprecatedSerializedPackedNormal &N)
 
FArchiveoperator<< (FArchive &Ar, FPackedNormal &N)
 
FArchiveoperator<< (FArchive &Ar, FPackedRGBA16N &N)
 
FArchiveoperator<< (FArchive &Ar, FPackedPosition &N)
 
void CalcMipMapExtent3D (uint32 TextureSizeX, uint32 TextureSizeY, uint32 TextureSizeZ, EPixelFormat Format, uint32 MipIndex, uint32 &OutXExtent, uint32 &OutYExtent, uint32 &OutZExtent)
 
SIZE_T CalcTextureMipMapSize3D (uint32 TextureSizeX, uint32 TextureSizeY, uint32 TextureSizeZ, EPixelFormat Format, uint32 MipIndex)
 
SIZE_T CalcTextureSize3D (uint32 SizeX, uint32 SizeY, uint32 SizeZ, EPixelFormat Format, uint32 MipCount)
 
FIntPoint CalcMipMapExtent (uint32 TextureSizeX, uint32 TextureSizeY, EPixelFormat Format, uint32 MipIndex)
 
SIZE_T CalcTextureMipMapSize (uint32 TextureSizeX, uint32 TextureSizeY, EPixelFormat Format, uint32 MipIndex)
 
SIZE_T CalcTextureSize (uint32 SizeX, uint32 SizeY, EPixelFormat Format, uint32 MipCount)
 
void CopyTextureData2D (const void *Source, void *Dest, uint32 SizeY, EPixelFormat Format, uint32 SourceStride, uint32 DestStride)
 
EPixelFormatChannelFlags GetPixelFormatValidChannels (EPixelFormat InPixelFormat)
 
const TCHARGetCubeFaceName (ECubeFace Face)
 
ECubeFace GetCubeFaceFromName (const FString &Name)
 
RENDERCORE_API FVertexDeclarationRHIRefGetVertexDeclarationFVector4 ()
 
RENDERCORE_API FVertexDeclarationRHIRefGetVertexDeclarationFVector3 ()
 
RENDERCORE_API FVertexDeclarationRHIRefGetVertexDeclarationFVector2 ()
 
RENDERCORE_API bool PlatformGPUSceneUsesUniformBufferView (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool MobileAllowFramebufferFetch (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool MobileRequiresSceneDepthAux (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool SupportsTextureCubeArray (ERHIFeatureLevel::Type FeatureLevel)
 
RENDERCORE_API bool MaskedInEarlyPass (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool AllowPixelDepthOffset (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool AllowPerPixelShadingModels (const FStaticShaderPlatform Platform)
 
RENDERCORE_API uint32 GetPlatformShadingModelsMask (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool IsMobileAmbientOcclusionEnabled (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool AreMobileScreenSpaceReflectionsEnabled (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool IsMobileDistanceFieldEnabled (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool IsMobileMovableSpotlightShadowsEnabled (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool IsMobileCapsuleShadowsEnabled (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool IsMobileCapsuleDirectShadowsEnabled (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool MobileForwardEnableClusteredReflections (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool MobileUsesShadowMaskTexture (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool MobileUsesExtenedGBuffer (FStaticShaderPlatform ShaderPlatform)
 
RENDERCORE_API bool MobileUsesGBufferCustomData (FStaticShaderPlatform ShaderPlatform)
 
RENDERCORE_API bool MobileBasePassAlwaysUsesCSM (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool MobileUsesFullDepthPrepass (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool MobileSupportsSM5MaterialNodes (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool ShouldForceFullDepthPass (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool SupportsGen4TAA (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool SupportsTSR (const FStaticShaderPlatform Platform)
 
EShaderPlatform GetEditorShaderPlatform (EShaderPlatform ShaderPlatform)
 
RENDERCORE_API void RenderUtilsInit ()
 
RENDERCORE_API FBufferRHIRefGetUnitCubeVertexBuffer ()
 
RENDERCORE_API FBufferRHIRefGetUnitCubeIndexBuffer ()
 
RENDERCORE_API void QuantizeSceneBufferSize (const FIntPoint &InBufferSize, FIntPoint &OutBufferSize, const uint32 SuggestedDivisor)
 
RENDERCORE_API bool UseVirtualTexturing (const FStaticShaderPlatform InShaderPlatform)
 
RENDERCORE_API bool UseVirtualTexturing (const ITargetPlatformSettings *InTargetPlatform)
 
RENDERCORE_API bool UseVirtualTexturing (const FStaticShaderPlatform InShaderPlatform, const ITargetPlatformSettings *InTargetPlatform)
 
RENDERCORE_API bool UseVirtualTextureLightmap (const FStaticShaderPlatform InShaderPlatform, const ITargetPlatformSettings *TargetPlatform)
 
RENDERCORE_API bool UseNaniteLandscapeMesh (EShaderPlatform ShaderPlatform)
 
RENDERCORE_API bool UseShaderPipelines (EShaderPlatform ShaderPlatform)
 
RENDERCORE_API bool UseRemoveUnsedInterpolators (EShaderPlatform ShaderPlatform)
 
RENDERCORE_API bool ExcludeNonPipelinedShaderTypes (EShaderPlatform ShaderPlatform)
 
RENDERCORE_API bool PlatformSupportsVelocityRendering (const FStaticShaderPlatform Platform)
 
bool DoesPlatformSupportNanite (EShaderPlatform Platform, bool bCheckForProjectSetting)
 
bool NaniteAtomicsSupported ()
 
bool NaniteWorkGraphMaterialsSupported ()
 
bool UseNaniteFastTileClear ()
 
bool NaniteSplineMeshesSupported ()
 
bool NaniteSkinnedMeshesSupported ()
 
bool NaniteAssembliesSupported ()
 
bool NaniteVoxelsSupported ()
 
bool UseNaniteTessellation ()
 
bool DoesRuntimeSupportNanite (EShaderPlatform ShaderPlatform, bool bCheckForAtomicSupport, bool bCheckForProjectSetting)
 
bool DoesTargetPlatformSupportNanite (const ITargetPlatform *TargetPlatform)
 
bool UseNanite (EShaderPlatform ShaderPlatform, bool bCheckForAtomicSupport, bool bCheckForProjectSetting)
 
bool AreNaniteFallbackMeshesEnabledForPlatform (const FStaticShaderPlatform Platform)
 
bool UseVirtualShadowMaps (EShaderPlatform ShaderPlatform)
 
bool UseVirtualShadowMaps (EShaderPlatform ShaderPlatform, const FStaticFeatureLevel FeatureLevel)
 
bool DoesPlatformSupportVirtualShadowMaps (EShaderPlatform Platform)
 
bool DoesPlatformSupportNonNaniteVirtualShadowMaps (EShaderPlatform ShaderPlatform)
 
bool UseNonNaniteVirtualShadowMaps (EShaderPlatform ShaderPlatform, const FStaticFeatureLevel FeatureLevel)
 
bool IsWaterVirtualShadowMapFilteringEnabled (const FStaticShaderPlatform Platform)
 
bool DoesRuntimeSupportHeterogeneousVolumes (EShaderPlatform Platform)
 
bool DoesPlatformSupportHeterogeneousVolumes (EShaderPlatform Platform)
 
bool DoesPlatformSupportSparseVolumeTextures (EShaderPlatform Platform)
 
bool UseSparseVolumeTextures (EShaderPlatform Platform)
 
bool IsSingleLayerWaterDepthPrepassEnabled (const FStaticShaderPlatform Platform, const FStaticFeatureLevel FeatureLevel)
 
RENDERCORE_API bool IsUsingDBuffers (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool AreSkinCacheShadersEnabled (EShaderPlatform Platform)
 
RENDERCORE_API bool IsGPUSkinCacheAllowed (EShaderPlatform Platform)
 
RENDERCORE_API bool IsGPUSkinCacheAvailable (EShaderPlatform Platform)
 
RENDERCORE_API bool IsGPUSkinPassThroughSupported (EShaderPlatform Platform)
 
RENDERCORE_API bool AreBufferSRVsAlwaysCreatedByDefault (EShaderPlatform ShaderPlatform)
 
RENDERCORE_API bool DoesRuntimeSupportOnePassPointLightShadows (EShaderPlatform Platform)
 
bool IsForwardShadingEnabled (const FStaticShaderPlatform Platform)
 
bool IsUsingGBuffers (const FStaticShaderPlatform Platform)
 
bool IsUsingBasePassVelocity (const FStaticShaderPlatform Platform)
 
bool IsUsingSelectiveBasePassOutputs (const FStaticShaderPlatform Platform)
 
bool IsUsingDistanceFields (const FStaticShaderPlatform Platform)
 
bool IsWaterDistanceFieldShadowEnabled (const FStaticShaderPlatform Platform)
 
bool IsWaterSeparateMainDirLightEnabled (const FStaticShaderPlatform Platform)
 
bool IsMobileDistanceFieldAOEnabled (const FStaticShaderPlatform Platform)
 
bool IsStencilForLODDitherEnabled (const FStaticShaderPlatform Platform)
 
int32 GetMaterialShadingPathNodeOverride (const FStaticShaderPlatform Platform)
 
bool UseGPUScene (const FStaticShaderPlatform Platform, const FStaticFeatureLevel FeatureLevel)
 
bool UseGPUScene (const FStaticShaderPlatform Platform)
 
bool ForceSimpleSkyDiffuse (const FStaticShaderPlatform Platform)
 
bool VelocityEncodeDepth (const FStaticShaderPlatform Platform)
 
bool VelocityEncodeHasPixelAnimation (const FStaticShaderPlatform Platform)
 
bool VelocitySupportsTemporalResponsiveness (const FStaticShaderPlatform Platform)
 
bool VelocitySupportsPixelShaderMotionVectorWorldOffset (const FStaticShaderPlatform Platform)
 
bool PlatformSupportsOpenXRMotionVectors (const FStaticShaderPlatform Platform)
 
bool VelocityIncludeStationaryPrimitives (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool AllowTranslucencyPerObjectShadows (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool Allow128BitBasePassPSCompilation (const FStaticShaderPlatform Platform)
 
RENDERCORE_API bool ShouldGenerateRayTracingProxiesByDefault ()
 
bool PlatformRequires128bitRT (EPixelFormat PixelFormat)
 
bool IsRayTracingEnabledForProject (EShaderPlatform ShaderPlatform)
 
bool AreRayTracingShadersEnabledForProject (EShaderPlatform ShaderPlatform)
 
bool ShouldCompileRayTracingShadersForProject (EShaderPlatform ShaderPlatform)
 
bool ShouldCompileRayTracingCallableShadersForProject (EShaderPlatform ShaderPlatform)
 
bool IsRayTracingEnabled ()
 
bool IsRayTracingAllowed ()
 
bool IsRayTracingEnabled (EShaderPlatform ShaderPlatform)
 
ERayTracingMode GetRayTracingMode ()
 
bool IsRayTracingUsingReferenceBasedResidency ()
 
bool IsRayTracingEnableOnDemandSupported ()
 
bool UseSplineMeshSceneResources (const FStaticShaderPlatform Platform)
 
bool RenderRectLightsAsSpotLights (const FStaticFeatureLevel FeatureLevel)
 
int32 GetLightFunctionAtlasFormat ()
 
bool GetSingleLayerWaterUsesLightFunctionAtlas ()
 
bool GetTranslucentUsesLightFunctionAtlas ()
 
bool GetTranslucentUsesLightRectLights ()
 
bool GetTranslucentUsesShadowedLocalLights ()
 
bool GetTranslucentUsesLightIESProfiles ()
 
bool GetHairStrandsUsesTriangleStrips ()
 
uint32 GetHairStrandsLODMode ()
 
bool Substrate::IsSubstrateEnabled ()
 
bool Substrate::IsSubstrateBlendableGBufferEnabled (EShaderPlatform InPlatform)
 
bool Substrate::IsStochasticLightingEnabled (EShaderPlatform InPlatform)
 
uint32 Substrate::GetBytePerPixel (EShaderPlatform InPlatform)
 
uint32 Substrate::GetClosurePerPixel (EShaderPlatform InPlatform)
 
uint32 Substrate::GetNormalQuality ()
 
uint32 Substrate::GetRayTracingMaterialPayloadSizeInBytes (bool bFullySimplifiedMaterial)
 
bool Substrate::IsRoughDiffuseEnabled ()
 
bool Substrate::IsRoughDiffuseEnabled (EShaderPlatform InPlatform)
 
bool Substrate::IsGlintEnabled ()
 
bool Substrate::IsGlintEnabled (EShaderPlatform InPlatform)
 
uint32 Substrate::GlintLUTIndex ()
 
float Substrate::GlintLevelBias ()
 
float Substrate::GlintLevelMin ()
 
bool Substrate::IsSpecularProfileEnabled ()
 
bool Substrate::IsSpecularProfileEnabled (EShaderPlatform InPlatform)
 
uint32 Substrate::GetSheenQuality ()
 
uint32 Substrate::GetSheenQuality (EShaderPlatform InPlatform)
 
uint32 Substrate::GetShadingQuality ()
 
uint32 Substrate::GetShadingQuality (EShaderPlatform InPlatform)
 
bool Substrate::IsDBufferPassEnabled (EShaderPlatform InPlatform)
 
bool Substrate::IsOpaqueRoughRefractionEnabled (EShaderPlatform InPlatform)
 
bool Substrate::IsAdvancedVisualizationEnabled ()
 
bool Substrate::IsAdvancedVisualizationEnabled (EShaderPlatform InPlatform)
 
bool Substrate::IsMaterialLayeringSupportEnabled ()
 
bool Substrate::IsHiddenMaterialAssetConversionEnabled ()
 
bool Substrate::AreLightingPassesTiled ()
 
bool HasFirstPersonGBufferBit (EShaderPlatform ShaderPlatform)
 
bool DoesProjectSupportLumenGI (EShaderPlatform Platform)
 
bool DoesPlatformSupportLumenGI (EShaderPlatform Platform, bool bSkipProjectCheck)
 
bool DoesProjectSupportLumenRayTracedTranslucentRefraction ()
 
bool ForwardShadingForcesSkyLightCubemapBlending (const FStaticShaderPlatform Platform)
 
bool HardwareVariableRateShadingSupportedByPlatform (EShaderPlatform ShaderPlatform)
 
bool DoesProjectSupportExpFogMatchesVolumetricFog ()
 

Variables

int32 GNaniteProjectEnabled = 1
 
int32 GAllowTranslucencyShadowsInProject = 0
 
const uint16 GCubeIndices [12 *3]
 
TGlobalResource< FVector4VertexDeclarationFVector4VertexDeclaration
 
TGlobalResource< FVector3VertexDeclarationGVector3VertexDeclaration
 
TGlobalResource< FVector2VertexDeclarationGVector2VertexDeclaration
 
RENDERCORE_API int32 GUseForwardShading = 0
 
RENDERCORE_API ShaderPlatformMaskType GForwardShadingPlatformMask
 
RENDERCORE_API ShaderPlatformMaskType GDBufferPlatformMask
 
RENDERCORE_API ShaderPlatformMaskType GVelocityEncodeDepthPlatformMask
 
RENDERCORE_API ShaderPlatformMaskType GSelectiveBasePassOutputsPlatformMask
 
RENDERCORE_API ShaderPlatformMaskType GNaniteFallbackMeshesPlatformMask
 
RENDERCORE_API ShaderPlatformMaskType GDistanceFieldsPlatformMask
 
RENDERCORE_API ShaderPlatformMaskType GSimpleSkyDiffusePlatformMask
 
RENDERCORE_API ShaderPlatformMaskType GRayTracingPlatformMask
 
RENDERCORE_API ShaderPlatformMaskType GRayTracingShadersPlatformMask
 
RENDERCORE_API ERayTracingMode GRayTracingMode = ERayTracingMode::Disabled
 

Typedef Documentation

◆ ShaderPlatformMaskType

Function Documentation

◆ Allow128BitBasePassPSCompilation()

RENDERCORE_API bool Allow128BitBasePassPSCompilation ( const FStaticShaderPlatform  Platform)

Read-only switch to check if compiling explicit 128BitRT BasePass Pixel Shaders is allowed They are infrequently necessary, and can save 50k shaders / 15 MiB / platform on large projects Check bRequiresExplicit128bitRT in a platform's DataDrivenPlatformInfo.ini to see if that platform requires explicit 128Bit shaders

◆ AllowPerPixelShadingModels()

RENDERCORE_API bool AllowPerPixelShadingModels ( const FStaticShaderPlatform  Platform)

◆ AllowPixelDepthOffset()

RENDERCORE_API bool AllowPixelDepthOffset ( const FStaticShaderPlatform  Platform)

◆ AllowTranslucencyPerObjectShadows()

RENDERCORE_API bool AllowTranslucencyPerObjectShadows ( const FStaticShaderPlatform  Platform)

Read-only switch to check if translucency per object shadows are enabled.

◆ AreBufferSRVsAlwaysCreatedByDefault()

RENDERCORE_API bool AreBufferSRVsAlwaysCreatedByDefault ( EShaderPlatform  ShaderPlatform)

Returns true if we need to create SRVs for all index/vertex buffers. This has a memory overhead for the RHI objects so we only return true if the platform or project settings require this.

◆ AreMobileScreenSpaceReflectionsEnabled()

RENDERCORE_API bool AreMobileScreenSpaceReflectionsEnabled ( const FStaticShaderPlatform  Platform)

◆ AreNaniteFallbackMeshesEnabledForPlatform()

bool AreNaniteFallbackMeshesEnabledForPlatform ( const FStaticShaderPlatform  Platform)

Returns true if Nanite Fallback Meshes are enabled for the given shader platform.

◆ AreRayTracingShadersEnabledForProject()

bool AreRayTracingShadersEnabledForProject ( EShaderPlatform  ShaderPlatform)

◆ AreSkinCacheShadersEnabled()

RENDERCORE_API bool AreSkinCacheShadersEnabled ( EShaderPlatform  Platform)

Checks if skin cache shaders are enabled for the platform (via r.SkinCache.CompileShaders)

◆ CalcMipMapExtent()

FIntPoint CalcMipMapExtent ( uint32  TextureSizeX,
uint32  TextureSizeY,
EPixelFormat  Format,
uint32  MipIndex 
)

Calculates the extent of a mip.

Incorrectly forces min mip size to be block dimensions: UE-159189

Parameters
TextureSizeXNumber of horizontal texels (for the base mip-level)
TextureSizeYNumber of vertical texels (for the base mip-level)
FormatTexture format
MipIndexThe index of the mip-map to compute the size of.

◆ CalcMipMapExtent3D()

void CalcMipMapExtent3D ( uint32  TextureSizeX,
uint32  TextureSizeY,
uint32  TextureSizeZ,
EPixelFormat  Format,
uint32  MipIndex,
uint32 OutXExtent,
uint32 OutYExtent,
uint32 OutZExtent 
)

Calculates the extent of a mip.

Incorrectly forces min mip size to be block dimensions: UE-159189

Parameters
TextureSizeXNumber of horizontal texels (for the base mip-level)
TextureSizeYNumber of vertical texels (for the base mip-level)
TextureSizeZNumber of depth texels (for the base mip-level)
FormatTexture format
MipIndexThe index of the mip-map to compute the size of.
OutXExtentThe extent X of the mip
OutYExtentThe extent Y of the mip
OutZExtentThe extent Z of the mip

◆ CalcTextureMipMapSize()

SIZE_T CalcTextureMipMapSize ( uint32  TextureSizeX,
uint32  TextureSizeY,
EPixelFormat  Format,
uint32  MipIndex 
)

Calculates the amount of memory used for a single mip-map of a texture.

Use GPixelFormats[Format].Get2DTextureMipSizeInBytes() instead.

Parameters
TextureSizeXNumber of horizontal texels (for the base mip-level)
TextureSizeYNumber of vertical texels (for the base mip-level)
FormatTexture format
MipIndexThe index of the mip-map to compute the size of.

◆ CalcTextureMipMapSize3D()

SIZE_T CalcTextureMipMapSize3D ( uint32  TextureSizeX,
uint32  TextureSizeY,
uint32  TextureSizeZ,
EPixelFormat  Format,
uint32  MipIndex 
)

Calculates the amount of memory used for a single mip-map of a texture 3D.

Use GPixelFormats[Format].Get3DTextureMipSizeInBytes() instead.

Parameters
TextureSizeXNumber of horizontal texels (for the base mip-level)
TextureSizeYNumber of vertical texels (for the base mip-level)
TextureSizeZNumber of slices (for the base mip-level)
FormatTexture format
MipIndexThe index of the mip-map to compute the size of.

◆ CalcTextureSize()

SIZE_T CalcTextureSize ( uint32  SizeX,
uint32  SizeY,
EPixelFormat  Format,
uint32  MipCount 
)

Calculates the amount of memory used for a texture.

Use GPixelFormats[Format].Get2DTextureSizeInBytes() instead.

Parameters
SizeXNumber of horizontal texels (for the base mip-level)
SizeYNumber of vertical texels (for the base mip-level)
FormatTexture format
MipCountNumber of mip-levels (including the base mip-level)

◆ CalcTextureSize3D()

SIZE_T CalcTextureSize3D ( uint32  SizeX,
uint32  SizeY,
uint32  SizeZ,
EPixelFormat  Format,
uint32  MipCount 
)

Calculates the amount of memory used for a texture.

Use GPixelFormats[Format].Get3DTextureSizeInBytes() instead.

Parameters
SizeXNumber of horizontal texels (for the base mip-level)
SizeYNumber of vertical texels (for the base mip-level)
SizeYNumber of depth texels (for the base mip-level)
FormatTexture format
MipCountNumber of mip-levels (including the base mip-level)

◆ CopyTextureData2D()

void CopyTextureData2D ( const void Source,
void Dest,
uint32  SizeY,
EPixelFormat  Format,
uint32  SourceStride,
uint32  DestStride 
)

Copies the data for a 2D texture between two buffers with potentially different strides.

Parameters
Source- The source buffer
Dest- The destination buffer.
SizeY- The height of the texture data to copy in pixels.
Format- The format of the texture being copied.
SourceStride- The stride of the source buffer.
DestStride- The stride of the destination buffer.

◆ CVarAllowNanite()

FAutoConsoleVariableRef CVarAllowNanite ( TEXT("r.Nanite.ProjectEnabled")  ,
GNaniteProjectEnabled  ,
TEXT("This setting allows you to disable Nanite on platforms that support it to reduce the number of shaders. It cannot be used to force Nanite on on unsupported platforms.\n" ,
ECVF_ReadOnly ECVF_RenderThreadSafe 
)

◆ CVarAllowTranslucencyShadowsInProject()

FAutoConsoleVariableRef CVarAllowTranslucencyShadowsInProject ( TEXT("r.Shadow.TranslucentPerObject.ProjectEnabled")  ,
GAllowTranslucencyShadowsInProject  ,
TEXT("Enable/Disable translucency shadows on a per-project basis. Turning off can significantly reduce the number of permutations if your project has many translucent materials.\n" ,
ECVF_ReadOnly ECVF_RenderThreadSafe 
)

◆ DoesPlatformSupportHeterogeneousVolumes()

bool DoesPlatformSupportHeterogeneousVolumes ( EShaderPlatform  Platform)

Returns true if Heterogeneous Volumes should be used for the given shader platform.

◆ DoesPlatformSupportLumenGI()

bool DoesPlatformSupportLumenGI ( EShaderPlatform  Platform,
bool  bSkipProjectCheck 
)

◆ DoesPlatformSupportNanite()

bool DoesPlatformSupportNanite ( EShaderPlatform  Platform,
bool  bCheckForProjectSetting 
)

◆ DoesPlatformSupportNonNaniteVirtualShadowMaps()

bool DoesPlatformSupportNonNaniteVirtualShadowMaps ( EShaderPlatform  ShaderPlatform)

Returns true if non-Nanite virtual shadow maps are enabled by CVar r.Shadow.Virtual.NonNaniteVSM and the runtime supports Nanite/virtual shadow maps.

◆ DoesPlatformSupportSparseVolumeTextures()

bool DoesPlatformSupportSparseVolumeTextures ( EShaderPlatform  Platform)

Returns true if SparseVolumeTextures are supported on the given shader platform.

◆ DoesPlatformSupportVirtualShadowMaps()

bool DoesPlatformSupportVirtualShadowMaps ( EShaderPlatform  Platform)

Returns true if Virtual Shadow Mapsare supported for the given shader platform. Note: Virtual Shadow Maps require Nanite platform support.

◆ DoesProjectSupportExpFogMatchesVolumetricFog()

bool DoesProjectSupportExpFogMatchesVolumetricFog ( )

◆ DoesProjectSupportLumenGI()

bool DoesProjectSupportLumenGI ( EShaderPlatform  Platform)

◆ DoesProjectSupportLumenRayTracedTranslucentRefraction()

bool DoesProjectSupportLumenRayTracedTranslucentRefraction ( )

◆ DoesRuntimeSupportHeterogeneousVolumes()

bool DoesRuntimeSupportHeterogeneousVolumes ( EShaderPlatform  Platform)

◆ DoesRuntimeSupportNanite()

bool DoesRuntimeSupportNanite ( EShaderPlatform  ShaderPlatform,
bool  bCheckForAtomicSupport,
bool  bCheckForProjectSetting 
)

◆ DoesRuntimeSupportOnePassPointLightShadows()

RENDERCORE_API bool DoesRuntimeSupportOnePassPointLightShadows ( EShaderPlatform  Platform)

◆ DoesTargetPlatformSupportNanite()

bool DoesTargetPlatformSupportNanite ( const ITargetPlatform TargetPlatform)

◆ ExcludeNonPipelinedShaderTypes()

RENDERCORE_API bool ExcludeNonPipelinedShaderTypes ( EShaderPlatform  ShaderPlatform)

Checks if the non-pipeline shaders will not be compild and ones from FShaderPipeline used instead.

◆ ForceSimpleSkyDiffuse()

bool ForceSimpleSkyDiffuse ( const FStaticShaderPlatform  Platform)

◆ ForwardShadingForcesSkyLightCubemapBlending()

bool ForwardShadingForcesSkyLightCubemapBlending ( const FStaticShaderPlatform  Platform)

Return true if all forward shaded material should blend the interpolated sky boxes for higher quality.

◆ GetCubeFaceFromName()

ECubeFace GetCubeFaceFromName ( const FString &  Name)

Convert from text string to ECubeFace

Parameters
Namee.g. RandomNamePosX
Returns
CubeFace_MAX if not recognized

◆ GetCubeFaceName()

const TCHAR * GetCubeFaceName ( ECubeFace  Face)

Convert from ECubeFace to text string

Parameters
Face- ECubeFace type to convert
Returns
text string for cube face enum value

◆ GetEditorShaderPlatform()

EShaderPlatform GetEditorShaderPlatform ( EShaderPlatform  ShaderPlatform)

◆ GetHairStrandsLODMode()

uint32 GetHairStrandsLODMode ( )

◆ GetHairStrandsUsesTriangleStrips()

bool GetHairStrandsUsesTriangleStrips ( )

◆ GetLightFunctionAtlasFormat()

int32 GetLightFunctionAtlasFormat ( )

◆ GetMaterialShadingPathNodeOverride()

int32 GetMaterialShadingPathNodeOverride ( const FStaticShaderPlatform  Platform)

Returns shading path node material override. Returns -1 if no override.

◆ GetPixelFormatValidChannels()

EPixelFormatChannelFlags GetPixelFormatValidChannels ( EPixelFormat  InPixelFormat)

Returns the valid channels for this pixel format

Returns
e.g. EPixelFormatChannelFlags::G for PF_G8

◆ GetPlatformShadingModelsMask()

RENDERCORE_API uint32 GetPlatformShadingModelsMask ( const FStaticShaderPlatform  Platform)

◆ GetRayTracingMode()

ERayTracingMode GetRayTracingMode ( )

◆ GetSingleLayerWaterUsesLightFunctionAtlas()

bool GetSingleLayerWaterUsesLightFunctionAtlas ( )

◆ GetTranslucentUsesLightFunctionAtlas()

bool GetTranslucentUsesLightFunctionAtlas ( )

◆ GetTranslucentUsesLightIESProfiles()

bool GetTranslucentUsesLightIESProfiles ( )

◆ GetTranslucentUsesLightRectLights()

bool GetTranslucentUsesLightRectLights ( )

◆ GetTranslucentUsesShadowedLocalLights()

bool GetTranslucentUsesShadowedLocalLights ( )

◆ GetUnitCubeIndexBuffer()

RENDERCORE_API FBufferRHIRef & GetUnitCubeIndexBuffer ( )

Unit cube index buffer

◆ GetUnitCubeVertexBuffer()

RENDERCORE_API FBufferRHIRef & GetUnitCubeVertexBuffer ( )

Unit cube vertex buffer (VertexDeclarationFVector4)

◆ GetVertexDeclarationFVector2()

RENDERCORE_API FVertexDeclarationRHIRef & GetVertexDeclarationFVector2 ( )

◆ GetVertexDeclarationFVector3()

RENDERCORE_API FVertexDeclarationRHIRef & GetVertexDeclarationFVector3 ( )

◆ GetVertexDeclarationFVector4()

RENDERCORE_API FVertexDeclarationRHIRef & GetVertexDeclarationFVector4 ( )

◆ HardwareVariableRateShadingSupportedByPlatform()

bool HardwareVariableRateShadingSupportedByPlatform ( EShaderPlatform  ShaderPlatform)

◆ HasFirstPersonGBufferBit()

bool HasFirstPersonGBufferBit ( EShaderPlatform  ShaderPlatform)

◆ IsForwardShadingEnabled()

bool IsForwardShadingEnabled ( const FStaticShaderPlatform  Platform)

Returns if ForwardShading is enabled. Only valid for the current platform (otherwise call ITargetPlatform::UsesForwardShading()).

◆ IsGPUSkinCacheAllowed()

RENDERCORE_API bool IsGPUSkinCacheAllowed ( EShaderPlatform  Platform)

Checks if skin cache shaders are allowed for the platform (via r.SkinCache.Allow)

◆ IsGPUSkinCacheAvailable()

RENDERCORE_API bool IsGPUSkinCacheAvailable ( EShaderPlatform  Platform)

Can the skin cache be used (ie shaders added, etc)

◆ IsGPUSkinPassThroughSupported()

RENDERCORE_API bool IsGPUSkinPassThroughSupported ( EShaderPlatform  Platform)

Does the platform support GPUSkinPassthrough permutations. This knowledge can be used to indicate if we need to create SRV for index/vertex buffers.

◆ IsMobileAmbientOcclusionEnabled()

RENDERCORE_API bool IsMobileAmbientOcclusionEnabled ( const FStaticShaderPlatform  Platform)

Returns whether AO is enabled. Only valid for a mobile forward shading.

◆ IsMobileCapsuleDirectShadowsEnabled()

RENDERCORE_API bool IsMobileCapsuleDirectShadowsEnabled ( const FStaticShaderPlatform  Platform)

◆ IsMobileCapsuleShadowsEnabled()

RENDERCORE_API bool IsMobileCapsuleShadowsEnabled ( const FStaticShaderPlatform  Platform)

◆ IsMobileDistanceFieldAOEnabled()

bool IsMobileDistanceFieldAOEnabled ( const FStaticShaderPlatform  Platform)

Returns if Mobile Distance Field AO Enabled.

◆ IsMobileDistanceFieldEnabled()

RENDERCORE_API bool IsMobileDistanceFieldEnabled ( const FStaticShaderPlatform  Platform)

◆ IsMobileMovableSpotlightShadowsEnabled()

RENDERCORE_API bool IsMobileMovableSpotlightShadowsEnabled ( const FStaticShaderPlatform  Platform)

◆ IsRayTracingAllowed()

bool IsRayTracingAllowed ( )

◆ IsRayTracingEnabled() [1/2]

bool IsRayTracingEnabled ( )

◆ IsRayTracingEnabled() [2/2]

bool IsRayTracingEnabled ( EShaderPlatform  ShaderPlatform)

◆ IsRayTracingEnabledForProject()

bool IsRayTracingEnabledForProject ( EShaderPlatform  ShaderPlatform)

◆ IsRayTracingEnableOnDemandSupported()

bool IsRayTracingEnableOnDemandSupported ( )

◆ IsRayTracingUsingReferenceBasedResidency()

bool IsRayTracingUsingReferenceBasedResidency ( )

◆ IsSingleLayerWaterDepthPrepassEnabled()

bool IsSingleLayerWaterDepthPrepassEnabled ( const FStaticShaderPlatform  Platform,
FStaticFeatureLevel  FeatureLevel 
)

(Non-runtime) Checks if the depth prepass for single layer water is enabled. This also depends on virtual shadow maps to be supported on the platform.

◆ IsStencilForLODDitherEnabled()

bool IsStencilForLODDitherEnabled ( const FStaticShaderPlatform  Platform)

Returns if Stencil For LOD Dither is Enabled for this ShaderPlatform.

◆ IsUsingBasePassVelocity()

bool IsUsingBasePassVelocity ( const FStaticShaderPlatform  Platform)

Returns whether the base pass should output to the velocity buffer is enabled for a given shader platform

◆ IsUsingDBuffers()

RENDERCORE_API bool IsUsingDBuffers ( const FStaticShaderPlatform  Platform)

◆ IsUsingDistanceFields()

bool IsUsingDistanceFields ( const FStaticShaderPlatform  Platform)

Returns whether distance fields are enabled for a given shader platform

◆ IsUsingGBuffers()

bool IsUsingGBuffers ( const FStaticShaderPlatform  Platform)

Returns if the GBuffer is used. Only valid for the current platform.

◆ IsUsingSelectiveBasePassOutputs()

bool IsUsingSelectiveBasePassOutputs ( const FStaticShaderPlatform  Platform)

Returns whether the base pass should use selective outputs for a given shader platform

◆ IsWaterDistanceFieldShadowEnabled()

bool IsWaterDistanceFieldShadowEnabled ( const FStaticShaderPlatform  Platform)

Returns if water should render distance field shadow a second time for the water surface. This is for a platofrm so can be used at cook time.

◆ IsWaterSeparateMainDirLightEnabled()

bool IsWaterSeparateMainDirLightEnabled ( const FStaticShaderPlatform  Platform)

Returns if water needs a separate main directional light texture. This is for a platofrm so can be used at cook time or at runtime.

◆ IsWaterVirtualShadowMapFilteringEnabled()

bool IsWaterVirtualShadowMapFilteringEnabled ( const FStaticShaderPlatform  Platform)

Returns if water should evaluate virtual shadow maps a second time for the water surface. This is for a platform so can be used at cook time.

◆ MaskedInEarlyPass()

RENDERCORE_API bool MaskedInEarlyPass ( const FStaticShaderPlatform  Platform)

◆ MobileAllowFramebufferFetch()

RENDERCORE_API bool MobileAllowFramebufferFetch ( const FStaticShaderPlatform  Platform)

◆ MobileBasePassAlwaysUsesCSM()

RENDERCORE_API bool MobileBasePassAlwaysUsesCSM ( const FStaticShaderPlatform  Platform)

◆ MobileForwardEnableClusteredReflections()

RENDERCORE_API bool MobileForwardEnableClusteredReflections ( const FStaticShaderPlatform  Platform)

◆ MobileRequiresSceneDepthAux()

RENDERCORE_API bool MobileRequiresSceneDepthAux ( const FStaticShaderPlatform  Platform)

◆ MobileSupportsSM5MaterialNodes()

RENDERCORE_API bool MobileSupportsSM5MaterialNodes ( const FStaticShaderPlatform  Platform)

◆ MobileUsesExtenedGBuffer()

RENDERCORE_API bool MobileUsesExtenedGBuffer ( FStaticShaderPlatform  ShaderPlatform)

◆ MobileUsesFullDepthPrepass()

RENDERCORE_API bool MobileUsesFullDepthPrepass ( const FStaticShaderPlatform  Platform)

◆ MobileUsesGBufferCustomData()

RENDERCORE_API bool MobileUsesGBufferCustomData ( FStaticShaderPlatform  ShaderPlatform)

◆ MobileUsesShadowMaskTexture()

RENDERCORE_API bool MobileUsesShadowMaskTexture ( const FStaticShaderPlatform  Platform)

◆ NaniteAssembliesSupported()

bool NaniteAssembliesSupported ( )

◆ NaniteAtomicsSupported()

bool NaniteAtomicsSupported ( )

◆ NaniteSkinnedMeshesSupported()

bool NaniteSkinnedMeshesSupported ( )

◆ NaniteSplineMeshesSupported()

bool NaniteSplineMeshesSupported ( )

◆ NaniteVoxelsSupported()

bool NaniteVoxelsSupported ( )

◆ NaniteWorkGraphMaterialsSupported()

bool NaniteWorkGraphMaterialsSupported ( )

◆ operator<<() [1/4]

FArchive & operator<< ( FArchive Ar,
FDeprecatedSerializedPackedNormal N 
)

◆ operator<<() [2/4]

FArchive & operator<< ( FArchive Ar,
FPackedNormal N 
)

◆ operator<<() [3/4]

FArchive & operator<< ( FArchive Ar,
FPackedPosition N 
)

operator << serialize

◆ operator<<() [4/4]

FArchive & operator<< ( FArchive Ar,
FPackedRGBA16N N 
)

◆ PlatformGPUSceneUsesUniformBufferView()

RENDERCORE_API bool PlatformGPUSceneUsesUniformBufferView ( const FStaticShaderPlatform  Platform)

◆ PlatformRequires128bitRT()

bool PlatformRequires128bitRT ( EPixelFormat  PixelFormat)

Note, this should only be used when a platform requires special shader compilation for 32 bit pixel format render targets. Does not replace pixel format associations across the board

◆ PlatformSupportsOpenXRMotionVectors()

bool PlatformSupportsOpenXRMotionVectors ( const FStaticShaderPlatform  Platform)

◆ PlatformSupportsVelocityRendering()

RENDERCORE_API bool PlatformSupportsVelocityRendering ( const FStaticShaderPlatform  Platform)

◆ QuantizeSceneBufferSize()

RENDERCORE_API void QuantizeSceneBufferSize ( const FIntPoint InBufferSize,
FIntPoint OutBufferSize,
const uint32  SuggestedDivisor = 0 
)

Takes the requested buffer size and quantizes it to an appropriate size for the rest of the rendering pipeline. Currently ensures that sizes are multiples of 4 so that they can safely be halved in size several times.

◆ RenderRectLightsAsSpotLights()

bool RenderRectLightsAsSpotLights ( const FStaticFeatureLevel  FeatureLevel)

◆ RenderUtilsInit()

RENDERCORE_API void RenderUtilsInit ( )

◆ ShouldCompileRayTracingCallableShadersForProject()

bool ShouldCompileRayTracingCallableShadersForProject ( EShaderPlatform  ShaderPlatform)

◆ ShouldCompileRayTracingShadersForProject()

bool ShouldCompileRayTracingShadersForProject ( EShaderPlatform  ShaderPlatform)

◆ ShouldForceFullDepthPass()

RENDERCORE_API bool ShouldForceFullDepthPass ( const FStaticShaderPlatform  Platform)

◆ ShouldGenerateRayTracingProxiesByDefault()

RENDERCORE_API bool ShouldGenerateRayTracingProxiesByDefault ( )

◆ SupportsGen4TAA()

RENDERCORE_API bool SupportsGen4TAA ( const FStaticShaderPlatform  Platform)

◆ SupportsTextureCubeArray()

RENDERCORE_API bool SupportsTextureCubeArray ( ERHIFeatureLevel::Type  FeatureLevel)

◆ SupportsTSR()

RENDERCORE_API bool SupportsTSR ( const FStaticShaderPlatform  Platform)

◆ UseGPUScene() [1/2]

bool UseGPUScene ( const FStaticShaderPlatform  Platform)

◆ UseGPUScene() [2/2]

bool UseGPUScene ( const FStaticShaderPlatform  Platform,
const FStaticFeatureLevel  FeatureLevel 
)

◆ UseNanite()

bool UseNanite ( EShaderPlatform  ShaderPlatform,
bool  bCheckForAtomicSupport = true,
bool  bCheckForProjectSetting = true 
)

Returns true if Nanite rendering should be used for the given shader platform.

◆ UseNaniteFastTileClear()

bool UseNaniteFastTileClear ( )

◆ UseNaniteLandscapeMesh()

RENDERCORE_API bool UseNaniteLandscapeMesh ( EShaderPlatform  ShaderPlatform)

Checks if platform uses a Nanite landscape mesh

◆ UseNaniteTessellation()

bool UseNaniteTessellation ( )

◆ UseNonNaniteVirtualShadowMaps()

bool UseNonNaniteVirtualShadowMaps ( EShaderPlatform  ShaderPlatform,
FStaticFeatureLevel  FeatureLevel 
)

Similar to DoesPlatformSupportNonNaniteVirtualShadowMaps, but checks if nanite and virtual shadow maps are enabled (at runtime).

◆ UseRemoveUnsedInterpolators()

RENDERCORE_API bool UseRemoveUnsedInterpolators ( EShaderPlatform  ShaderPlatform)

Checks if we can strip unused interpolators for a specific platform.

◆ UseShaderPipelines()

RENDERCORE_API bool UseShaderPipelines ( EShaderPlatform  ShaderPlatform)

Checks if shader pipelines is enable for a specific platform.

◆ UseSparseVolumeTextures()

bool UseSparseVolumeTextures ( EShaderPlatform  Platform)

Returns true if SparseVolumeTextures are supported on the given shader platform and are enabled.

◆ UseSplineMeshSceneResources()

bool UseSplineMeshSceneResources ( const FStaticShaderPlatform  Platform)

Whether or not the platform supports the scene spline texture for spline meshes

◆ UseVirtualShadowMaps() [1/2]

bool UseVirtualShadowMaps ( EShaderPlatform  ShaderPlatform)

Returns true if Virtual Shadow Maps should be used for the given shader platform. Note: Virtual Shadow Maps require Nanite support.

◆ UseVirtualShadowMaps() [2/2]

bool UseVirtualShadowMaps ( EShaderPlatform  ShaderPlatform,
const FStaticFeatureLevel  FeatureLevel 
)

Returns true if Virtual Shadow Maps should be used for the given shader platform. Note: Virtual Shadow Maps require Nanite support.

◆ UseVirtualTextureLightmap()

RENDERCORE_API bool UseVirtualTextureLightmap ( const FStaticShaderPlatform  Platform,
const ITargetPlatformSettings TargetPlatform = nullptr 
)

Checks if virtual texturing lightmap enabled and supported

◆ UseVirtualTexturing() [1/3]

RENDERCORE_API bool UseVirtualTexturing ( const FStaticShaderPlatform  InShaderPlatform)

Checks if virtual texturing enabled and supported

◆ UseVirtualTexturing() [2/3]

RENDERCORE_API bool UseVirtualTexturing ( const FStaticShaderPlatform  InShaderPlatform,
const ITargetPlatformSettings InTargetPlatform 
)

◆ UseVirtualTexturing() [3/3]

RENDERCORE_API bool UseVirtualTexturing ( const ITargetPlatformSettings InTargetPlatform)

◆ VelocityEncodeDepth()

bool VelocityEncodeDepth ( const FStaticShaderPlatform  Platform)

◆ VelocityEncodeHasPixelAnimation()

bool VelocityEncodeHasPixelAnimation ( const FStaticShaderPlatform  Platform)

◆ VelocityIncludeStationaryPrimitives()

bool VelocityIncludeStationaryPrimitives ( const FStaticShaderPlatform  Platform)

◆ VelocitySupportsPixelShaderMotionVectorWorldOffset()

bool VelocitySupportsPixelShaderMotionVectorWorldOffset ( const FStaticShaderPlatform  Platform)

◆ VelocitySupportsTemporalResponsiveness()

bool VelocitySupportsTemporalResponsiveness ( const FStaticShaderPlatform  Platform)

Variable Documentation

◆ FVector4VertexDeclaration

◆ GAllowTranslucencyShadowsInProject

int32 GAllowTranslucencyShadowsInProject = 0

◆ GCubeIndices

const uint16 GCubeIndices[12 *3]
Initial value:
=
{
0, 2, 3,
0, 3, 1,
4, 5, 7,
4, 7, 6,
0, 1, 5,
0, 5, 4,
2, 6, 7,
2, 7, 3,
0, 4, 6,
0, 6, 2,
1, 3, 7,
1, 7, 5,
}

The indices for drawing a cube.

◆ GDBufferPlatformMask

RENDERCORE_API ShaderPlatformMaskType GDBufferPlatformMask

◆ GDistanceFieldsPlatformMask

RENDERCORE_API ShaderPlatformMaskType GDistanceFieldsPlatformMask

◆ GForwardShadingPlatformMask

RENDERCORE_API ShaderPlatformMaskType GForwardShadingPlatformMask

◆ GNaniteFallbackMeshesPlatformMask

RENDERCORE_API ShaderPlatformMaskType GNaniteFallbackMeshesPlatformMask

◆ GNaniteProjectEnabled

int32 GNaniteProjectEnabled = 1

◆ GRayTracingMode

◆ GRayTracingPlatformMask

RENDERCORE_API ShaderPlatformMaskType GRayTracingPlatformMask

◆ GRayTracingShadersPlatformMask

RENDERCORE_API ShaderPlatformMaskType GRayTracingShadersPlatformMask

◆ GSelectiveBasePassOutputsPlatformMask

RENDERCORE_API ShaderPlatformMaskType GSelectiveBasePassOutputsPlatformMask

◆ GSimpleSkyDiffusePlatformMask

RENDERCORE_API ShaderPlatformMaskType GSimpleSkyDiffusePlatformMask

◆ GUseForwardShading

RENDERCORE_API int32 GUseForwardShading = 0

◆ GVector2VertexDeclaration

TGlobalResource<FVector2VertexDeclaration> GVector2VertexDeclaration

◆ GVector3VertexDeclaration

TGlobalResource<FVector3VertexDeclaration> GVector3VertexDeclaration

◆ GVelocityEncodeDepthPlatformMask

RENDERCORE_API ShaderPlatformMaskType GVelocityEncodeDepthPlatformMask