UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMeshBatch Struct Reference

#include <MeshBatch.h>

+ Inheritance diagram for FMeshBatch:

Public Member Functions

ENGINE_API bool IsTranslucent (ERHIFeatureLevel::Type InFeatureLevel) const
 
ENGINE_API bool IsDecal (ERHIFeatureLevel::Type InFeatureLevel) const
 
ENGINE_API bool IsDualBlend (ERHIFeatureLevel::Type InFeatureLevel) const
 
ENGINE_API bool UseForHairStrands (ERHIFeatureLevel::Type InFeatureLevel) const
 
ENGINE_API bool IsMasked (ERHIFeatureLevel::Type InFeatureLevel) const
 
int32 GetNumPrimitives () const
 
bool HasAnyDrawCalls () const
 
ENGINE_API void PreparePrimitiveUniformBuffer (const FPrimitiveSceneProxy *PrimitiveSceneProxy, ERHIFeatureLevel::Type FeatureLevel)
 
ENGINE_API bool Validate (const FPrimitiveSceneProxy *SceneProxy, ERHIFeatureLevel::Type FeatureLevel) const
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS FMeshBatch ()
 
 FMeshBatch (FMeshBatch &)=default
 
 ~FMeshBatch ()=default
 
 FMeshBatch (const FMeshBatch &)=default
 
 FMeshBatch (FMeshBatch &&)=default
 
FMeshBatchoperator= (const FMeshBatch &)=default
 
FMeshBatchoperator= (FMeshBatch &&)=default
 

Public Attributes

TArray< FMeshBatchElement, TInlineAllocator< 1 > > Elements
 
const FVertexFactoryVertexFactory
 
const FMaterialRenderProxyMaterialRenderProxy
 
const FLightCacheInterfaceLCI
 
FHitProxyId BatchHitProxyId
 
int32 DynamicMeshBoundsIndex = INDEX_NONE
 
float TessellationDisablingShadowMapMeshSize
 
int32 SegmentIndex
 
uint16 MeshIdInPrimitive
 
int8 LODIndex
 
uint32 ReverseCulling: 1
 
uint32 bDisableBackfaceCulling: 1
 
uint32 CastShadow: 1
 
uint32 bUseForMaterial: 1
 
uint32 bUseForDepthPass: 1
 
uint32 bUseAsOccluder: 1
 
uint32 bWireframe: 1
 
uint32 Type: PT_NumBits
 
uint32 DepthPriorityGroup: SDPG_NumBits
 
uint32 bCanApplyViewModeOverrides: 1
 
uint32 bUseWireframeSelectionColoring: 1
 
uint32 bUseSelectionOutline: 1
 
uint32 bSelectable: 1
 
uint32 bDitheredLODTransition: 1
 
uint32 bRenderToVirtualTexture: 1
 
uint32 RuntimeVirtualTextureMaterialType: RuntimeVirtualTexture::MaterialType_NumBits
 
uint32 bOverlayMaterial: 1
 
uint32 bViewDependentArguments: 1
 
uint32 bUseForWaterInfoTextureDepth: 1
 
uint32 bUseForLumenSurfaceCacheCapture: 1
 
int8 VisualizeHLODIndex
 
int8 VisualizeLODIndex
 

Detailed Description

A batch of mesh elements, all with the same material and vertex buffer

Constructor & Destructor Documentation

◆ FMeshBatch() [1/4]

PRAGMA_DISABLE_DEPRECATION_WARNINGS FMeshBatch::FMeshBatch ( )
inline

Default constructor.

◆ FMeshBatch() [2/4]

FMeshBatch::FMeshBatch ( FMeshBatch )
default

◆ ~FMeshBatch()

FMeshBatch::~FMeshBatch ( )
default

◆ FMeshBatch() [3/4]

FMeshBatch::FMeshBatch ( const FMeshBatch )
default

◆ FMeshBatch() [4/4]

FMeshBatch::FMeshBatch ( FMeshBatch &&  )
default

Member Function Documentation

◆ GetNumPrimitives()

int32 FMeshBatch::GetNumPrimitives ( ) const
inline

◆ HasAnyDrawCalls()

bool FMeshBatch::HasAnyDrawCalls ( ) const
inline

◆ IsDecal()

bool FMeshBatch::IsDecal ( ERHIFeatureLevel::Type  InFeatureLevel) const

◆ IsDualBlend()

bool FMeshBatch::IsDualBlend ( ERHIFeatureLevel::Type  InFeatureLevel) const

◆ IsMasked()

bool FMeshBatch::IsMasked ( ERHIFeatureLevel::Type  InFeatureLevel) const

◆ IsTranslucent()

bool FMeshBatch::IsTranslucent ( ERHIFeatureLevel::Type  InFeatureLevel) const

◆ operator=() [1/2]

FMeshBatch & FMeshBatch::operator= ( const FMeshBatch )
default

◆ operator=() [2/2]

FMeshBatch & FMeshBatch::operator= ( FMeshBatch &&  )
default

◆ PreparePrimitiveUniformBuffer()

void FMeshBatch::PreparePrimitiveUniformBuffer ( const FPrimitiveSceneProxy PrimitiveSceneProxy,
ERHIFeatureLevel::Type  FeatureLevel 
)

◆ UseForHairStrands()

bool FMeshBatch::UseForHairStrands ( ERHIFeatureLevel::Type  InFeatureLevel) const

◆ Validate()

ENGINE_API bool FMeshBatch::Validate ( const FPrimitiveSceneProxy SceneProxy,
ERHIFeatureLevel::Type  FeatureLevel 
) const

Member Data Documentation

◆ BatchHitProxyId

FHitProxyId FMeshBatch::BatchHitProxyId

The current hit proxy ID being rendered.

◆ bCanApplyViewModeOverrides

uint32 FMeshBatch::bCanApplyViewModeOverrides

Whether view mode overrides can be applied to this mesh eg unlit, wireframe.

◆ bDisableBackfaceCulling

uint32 FMeshBatch::bDisableBackfaceCulling

◆ bDitheredLODTransition

uint32 FMeshBatch::bDitheredLODTransition

Whether the mesh batch should apply dithered LOD.

◆ bOverlayMaterial

uint32 FMeshBatch::bOverlayMaterial

Whether mesh is rendered with overlay material.

◆ bRenderToVirtualTexture

uint32 FMeshBatch::bRenderToVirtualTexture

Whether the mesh batch can be rendered to virtual textures.

◆ bSelectable

uint32 FMeshBatch::bSelectable

Whether the mesh batch can be selected through editor selection, aka hit proxies.

◆ bUseAsOccluder

uint32 FMeshBatch::bUseAsOccluder

◆ bUseForDepthPass

uint32 FMeshBatch::bUseForDepthPass

◆ bUseForLumenSurfaceCacheCapture

uint32 FMeshBatch::bUseForLumenSurfaceCacheCapture

Gives the opportunity to select a different VF for the landscape for the lumen surface cache capture

◆ bUseForMaterial

uint32 FMeshBatch::bUseForMaterial

◆ bUseForWaterInfoTextureDepth

uint32 FMeshBatch::bUseForWaterInfoTextureDepth

Whether the mesh batch should be used in the depth-only passes of rendering the water info texture for the water plugin

◆ bUseSelectionOutline

uint32 FMeshBatch::bUseSelectionOutline

Whether the batch should receive the selection outline.
This is useful for proxies which support selection on a per-mesh batch basis. They submit multiple mesh batches when selected, some of which have bUseSelectionOutline enabled.

◆ bUseWireframeSelectionColoring

uint32 FMeshBatch::bUseWireframeSelectionColoring

Whether to treat the batch as selected in special viewmodes like wireframe. This is needed instead of just Proxy->IsSelected() because some proxies do weird things with selection highlighting, like FStaticMeshSceneProxy.

◆ bViewDependentArguments

uint32 FMeshBatch::bViewDependentArguments

Whether mesh has a view dependent draw arguments. Gives an opportunity to override mesh arguments for a View just before creating MDC for a mesh (makes MDC "non-cached")

◆ bWireframe

uint32 FMeshBatch::bWireframe

◆ CastShadow

uint32 FMeshBatch::CastShadow

Pass feature relevance flags. Allows a proxy to submit fast representations for passes which can take advantage of it, for example separate index buffer for depth-only rendering since vertices can be merged based on position and ignore UV differences.

◆ DepthPriorityGroup

uint32 FMeshBatch::DepthPriorityGroup

◆ DynamicMeshBoundsIndex

int32 FMeshBatch::DynamicMeshBoundsIndex = INDEX_NONE

If set, the ID to use during culling when GPU skin cache is available to provide dynamic tight-fit bounds.

◆ Elements

TArray<FMeshBatchElement,TInlineAllocator<1> > FMeshBatch::Elements

◆ LCI

const FLightCacheInterface* FMeshBatch::LCI

◆ LODIndex

int8 FMeshBatch::LODIndex

LOD index of the mesh, used for fading LOD transitions.

◆ MaterialRenderProxy

const FMaterialRenderProxy* FMeshBatch::MaterialRenderProxy

Material proxy for rendering, required.

◆ MeshIdInPrimitive

uint16 FMeshBatch::MeshIdInPrimitive

◆ ReverseCulling

uint32 FMeshBatch::ReverseCulling

◆ RuntimeVirtualTextureMaterialType

uint32 FMeshBatch::RuntimeVirtualTextureMaterialType

What virtual texture material type this mesh batch should be rendered with.

◆ SegmentIndex

int32 FMeshBatch::SegmentIndex

Segment index of the original mesh

◆ TessellationDisablingShadowMapMeshSize

float FMeshBatch::TessellationDisablingShadowMapMeshSize

This is the threshold that will be used to know if we should use this mesh batch or use one with no tessellation enabled

◆ Type

uint32 FMeshBatch::Type

◆ VertexFactory

const FVertexFactory* FMeshBatch::VertexFactory

Vertex factory for rendering, required.

◆ VisualizeHLODIndex

int8 FMeshBatch::VisualizeHLODIndex

Conceptual HLOD index used for the HLOD Coloration visualization.

◆ VisualizeLODIndex

int8 FMeshBatch::VisualizeLODIndex

Conceptual LOD index used for the LOD Coloration visualization.


The documentation for this struct was generated from the following files: