跳至内容

GPUParticleRenderModule

class GPUParticleRenderModule : public cauldron::RenderModule

GPUParticlesRenderModule 负责生成并模拟所有具有 ParticleSpawnerComponents 的实体。实际渲染将由半透明渲染模块(GPUParticles 依赖于它)处理,以便与其他半透明实例一起排序。

依赖项: ParallelSort

继承自: public cauldron::RenderModule

公共接口

构造函数

GPUParticleRenderModule

inline GPUParticleRenderModule()

构造。

属性: inline

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 57 行, 第 5 列)

析构函数

~GPUParticleRenderModule

virtual ~GPUParticleRenderModule()

销毁。

属性: virtual

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 62 行, 第 13 列)

公共函数

初始化

virtual void Init(const json &initData) override

初始化函数。设置资源指针、管道对象、根签名和参数集。

参数

名称类型默认
initDataconst json &

属性: virtual

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 67 行, 第 18 列)

执行

virtual void Execute(double deltaTime, cauldron::CommandList *pCmdList) override

如果启用,则执行 GPUParticle 模拟。

参数

名称类型默认
deltaTimedouble
pCmdListcauldron::CommandList *

属性: virtual

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 72 行, 第 18 列)

PreTransCallback

void PreTransCallback(double deltaTime, cauldron::CommandList *pCmdList)

半透明通道预回调,用于在需要时在半透明通道中对粒子进行排序。

参数

名称类型默认
deltaTimedouble
pCmdListcauldron::CommandList *

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 77 行, 第 10 列)

私有接口

私有函数

执行

void Execute(double deltaTime, cauldron::CommandList *pCmdList, cauldron::ParticleSystem *pParticleSystem)

参数

名称类型默认
deltaTimedouble
pCmdListcauldron::CommandList *
pParticleSystemcauldron::ParticleSystem *

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 85 行, 第 10 列)

Emit

void Emit(cauldron::CommandList *pCmdList, cauldron::ParticleSystem *pParticleSystem)

参数

名称类型默认
pCmdListcauldron::CommandList *
pParticleSystemcauldron::ParticleSystem *

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 86 行, 第 10 列)

Simulate

void Simulate(cauldron::CommandList *pCmdList, cauldron::ParticleSystem *pParticleSystem)

参数

名称类型默认
pCmdListcauldron::CommandList *
pParticleSystemcauldron::ParticleSystem *

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 87 行, 第 10 列)

私有成员

cauldron::ParameterSet * m_pParameters

cauldron::ParameterSet * m_pParameters = = nullptr

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 91 行, 第 28 列)

cauldron::PipelineObject * m_pSimulatePipelineObj

cauldron::PipelineObject * m_pSimulatePipelineObj = = nullptr

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 92 行, 第 30 列)

cauldron::PipelineObject * m_pEmitPipelineObj

cauldron::PipelineObject * m_pEmitPipelineObj = = nullptr

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 93 行, 第 30 列)

cauldron::PipelineObject * m_pResetParticlesPipelineObj

cauldron::PipelineObject * m_pResetParticlesPipelineObj = = nullptr

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 94 行, 第 30 列)

cauldron::PipelineObject * m_pClearAliveCountPipelineObj

cauldron::PipelineObject * m_pClearAliveCountPipelineObj = = nullptr

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 95 行, 第 30 列)

cauldron::RootSignature * m_pRootSignature

cauldron::RootSignature * m_pRootSignature = = nullptr

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 96 行, 第 30 列)

const cauldron::Texture * m_pDepthBuffer

const cauldron::Texture * m_pDepthBuffer = = nullptr

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 98 行, 第 29 列)

std::mutex m_CriticalSection

std::mutex m_CriticalSection

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 100 行, 第 16 列)

float m_ElapsedTime

float m_ElapsedTime = = 0.0f

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 102 行, 第 11 列)

bool m_bResetSystem

bool m_bResetSystem = = true

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 103 行, 第 11 列)

bool m_bPlayAnimations

bool m_bPlayAnimations = = true

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 105 行, 第 10 列)

bool m_bSort

bool m_bSort = = true

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 106 行, 第 10 列)

ParallelSort m_ParallelSort

ParallelSort m_ParallelSort

属性: private

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 108 行, 第 18 列)

来源: framework/rendermodules/gpuparticle/gpuparticlerendermodule.h (第 50 行, 第 1 列)

© . This site is unofficial and not affiliated with AMD.