Plasma Engine  2.0
Loading...
Searching...
No Matches
AOPass.h
1#pragma once
2
3#include <RendererCore/Declarations.h>
4#include <RendererCore/Pipeline/RenderPipelinePass.h>
5#include <RendererCore/Shader/ConstantBufferStorage.h>
6#include <RendererCore/Shader/ShaderResource.h>
7
8class PL_RENDERERCORE_DLL plAOPass : public plRenderPipelinePass
9{
10 PL_ADD_DYNAMIC_REFLECTION(plAOPass, plRenderPipelinePass);
11
12public:
13 plAOPass();
14 ~plAOPass();
15
17
18 virtual void Execute(const plRenderViewContext& renderViewContext, const plArrayPtr<plRenderPipelinePassConnection* const> inputs, const plArrayPtr<plRenderPipelinePassConnection* const> outputs) override;
19 virtual void ExecuteInactive(const plRenderViewContext& renderViewContext, const plArrayPtr<plRenderPipelinePassConnection* const> inputs, const plArrayPtr<plRenderPipelinePassConnection* const> outputs) override;
20 virtual plResult Serialize(plStreamWriter& inout_stream) const override;
21 virtual plResult Deserialize(plStreamReader& inout_stream) override;
22
23 void SetFadeOutStart(float fStart);
24 float GetFadeOutStart() const;
25
26 void SetFadeOutEnd(float fEnd);
27 float GetFadeOutEnd() const;
28
29protected:
30 void CreateSamplerState();
31
32 plRenderPipelineNodeInputPin m_PinDepthInput;
34
35 float m_fRadius = 1.0f;
36 float m_fMaxScreenSpaceRadius = 1.0f;
37 float m_fContrast = 2.0f;
38 float m_fIntensity = 0.7f;
39
40 float m_fFadeOutStart = 80.0f;
41 float m_fFadeOutEnd = 100.0f;
42
43 float m_fPositionBias = 5.0f;
44 float m_fMipLevelScale = 10.0f;
45 float m_fDepthBlurThreshold = 2.0f;
46
47 plConstantBufferStorageHandle m_hDownscaleConstantBuffer;
48 plConstantBufferStorageHandle m_hSSAOConstantBuffer;
49
50 plTexture2DResourceHandle m_hNoiseTexture;
51
52 plGALSamplerStateHandle m_hSSAOSamplerState;
53
54 plShaderResourceHandle m_hDownscaleShader;
55 plShaderResourceHandle m_hSSAOShader;
56 plShaderResourceHandle m_hBlurShader;
57};
Definition AOPass.h:9
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:481
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....
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