26 lines
803 B
C++
26 lines
803 B
C++
#pragma once
|
|||
|
|
#include "RenderPass.h"
|
||
|
|
|
||
|
|
namespace Seele
|
||
|
|
{
|
||
|
|
class CachedDepthPass : public RenderPass
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
CachedDepthPass(Gfx::PGraphics graphics, PScene scene);
|
||
|
|
CachedDepthPass(CachedDepthPass&&) = default;
|
||
|
|
CachedDepthPass& operator=(CachedDepthPass&&) = default;
|
||
|
|
virtual ~CachedDepthPass();
|
||
|
|
virtual void beginFrame(const Component::Camera& cam) override;
|
||
|
|
virtual void render() override;
|
||
|
|
virtual void endFrame() override;
|
||
|
|
virtual void publishOutputs() override;
|
||
|
|
virtual void createRenderPass() override;
|
||
|
|
private:
|
||
|
|
Gfx::RenderTargetAttachment depthAttachment;
|
||
|
|
Gfx::RenderTargetAttachment visibilityAttachment;
|
||
|
|
Gfx::OTexture2D depthBuffer;
|
||
|
|
Gfx::OTexture2D visibilityBuffer;
|
||
|
|
Gfx::OPipelineLayout depthPrepassLayout;
|
||
|
|
};
|
||
|
|
DEFINE_REF(CachedDepthPass)
|
||
|
|
}
|