FMeshBatch

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

Windows
MacOS
Linux

Syntax

struct FMeshBatch

Remarks

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

Variables

Name Description

Public variable

FHitProxyId

 

BatchHitProxyId

The current hit proxy ID being rendered.

Public variable

uint32: 1

 

bCanApplyViewModeOverrides

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

Public variable

uint32: 1

 

bDisableBackfaceCulling

Public variable

uint32: 1

 

bDitheredLODTransition

Whether the mesh batch should apply dithered LOD.

Public variable

uint32: 1

 

bRequiresPerElementVisibility

Whether the mesh batch needs VertexFactory->GetStaticBatchElementVisibility to be called each frame to determine which elements of the batch are visible.

Public variable

uint32: 1

 

bSelectable

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

Public variable

uint32: 1

 

bUseAsOccluder

Public variable

uint32: 1

 

bUseForDepthPass

Public variable

uint32: 1

 

bUseForMaterial

Public variable

uint32: 1

 

bUseSelectionOutline

Whether the batch should receive the selection outline.

Public variable

uint32: 1

 

bUseWireframeSelectionColoring

Whether to treat the batch as selected in special viewmodes like wireframe.

Public variable

uint32: 1

 

bWireframe

Public variable

uint32: 1

 

CastShadow

Pass feature relevance flags.

Public variable

uint32: 3

 

DepthPriorityGroup

E.g. SDPG_World (default), SDPG_Foreground

Public variable

TArray< FMeshBa...

 

Elements

Public variable

const FLightCac...

 

LCI

Can be NULL

Public variable

int8

 

LODIndex

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

Public variable

const FMaterial...

 

MaterialRenderProxy

Material proxy for rendering, required.

Public variable

uint16

 

MeshIdInPrimitive

Mesh Id in a primitive. Used for stable sorting of draws belonging to the same primitive.

Public variable

uint32: 1

 

ReverseCulling

Public variable

uint8

 

SegmentIndex

Public variable

float

 

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

Public variable

uint32: PT_Num...

 

Type

E.g. PT_TriangleList(default), PT_LineList, ..

Public variable

const FVertexFa...

 

VertexFactory

Vertex factory for rendering, required.

Public variable

int8

 

VisualizeHLODIndex

Conceptual HLOD index used for the HLOD Coloration visualization.

Public variable

int8

 

VisualizeLODIndex

Conceptual LOD index used for the LOD Coloration visualization.

Constructors

Name Description

Public function

FMeshBatch()

Default constructor.

Functions

Name Description

Public function Const

bool

 

CastsDeepShadow()

Public function Const

int32

 

GetNumPrimitives()

Public function Const

bool

 

IsDecal

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Todo: can be optimized with a single function that returns multiple states (Translucent, Decal, Masked)

Public function Const

bool

 

IsMasked

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Public function Const

bool

 

IsTranslucent

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Public function

void

 

PreparePrimitiveUniformBuffer

(
    const FPrimitiveSceneProxy* Pr...,
    ERHIFeatureLevel::Type FeatureLevel
)

Public function Static

int8

 

QuantizeLODIndex

(
    int32 NewLODIndex
)

Converts from an int32 index into a int8

References

Module

Engine

Header

Runtime/Engine/Public/MeshBatch.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback