UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MeshBatch.h File Reference
#include "CoreTypes.h"
#include "Containers/ArrayView.h"
#include "EngineDefines.h"
#include "Engine/EngineTypes.h"
#include "HitProxies.h"
#include "RHIDefinitions.h"
#include "SceneDefinitions.h"
#include "VT/RuntimeVirtualTextureEnum.h"
#include "RHIResources.h"

Go to the source code of this file.

Classes

class  FGPUSceneWriteDelegateRef
 
struct  FMeshBatchElementDynamicIndexBuffer
 
struct  FMeshBatchDynamicPrimitiveData
 
struct  FMeshBatchElement
 
struct  FMeshBatch
 
struct  FUniformBufferValue
 

Macros

#define USE_MESH_BATCH_VALIDATION   !UE_BUILD_SHIPPING
 

Enumerations

enum class  EGPUSceneGPUWritePass : int8 { None = -1 , PostOpaqueRendering , Num }
 
enum  EPrimitiveIdMode {
  PrimID_FromPrimitiveSceneInfo = 0 , PrimID_DynamicPrimitiveShaderData = 1 , PrimID_ForceZero = 2 , PrimID_Num = 4 ,
  PrimID_NumBits = 2
}
 

Functions

ENGINE_API bool AreCompressedTransformsSupported ()
 
ENGINE_API bool IsHairStrandsGeometrySupported (const EShaderPlatform Platform)
 
ENGINE_API bool IsCompatibleWithHairStrands (const FMaterial *Material, const ERHIFeatureLevel::Type FeatureLevel)
 
ENGINE_API bool IsCompatibleWithHairStrands (EShaderPlatform Platform, const FMaterialShaderParameters &Parameters)
 

Variables

constexpr int32 GPrimIDDynamicFlag = 1 << 31
 

Macro Definition Documentation

◆ USE_MESH_BATCH_VALIDATION

#define USE_MESH_BATCH_VALIDATION   !UE_BUILD_SHIPPING

Enumeration Type Documentation

◆ EGPUSceneGPUWritePass

Specifies the point during scene rendering that GPU Scene can be written to

Enumerator
None 

Invalid GPU write pass. Also used to signify writes that occur during upload.

PostOpaqueRendering 

Writes to the GPU Scene will happen after rendering opaques (as well has after FXSystem post-opaque updates).

Num 

◆ EPrimitiveIdMode

Enumerator
PrimID_FromPrimitiveSceneInfo 

PrimitiveId will be taken from the FPrimitiveSceneInfo corresponding to the FMeshBatch. Primitive data will then be fetched by supporting VF's from the GPUScene persistent PrimitiveBuffer.

PrimID_DynamicPrimitiveShaderData 

The renderer will upload Primitive data from the FMeshBatchElement's PrimitiveUniformBufferResource to the end of the GPUScene PrimitiveBuffer, and assign the offset to DynamicPrimitiveIndex. PrimitiveId for drawing will be computed as Scene->NumPrimitives + FMeshBatchElement's DynamicPrimitiveIndex.

PrimID_ForceZero 

PrimitiveId will always be 0. Instancing not supported.
View.PrimitiveSceneDataOverrideSRV must be set in this configuration to control what the shader fetches at PrimitiveId == 0.

PrimID_Num 
PrimID_NumBits 

Function Documentation

◆ AreCompressedTransformsSupported()

ENGINE_API bool AreCompressedTransformsSupported ( )

◆ IsCompatibleWithHairStrands() [1/2]

ENGINE_API bool IsCompatibleWithHairStrands ( const FMaterial Material,
const ERHIFeatureLevel::Type  FeatureLevel 
)

◆ IsCompatibleWithHairStrands() [2/2]

ENGINE_API bool IsCompatibleWithHairStrands ( EShaderPlatform  Platform,
const FMaterialShaderParameters Parameters 
)

◆ IsHairStrandsGeometrySupported()

ENGINE_API bool IsHairStrandsGeometrySupported ( const EShaderPlatform  Platform)

Variable Documentation

◆ GPrimIDDynamicFlag

constexpr int32 GPrimIDDynamicFlag = 1 << 31
inlineconstexpr