Plasma Engine  2.0
Loading...
Searching...
No Matches
SSRPass.h
1#pragma once
2
3#include <Foundation/Reflection/Reflection.h>
4
5#include <RendererCore/Declarations.h>
6#include <RendererCore/Pipeline/RenderPipelinePass.h>
7#include <RendererCore/Shader/ConstantBufferStorage.h>
8#include <RendererCore/Shader/ShaderResource.h>
9
10class PL_RENDERERCORE_DLL plSSRPass : public plRenderPipelinePass
11{
12 PL_ADD_DYNAMIC_REFLECTION(plSSRPass, plRenderPipelinePass);
13
14public:
15 plSSRPass();
16 ~plSSRPass() override;
17
18 virtual plResult Serialize(plStreamWriter& inout_stream) const override;
19 virtual plResult Deserialize(plStreamReader& inout_stream) override;
20
22
24 void ExecuteInactive(const plRenderViewContext& renderViewContext, const plArrayPtr<plRenderPipelinePassConnection* const> inputs, const plArrayPtr<plRenderPipelinePassConnection* const> outputs) override;
25
26protected:
27 void UpdateSSRConstantBuffer() const;
28 void UpdateBlurConstantBuffer() const;
29
30 float m_fRoughnessCutoff;
31 float m_fBlurStrength;
32
33 // SPD shaderDatas
34 plShaderResourceHandle m_hDownscaleShader;
35 plGALBufferHandle m_hDownsampleAtomicCounterBuffer;
36 plArrayPtr<plUInt32> m_DownsampleAtomicCounter;
37 plConstantBufferStorageHandle m_hSPDConstantBuffer;
38
39 plRenderPipelineNodeInputPin m_PinSceneColor;
40 plRenderPipelineNodeInputPin m_PinInputDepth;
41 plRenderPipelineNodeInputPin m_PinInputMaterial;
42 plRenderPipelineNodeInputPin m_PinInputVelocity;
43 plRenderPipelineNodeOutputPin m_PinSSROutput;
44
45 plRenderPipelineNodeInputPin m_PinTextureSSR;
46 plRenderPipelineNodeInputPin m_PinTextureSSR2;
47 plRenderPipelineNodeInputPin m_PinTextureSSRBlur;
48 plRenderPipelineNodeInputPin m_PinTextureRoughness;
49
50 plTexture2DResourceHandle m_hBlueNoiseTexture;
51
52 plShaderResourceHandle m_hShaderDepthHierarchy;
53 plShaderResourceHandle m_hSSRShader;
54 plShaderResourceHandle m_hSSRAntiflicker;
55 plShaderResourceHandle m_hSSRBlur;
56
57 plConstantBufferStorageHandle m_hSSRConstantBuffer;
58 plConstantBufferStorageHandle m_hBlurConstantBuffer;
59};
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
Definition ConstantBufferStorage.h:54
Definition RendererFoundationDLL.h:418
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 SSRPass.h:11
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
Definition RenderPipelineNode.h:44
Definition RenderPipelineNode.h:51
Definition Declarations.h:51
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54