-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGBufferGenerationPass.hpp
More file actions
executable file
·51 lines (38 loc) · 1.48 KB
/
GBufferGenerationPass.hpp
File metadata and controls
executable file
·51 lines (38 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include <cstdint>
#include "RenderPass.hpp"
#include <vector>
#include "Actor.hpp"
class GBufferGenerationPass : public RenderPass
{
private:
VkImage GBufferPositionImage{};
VkImage GBufferNormalImage{};
VkImageView GBufferPositionImageView{};
VkImageView GBufferNormalImageView{};
VkDeviceMemory GBufferMemory{};
VkFramebuffer GBufferGenerationPassFramebuffer{};
VkDescriptorSetLayout DeferredPassSetLayout{};
VkBuffer SceneTransformationUBO{};
VkDeviceMemory SceneTransformationUBOMemory{};
VkDescriptorPool DeferredPassDescriptorPool{};
std::vector<VkDescriptorSet> DescriptorSets;
VkRenderPass SceneRenderPass{};
std::vector<VkPipelineShaderStageCreateInfo> ShaderStages;
VkShaderModule GBufferGenerationVertexShaderModule{};
VkShaderModule GBufferGenerationFragmentShaderModule{};
VkPipelineLayout PipelineLayout{};
VkPipeline Pipeline{};
public:
GBufferGenerationPass(VkDevice Device, const uint32_t GraphicsQueueIndex, const VkPhysicalDeviceMemoryProperties2& DeviceMemoryProperties, VkImageView DepthBuffer);
virtual void FreeGPUResources() override;
void RecordCommandBuffer(VkCommandBuffer CommandBuffer, const std::vector<SceneActor>& Actors);
virtual void SetupShaders() override;
virtual void SetupPipeline() override;
virtual ~GBufferGenerationPass() = default;
struct
{
VkImageView* GBufferPositionImageViewLink = nullptr;
VkImageView* GBufferNormalImageViewLink = nullptr;
} SharedResources;
};