NiagaraEmitterInstanceBatcher

Windows
MacOS
Linux

Inheritance Hierarchy

FFXSystemInterface

NiagaraEmitterInstanceBatcher

References

Module

Niagara

Header

/Engine/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraEmitterInstanceBatcher.h

Include

#include "NiagaraEmitterInstanceBatcher.h"

Syntax

class NiagaraEmitterInstanceBatcher : public FFXSystemInterface

Constructors

Name Description

Public function

NiagaraEmitterInstanceBatcher

(
    ERHIFeatureLevel::Type InFeatureLev...,
    EShaderPlatform InShaderPlatform,
    FGPUSortManager* InGPUSortMana...
)

Destructors

Functions

Name Description

Public function

bool

 

AddSortedGPUSimulation

(
    FNiagaraGPUSortInfo& SortInfo
)

Register work for GPU sorting (using the GPUSortManager).

Public function

void

 

BuildBatches()

TODO: process queue, build batches from context with the same script also need to figure out how to handle multiple sets of parameters across a batch for now this executes every single sim in the queue individually, which is terrible in terms of overhead

Public function Const

FNiagaraData...

 

FindIterationInterface

(
    FNiagaraComputeInstanceData* I...,
    const uint32 SimulationStageIndex
)

Given a shader stage index, find the corresponding data interface

Public function Const

FRHIUnordere...

 

GetEmptyRWBufferFromPool

(
    FRHICommandList& RHICmdList,
    EPixelFormat Format
)

Public function Const

FRHIUnordere...

 

GetEmptyRWTextureFromPool

(
    FRHICommandList& RHICmdList,
    EPixelFormat Format
)

Public function Const

uint32

 

GetEventSpawnTotal

(
    const FNiagaraComputeExecutionConte...
)

Public function Const

ERHIFeatureL...

 

GetFeatureLevel()

Public function Const

const FGloba...

 

GetGlobalDistanceFieldParameters()

Public function

FNiagaraGPUI...

 

GetGPUInstanceCounterManager()

Public function Const

EShaderPlatf...

 

GetShaderPlatform()

Public function

void

 

GiveSystemTick_RenderThread

(
    FNiagaraGPUSystemTick& Tick
)

Public function

void

 

InstanceDeallocated_RenderThread

(
    const FNiagaraSystemInstanceID Inst...
)

Notification that the InstanceID has been removed.

Public function Const

void

 

PostStageInterface

(
    const FNiagaraGPUSystemTick& Tick,
    FNiagaraComputeInstanceData* I...,
    FRHICommandList& RHICmdList,
    const FNiagaraShaderRef& ComputeSh...,
    const uint32 SimulationStageIndex
)

Loop over all the data interfaces and call the poststage methods

Public function Const

void

 

PreStageInterface

(
    const FNiagaraGPUSystemTick& Tick,
    FNiagaraComputeInstanceData* I...,
    FRHICommandList& RHICmdList,
    const FNiagaraShaderRef& ComputeSh...,
    const uint32 SimulationStageIndex
)

Loop over all the data interfaces and call the prestage methods

Public function Const

void

 

ProcessDebugInfo

(
    FRHICommandList& RHICmdLis,
    const FNiagaraComputeExecutionConte...
)

Public function

void

 

ReleaseInstanceCounts_RenderThread

(
    FNiagaraComputeExecutionContext...,
    FNiagaraDataSet* DataSet
)

Called to release GPU instance counts that the batcher is tracking.

Public function Const

bool

 

ResetDataInterfaces

(
    const FNiagaraGPUSystemTick& Tick,
    FNiagaraComputeInstanceData* I...,
    FRHICommandList& RHICmdList,
    const FNiagaraShaderRef& ComputeSh...
)

Reset the data interfaces and check if the spawn stages are valid

Public function Const

void

 

ResizeCurrentBuffer

(
    FRHICommandList& RHICmdList,
    FNiagaraComputeExecutionContext...,
    uint32 NewNumInstances,
    uint32 PrevNumInstances
)

Public function

void

 

Run

(
    const FNiagaraGPUSystemTick& Tick,
    const FNiagaraComputeInstanceData&...,
    uint32 UpdateStartInstance,
    const uint32 TotalNumInstances,
    const FNiagaraShaderRef& Shader,
    FRHICommandList& RHICmdList,
    FRHIUniformBuffer* ViewUniform...,
    const FNiagaraGpuSpawnInfo& SpawnI...,
    bool bCopyBeforeStart,
    uint32 DefaultSimulationStageIndex,
    uint32 SimulationStageIndex,
    FNiagaraDataInterfaceProxy* It...,
    bool HasRunParticleStage
)

Public function Const

void

 

SetDataInterfaceParameters

(
    const TArray< FNiagaraDataInterface...,
    const FNiagaraShaderRef& Shader,
    FRHICommandList& RHICmdList,
    const FNiagaraComputeInstanceData&...,
    const FNiagaraGPUSystemTick& Tick,
    uint32 SimulationStageIndex
)

Public function Const

void

 

UnsetDataInterfaceParameters

(
    const TArray< FNiagaraDataInterface...,
    const FNiagaraShaderRef& Shader,
    FRHICommandList& RHICmdList,
    const FNiagaraComputeInstanceData&...,
    const FNiagaraGPUSystemTick& Tick
)

Overridden from FFXSystemInterface

Name Description

Public function Virtual

void

 

AddVectorField

(
    UVectorFieldComponent* VectorF...
)

Add a vector field to the FX system.

Public function Virtual

void

 

DrawDebug

(
    FCanvas* Canvas
)

Draw desired debug information related to the effects system.

Public function Virtual Const

FGPUSortMana...

 

GetGPUSortManager()

Get the shared SortManager, used in the rendering loop to call FGPUSortManager::OnPreRender() and FGPUSortManager::OnPostRenderOpaque()

Public function Virtual

FFXSystemInt...

 

GetInterface

(
    const FName& InName
)

Return the interface bound to the given name.

Public function Virtual

void

 

OnDestroy()

Gamethread callback when destroy gets called, allows to clean up references.

Public function Virtual

void

 

PostInitViews

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIUniformBuffer* ViewUniform...,
    bool bAllowGPUParticleUpdate
)

Public function Virtual

void

 

PostRenderOpaque

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIUniformBuffer* ViewUniform...,
    const FShaderParametersMetadata...,
    FRHIUniformBuffer* SceneTextur...,
    bool bAllowGPUParticleUpdate
)

Notification from the renderer that opaque primitives have rendered.

Public function Virtual

void

 

PreInitViews

(
    FRHICommandListImmediate& RHICmdLi...,
    bool bAllowGPUParticleUpdate
)

Notification from the renderer that it is about to perform visibility checks on FX belonging to this system.

Public function Virtual

void

 

PreRender

(
    FRHICommandListImmediate& RHICmdLi...,
    const FGlobalDistanceFieldParameter...,
    bool bAllowGPUParticleSceneUpdate
)

Notification from the renderer that it is about to draw FX belonging to this system.

Public function Virtual

void

 

RemoveVectorField

(
    UVectorFieldComponent* VectorF...
)

Remove a vector field from the FX system.

Public function Virtual Const

bool

 

RequiresEarlyViewUniformBuffer()

Public function Virtual

void

 

Resume()

Resume the FX system. Has no effect if the system was not suspended.

Public function Virtual

void

 

Suspend()

Suspend the FX system.

Public function Virtual

void

 

Tick

(
    float DeltaSeconds
)

Tick the effects system.

Public function Virtual

void

 

UpdateVectorField

(
    UVectorFieldComponent* VectorF...
)

Update a vector field registered with the FX system.

Public function Virtual Const

bool

 

UsesDepthBuffer()

Public function Virtual Const

bool

 

UsesGlobalDistanceField()

Typedefs

Constants

Name

Description

Name

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