Files
Seele/src/Engine/Graphics/RenderPass/DepthPrepass.h
T

38 lines
1.2 KiB
C++
Raw Normal View History

2021-05-06 17:02:10 +02:00
#pragma once
#include "MinimalEngine.h"
#include "RenderPass.h"
namespace Seele
{
2023-10-24 15:01:09 +02:00
class DepthPrepass : public RenderPass
2021-05-06 17:02:10 +02:00
{
public:
2023-10-24 15:01:09 +02:00
DepthPrepass(Gfx::PGraphics graphics, PScene scene);
2023-11-05 10:36:01 +01:00
DepthPrepass(DepthPrepass&&) = default;
DepthPrepass& operator=(DepthPrepass&&) = default;
virtual ~DepthPrepass();
2022-11-17 16:47:42 +01:00
virtual void beginFrame(const Component::Camera& cam) override;
2022-04-15 23:45:44 +02:00
virtual void render() override;
virtual void endFrame() override;
2021-05-06 17:02:10 +02:00
virtual void publishOutputs() override;
virtual void createRenderPass() override;
static void modifyRenderPassMacros(Map<const char*, const char*>& defines);
private:
Gfx::PRenderTargetAttachment depthAttachment;
Gfx::PTexture2D depthBuffer;
2023-10-24 15:01:09 +02:00
2021-05-06 17:02:10 +02:00
Array<Gfx::PDescriptorSet> descriptorSets;
2023-10-24 15:01:09 +02:00
2023-11-01 23:12:30 +01:00
Gfx::OPipelineLayout depthPrepassLayout;
2021-05-06 17:02:10 +02:00
// Set 0: viewParameter
// Set 1: materials, generated
2023-11-05 10:36:01 +01:00
constexpr static uint32 INDEX_MATERIAL = 1;
2023-10-24 15:01:09 +02:00
// Set 2: vertices, from VertexData
2023-11-05 10:36:01 +01:00
constexpr static uint32 INDEX_VERTEX_DATA = 2;
2023-10-24 15:01:09 +02:00
// Set 3: mesh data, either index buffer or meshlet data
2023-11-05 10:36:01 +01:00
constexpr static uint32 INDEX_SCENE_DATA = 3;
2023-11-01 23:12:30 +01:00
Gfx::ODescriptorLayout sceneDataLayout;
2021-05-06 17:02:10 +02:00
};
DEFINE_REF(DepthPrepass)
} // namespace Seele