Plasma Engine  2.0
Loading...
Searching...
No Matches
SSRAdvancedPass.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
10struct plPostprocessTileStatistics;
11
12class PL_RENDERERCORE_DLL plSSRAdvancedPass : public plRenderPipelinePass
13{
14 PL_ADD_DYNAMIC_REFLECTION(plSSRAdvancedPass, plRenderPipelinePass);
15
16public:
18 ~plSSRAdvancedPass() override;
19
21
23 void ExecuteInactive(const plRenderViewContext& renderViewContext, const plArrayPtr<plRenderPipelinePassConnection* const> inputs, const plArrayPtr<plRenderPipelinePassConnection* const> outputs) override;
24
25 virtual plResult Serialize(plStreamWriter& inout_stream) const override;
26 virtual plResult Deserialize(plStreamReader& inout_stream) override;
27
28
29protected:
30 void UpdateSSRConstantBuffer() const;
31 void UpdateBlurConstantBuffer() const;
32
33 float m_fMaxDist;
34 float m_fResolution;
35 float m_fThickness;
36 int m_iSteps;
37
38 plRenderPipelineNodeInputPin m_PinSceneColor;
39 plRenderPipelineNodeInputPin m_PinInputDepth;
40 plRenderPipelineNodeInputPin m_PinInputMaterial;
41 plRenderPipelineNodeInputPin m_PinInputVelocity;
42 plRenderPipelineNodeOutputPin m_PinSSROutput;
43
44 plConstantBufferStorageHandle m_hSSRConstantBuffer;
45 plConstantBufferStorageHandle m_hPostProcessConstantBuffer;
46 plShaderResourceHandle m_hShaderTileMinMaxRoughnessHorizontal;
47 plShaderResourceHandle m_hShaderTileMinMaxRoughnessVerticle;
48 plShaderResourceHandle m_hShaderDepthHierarchy;
49 plShaderResourceHandle m_hShaderSSRTrace;
50
51 plGALTextureHandle m_hTextureTileMinMaxRoughnessHorizontal;
52 plGALTextureHandle m_hTileMinMaxRoughness;
53 plGALTextureHandle m_hDepthHierarchy;
54 plGALTextureHandle m_hDepthHierarchyTmp;
55 plGALTextureHandle m_hIndirectSpecular;
56 plGALTextureHandle m_hDirectionPDF;
57 plGALTextureHandle m_hRayLength;
58
59 plTexture2DResourceHandle m_hBlueNoiseTexture;
60
61 plGALBufferHandle m_hTileStatisticsBuffer;
63
64 plGALBufferHandle m_hTilesTracingEarlyexitBuffer;
65 plGALBufferHandle m_hTilesTracingCheapBuffer;
66 plGALBufferHandle m_hTilesTracingExpensiveBuffer;
67 plArrayPtr<plUInt32> m_TilesTracingEarlyexit;
68 plArrayPtr<plUInt32> m_TilesTracingCheap;
69 plArrayPtr<plUInt32> m_TilesTracingExpensive;
70
71 float m_MinMaxRoughnessWidth;
72 float m_MinMaxRoughnessHeight;
73};
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 RendererFoundationDLL.h:411
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 SSRAdvancedPass.h:13
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