FMeshParticleVertexFactory

Vertex factory for rendering instanced mesh particles with out dynamic parameter support.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/MeshParticleVertexFactory.h

Include

#include "MeshParticleVertexFactory.h"

Syntax

class FMeshParticleVertexFactory : public FParticleVertexFactoryBase

Remarks

Vertex factory for rendering instanced mesh particles with out dynamic parameter support.

Variables

Name Description

Protected variable

FDataType

 

Data

Protected variable

int32

 

DynamicParameterVertexStride

Protected variable

int32

 

DynamicVertexStride

Stride information for instanced mesh particles

Protected variable

FMeshParticleIn...

 

InstanceVerticesCPU

Used to remember this in the case that we reuse the same vertex factory for multiple renders .

Protected variable

uint8

 

LODIdx

Protected variable

FRHIUniformBuff...

 

MeshParticleUniformBuffer

Uniform buffer with mesh particle parameters.

Protected variable

FDynamicReadBuf...

 

PrevTransformBuffer

Constructors

Name Description

Public function

FMeshParticleVertexFactory()

Public function

FMeshParticleVertexFactory

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Public function

FMeshParticleVertexFactory

(
    EParticleVertexFactoryType InType,
    ERHIFeatureLevel::Type InFeatureLev...,
    int32 InDynamicVertexStride,
    int32 InDynamicParameterVertexStrid...
)

Default constructor.

Functions

Name Description

Public function Static

FVertexFacto...

 

ConstructShaderParameters

(
    EShaderFrequency ShaderFrequency
)

Public function

void

 

Copy

(
    const FMeshParticleVertexFactory& ...
)

Copy the data from another vertex factory

Public function

FMeshParticl...

 

GetInstanceVerticesCPU()

Public function Const

uint8

 

GetLODIdx()

Public function Const

FRHIShaderRe...

 

GetPreviousTransformBufferSRV()

Public function

FRHIUniformB...

 

GetUniformBuffer()

Retrieve the uniform buffer for this vertex factory.

Public function

uint8 *

 

LockPreviousTransformBuffer

(
    uint32 ParticleCount
)

Public function Static

void

 

ModifyCompilationEnvironment

(
    const FVertexFactoryType* Type,
    EShaderPlatform Platform,
    const FMaterial* Material,
    FShaderCompilerEnvironment& OutEnv...
)

Modify compile environment to enable instancing

Public function

void

 

SetData

(
    const FDataType& InData
)

An implementation of the interface used by TSynchronizedResource to update the resource with new data from the game thread.

Public function

void

 

SetDynamicParameterBuffer

(
    const FVertexBuffer* InDynamic...,
    uint32 StreamOffset,
    uint32 Stride
)

Set the source vertex buffer that contains particle dynamic parameter data.

Public function

void

 

SetInstanceBuffer

(
    const FVertexBuffer* InstanceB...,
    uint32 StreamOffset,
    uint32 Stride
)

Set the source vertex buffer that contains particle instance data.

Public function

void

 

SetLODIdx

(
    uint8 InLODIdx
)

Public function

void

 

SetStrides

(
    int32 InDynamicVertexStride,
    int32 InDynamicParameterVertexStrid...
)

Update the data strides (MUST HAPPEN BEFORE InitRHI is called)

Public function

void

 

SetUniformBuffer

(
    const FMeshParticleUniformBufferRef...
)

Set the uniform buffer for this vertex factory.

Public function Static

bool

 

ShouldCompilePermutation

(
    EShaderPlatform Platform,
    const FMaterial* Material,
    const FShaderType* ShaderType
)

Should we cache the material's shadertype on this platform with this vertex factory?

Public function Static

bool

 

SupportsTessellationShaders()

Public function

void

 

UnlockPreviousTransformBuffer()

Overridden from FVertexFactory

Name Description

Public function Virtual Const

FVertexFacto...

 

GetType()

Overridden from FRenderResource

Name Description

Public function Virtual

void

 

InitRHI()

Initializes the RHI resources used by this resource.

Classes

Name

Description

Public class

FBatchParametersCPU

Public struct

FDataType

Constants

Name

Description

StaticType

Select Skin
Light
Dark

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