Depth Culling works??

This commit is contained in:
Dynamitos committed 2024-06-11 14:15:29 +02:00
1 parent 2ba30a8fcc
commit 52c4f11d28
22 files changed
+264 -92

No files matched your search

@@ -0,0 +1,28 @@
#pragma once
#include "MinimalEngine.h"
#include "RenderPass.h"
namespace Seele {
class DepthCullingPass : public RenderPass {
public:
DepthCullingPass(Gfx::PGraphics graphics, PScene scene);
DepthCullingPass(DepthCullingPass&&) = default;
DepthCullingPass& operator=(DepthCullingPass&&) = default;
virtual ~DepthCullingPass();
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::OTexture2D depthMipTexture;
Gfx::RenderTargetAttachment depthAttachment;
Gfx::RenderTargetAttachment visibilityAttachment;
Gfx::ODescriptorLayout depthTextureLayout;
Gfx::OPipelineLayout depthPrepassLayout;
Gfx::PShaderBuffer cullingBuffer;
};
DEFINE_REF(DepthCullingPass)
} // namespace Seele