FMeshBatch

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

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/MeshBatch.h

Include

#include "MeshBatch.h"

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

 

bRenderToVirtualTexture

Whether the mesh batch can be rendered to virtual textures.

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

uint32: Runtim...

 

RuntimeVirtualTextureMaterialType

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

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

int32

 

GetNumPrimitives()

Public function Const

bool

 

HasAnyDrawCalls()

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

 

IsDualBlend

(
    ERHIFeatureLevel::Type InFeatureLev...
)

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

Public function Const

bool

 

UseForHairStrands

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss