Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/include/shadowpass.h

42 lines
874 B
C
Raw Normal View History

2018-11-08 08:57:41 -05:00
#pragma once
#include <vulkan/vulkan.h>
class Renderer;
class World;
2018-12-19 12:19:52 -05:00
struct RenderCollection;
2018-11-08 08:57:41 -05:00
class ShadowPass {
public:
ShadowPass(Renderer& renderer);
~ShadowPass();
2018-12-19 12:19:52 -05:00
void render(VkCommandBuffer commandBuffer, RenderCollection& collection);
2018-11-08 08:57:41 -05:00
VkImageView getImageView() const {
return shadowImageView_;
}
VkSampler getSampler() const {
return shadowSampler_;
}
private:
void createRenderPass();
void createFramebuffer();
void createPipeline();
VkRenderPass renderPass_ = nullptr;
VkImage shadowImage_ = nullptr;
VkDeviceMemory shadowMemory_ = nullptr;
VkImageView shadowImageView_ = nullptr;
VkFramebuffer shadowFramebuffer_ = nullptr;
VkSampler shadowSampler_ = nullptr;
VkPipeline pipeline_ = nullptr;
VkPipelineLayout pipelineLayout_ = nullptr;
Renderer& renderer_;
};