FNiagaraMeshVertexFactory

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

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

NiagaraVertexFactories

Header

/Engine/Plugins/FX/Niagara/Source/NiagaraVertexFactories/Public/NiagaraMeshVertexFactory.h

Include

#include "NiagaraMeshVertexFactory.h"

Syntax

class FNiagaraMeshVertexFactory : public FNiagaraVertexFactoryBase

Remarks

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

Variables

Name Description

Protected variable

FStaticMeshData...

 

Data

Protected variable

uint32

 

FloatDataOffset

Protected variable

uint32

 

FloatDataStride

Protected variable

FNiagaraMeshIns...

 

InstanceVerticesCPU

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

Protected variable

uint32

 

MeshFacingMode

Protected variable

FRHIUniformBuff...

 

MeshParticleUniformBuffer

Uniform buffer with mesh particle parameters.

Protected variable

FShaderResource...

 

ParticleDataFloatSRV

Protected variable

uint32

 

SortedIndicesOffset

Protected variable

FShaderResource...

 

SortedIndicesSRV

Constructors

Name Description

Public function

FNiagaraMeshVertexFactory()

Public function

FNiagaraMeshVertexFactory

(
    ENiagaraVertexFactoryType InType,
    ERHIFeatureLevel::Type InFeatureLev...
)

Default constructor.

Functions

Name Description

Public function Static

FVertexFacto...

 

ConstructShaderParameters

(
    EShaderFrequency ShaderFrequency
)

Public function

void

 

Copy

(
    const FNiagaraMeshVertexFactory& O...
)

Uint8* LockPreviousTransformBuffer(uint32 ParticleCount); void UnlockPreviousTransformBuffer(); FRHIShaderResourceView* GetPreviousTransformBufferSRV() const; Copy the data from another vertex factory

Public function

int32

 

GetFloatDataOffset()

Public function

int32

 

GetFloatDataStride()

Public function Const

uint32

 

GetMeshFacingMode()

Public function

FShaderResou...

 

GetParticleDataFloatSRV()

Public function

int32

 

GetSortedIndicesOffset()

Public function

FShaderResou...

 

GetSortedIndicesSRV()

Public function

FRHIUniformB...

 

GetUniformBuffer()

Retrieve the uniform buffer for this vertex factory.

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 FStaticMeshDataType& InData
)

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

Public function

void

 

SetMeshFacingMode

(
    uint32 InMode
)

Public function

void

 

SetParticleData

(
    const FShaderResourceViewRHIRef& I...,
    uint32 InFloatDataOffset,
    uint32 InFloatDataStride
)

Public function

void

 

SetSortedIndices

(
    const FShaderResourceViewRHIRef& I...,
    uint32 InSortedIndicesOffset
)

Public function

void

 

SetUniformBuffer

(
    const FNiagaraMeshUniformBufferRef ...
)

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()

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.

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