Plasma Engine  2.0
Loading...
Searching...
No Matches
SourcePass.h
1#pragma once
2
3#include <RendererCore/Pipeline/RenderPipelinePass.h>
4
6{
7 using StorageType = plUInt8;
8
9 enum Enum
10 {
11 Color4Channel8BitNormalized_sRGB,
12 Color4Channel8BitNormalized,
13 Color4Channel16BitFloat,
14 Color4Channel32BitFloat,
15 Color3Channel11_11_10BitFloat,
16 Depth16Bit,
17 Depth24BitStencil8Bit,
18 Depth32BitFloat,
19
20 Default = Color4Channel8BitNormalized_sRGB
21 };
22};
23PL_DECLARE_REFLECTABLE_TYPE(PL_RENDERERCORE_DLL, plSourceFormat);
24
25
26class PL_RENDERERCORE_DLL plSourcePass : public plRenderPipelinePass
27{
28 PL_ADD_DYNAMIC_REFLECTION(plSourcePass, plRenderPipelinePass);
29
30public:
31 plSourcePass(const char* szName = "SourcePass");
33
34 static plGALTextureCreationDescription GetOutputDescription(const plView& view, plEnum<plSourceFormat> format, plEnum<plGALMSAASampleCount> msaaMode, bool bUseAsUAV = false);
36 virtual void Execute(const plRenderViewContext& renderViewContext, const plArrayPtr<plRenderPipelinePassConnection* const> inputs, const plArrayPtr<plRenderPipelinePassConnection* const> outputs) override;
37 virtual plResult Serialize(plStreamWriter& inout_stream) const override;
38 virtual plResult Deserialize(plStreamReader& inout_stream) override;
39
40protected:
42
43 plEnum<plSourceFormat> m_Format = plSourceFormat::Default;
44 plEnum<plGALMSAASampleCount> m_MsaaMode = plGALMSAASampleCount::None;
45 plColor m_ClearColor = plColor::Black;
46 bool m_bUseAsUAV = false;
47 bool m_bClear = false;
48};
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
static const plColor Black
#000000
Definition Color.h:57
Definition RenderPipelinePass.h:26
virtual void Execute(const plRenderViewContext &renderViewContext, const plArrayPtr< plRenderPipelinePassConnection *const > inputs, const plArrayPtr< plRenderPipelinePassConnection *const > outputs)=0
Render into outputs. Both inputs and outputs are passed in with actual texture handles....
virtual bool GetRenderTargetDescriptions(const plView &view, const plArrayPtr< plGALTextureCreationDescription *const > inputs, plArrayPtr< plGALTextureCreationDescription > outputs)=0
For a given input pin configuration, provide the output configuration of this node....
Definition SourcePass.h:27
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
Encapsulates a view on the given world through the given camera and rendered with the specified Rende...
Definition View.h:21
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition Descriptors.h:177
Definition RenderPipelineNode.h:51
Definition Declarations.h:51
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
Definition SourcePass.h:6