initial commit-moved from vulkan_guide
This commit is contained in:
40
src/render/vk_renderpass_lighting.h
Normal file
40
src/render/vk_renderpass_lighting.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#include "vk_renderpass.h"
|
||||
#include <render/rg_types.h>
|
||||
|
||||
class LightingPass : public IRenderPass
|
||||
{
|
||||
public:
|
||||
void init(EngineContext *context) override;
|
||||
|
||||
void cleanup() override;
|
||||
|
||||
void execute(VkCommandBuffer cmd) override;
|
||||
|
||||
const char *getName() const override { return "Lighting"; }
|
||||
|
||||
void register_graph(class RenderGraph *graph,
|
||||
RGImageHandle drawHandle,
|
||||
RGImageHandle gbufferPosition,
|
||||
RGImageHandle gbufferNormal,
|
||||
RGImageHandle gbufferAlbedo,
|
||||
RGImageHandle shadowDepth);
|
||||
|
||||
private:
|
||||
EngineContext *_context = nullptr;
|
||||
|
||||
VkDescriptorSetLayout _gBufferInputDescriptorLayout = VK_NULL_HANDLE;
|
||||
VkDescriptorSet _gBufferInputDescriptorSet = VK_NULL_HANDLE;
|
||||
VkDescriptorSetLayout _shadowDescriptorLayout = VK_NULL_HANDLE; // set=2
|
||||
|
||||
VkPipelineLayout _pipelineLayout = VK_NULL_HANDLE;
|
||||
VkPipeline _pipeline = VK_NULL_HANDLE;
|
||||
|
||||
void draw_lighting(VkCommandBuffer cmd,
|
||||
EngineContext *context,
|
||||
const class RGPassResources &resources,
|
||||
RGImageHandle drawHandle,
|
||||
RGImageHandle shadowDepth);
|
||||
|
||||
DeletionQueue _deletionQueue;
|
||||
};
|
||||
Reference in New Issue
Block a user