lot more code

This commit is contained in:
Dynamitos
2025-01-28 00:08:52 +01:00
parent 8bcf38834e
commit 65c165f407
14 changed files with 705 additions and 27 deletions
+22
View File
@@ -2,6 +2,7 @@
#include "scene/Renderer.h"
#include <vulkan/vulkan.hpp>
#include <vulkan/vulkan_raii.hpp>
#include <vma/vk_mem_alloc.h>
using namespace vk::raii;
@@ -12,6 +13,17 @@ public:
virtual ~GPURenderer();
private:
struct GPUCamera
{
glm::vec3 cameraPosition;
float f;
glm::vec3 cameraForward;
float S_O;
glm::vec3 fogEmm;
float ks;
float A;
float ka;
};
void createDevice();
void createCommands();
void createDescriptors();
@@ -22,6 +34,7 @@ private:
PhysicalDevice physicalDevice;
Device device;
Queue queue;
VmaAllocator allocator;
uint32_t computeQueueFamily;
CommandPool cmdPool;
@@ -38,5 +51,14 @@ private:
Pipeline pipeline;
VkBuffer cameraBuffer;
VmaAllocation cameraAllocation;
VkImage radianceAccumulator;
VmaAllocation radianceAllocation;
VkImage image;
VmaAllocation imageAllocation;
virtual void render(Camera cam, RenderParameter param);
};