Plasma Engine  2.0
Loading...
Searching...
No Matches
ParticleRenderer.h
1#pragma once
2
3#include <Foundation/Math/Color16f.h>
4#include <ParticlePlugin/ParticlePluginDLL.h>
5#include <RendererCore/Meshes/MeshRenderer.h>
6#include <RendererCore/Shader/ConstantBufferStorage.h>
7#include <RendererCore/Shader/ShaderResource.h>
8#include <RendererCore/Textures/Texture2DResource.h>
9
10#include <RendererCore/../../../Data/Base/Shaders/Particles/ParticleSystemConstants.h>
11
12class plRenderContext;
13
15class PL_PARTICLEPLUGIN_DLL plParticleRenderer : public plRenderer
16{
17 PL_ADD_DYNAMIC_REFLECTION(plParticleRenderer, plRenderer);
18 PL_DISALLOW_COPY_AND_ASSIGN(plParticleRenderer);
19
20public:
23
24 virtual void GetSupportedRenderDataCategories(plHybridArray<plRenderData::Category, 8>& ref_categories) const override;
25
26protected:
28 {
29 TempSystemCB(plRenderContext* pRenderContext);
31
32 void SetGenericData(bool bApplyObjectTransform, const plTransform& objectTransform, plTime effectLifeTime, plUInt8 uiNumVariationsX, plUInt8 uiNumVariationsY, plUInt8 uiNumFlipbookAnimsX, plUInt8 uiNumFlipbookAnimsY, float fDistortionStrength = 0, float fNormalCurvature = 0, float fLightDirectionality = 0);
33 void SetTrailData(float fSnapshotFraction, plInt32 iNumUsedTrailPoints);
34
36 plConstantBufferStorageHandle m_hConstantBuffer;
37 };
38
39 void CreateParticleDataBuffer(plGALBufferHandle& inout_hBuffer, plUInt32 uiDataTypeSize, plUInt32 uiNumParticlesPerBatch);
40 void DestroyParticleDataBuffer(plGALBufferHandle& inout_hBuffer);
41 void BindParticleShader(plRenderContext* pRenderContext, const char* szShader) const;
42
43protected:
44 plShaderResourceHandle m_hShader;
45};
Definition ConstantBufferStorage.h:54
Definition ConstantBufferStorage.h:34
Definition RendererFoundationDLL.h:418
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Implements rendering of particle systems.
Definition ParticleRenderer.h:16
Definition RenderContext.h:30
This is the base class for types that handle rendering of different object types.
Definition Renderer.h:9
Definition ParticleRenderer.h:28
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12