2024-05-30 16:56:22 +02:00
|
|
|
#pragma once
|
|
|
|
|
#include "RenderPass.h"
|
2024-06-11 16:55:20 +02:00
|
|
|
#include "Graphics/Query.h"
|
2024-05-30 16:56:22 +02:00
|
|
|
|
2024-06-09 12:20:04 +02:00
|
|
|
namespace Seele {
|
|
|
|
|
class CachedDepthPass : public RenderPass {
|
|
|
|
|
public:
|
2024-05-30 16:56:22 +02:00
|
|
|
CachedDepthPass(Gfx::PGraphics graphics, PScene scene);
|
|
|
|
|
CachedDepthPass(CachedDepthPass&&) = default;
|
|
|
|
|
CachedDepthPass& operator=(CachedDepthPass&&) = default;
|
|
|
|
|
virtual ~CachedDepthPass();
|
2025-04-11 23:13:19 +02:00
|
|
|
virtual void beginFrame(const Component::Camera& cam, const Component::Transform& transform) override;
|
2024-05-30 16:56:22 +02:00
|
|
|
virtual void render() override;
|
|
|
|
|
virtual void endFrame() override;
|
|
|
|
|
virtual void publishOutputs() override;
|
|
|
|
|
virtual void createRenderPass() override;
|
2024-06-09 12:20:04 +02:00
|
|
|
|
|
|
|
|
private:
|
2024-05-30 16:56:22 +02:00
|
|
|
Gfx::RenderTargetAttachment depthAttachment;
|
|
|
|
|
Gfx::RenderTargetAttachment visibilityAttachment;
|
|
|
|
|
Gfx::OTexture2D depthBuffer;
|
|
|
|
|
Gfx::OTexture2D visibilityBuffer;
|
|
|
|
|
Gfx::OPipelineLayout depthPrepassLayout;
|
2024-06-15 21:47:20 +02:00
|
|
|
Gfx::OPipelineStatisticsQuery query;
|
2024-07-01 12:17:04 +02:00
|
|
|
Gfx::OTimestampQuery timestamps;
|
2024-06-09 12:20:04 +02:00
|
|
|
|
2024-06-07 09:19:47 +02:00
|
|
|
Gfx::PShaderBuffer cullingBuffer;
|
2025-01-08 19:15:12 +01:00
|
|
|
PScene scene;
|
2024-05-30 16:56:22 +02:00
|
|
|
};
|
|
|
|
|
DEFINE_REF(CachedDepthPass)
|
2024-06-09 12:20:04 +02:00
|
|
|
} // namespace Seele
|