This commit is contained in:
2025-02-17 19:03:56 +06:00
parent 133782b185
commit 5e42628595
11 changed files with 426 additions and 292 deletions

View File

@@ -4,6 +4,7 @@
#include "Common/Abstract.hpp"
#include <Client/Vulkan/Vulkan.hpp>
#include <memory>
#include <optional>
#include <unordered_map>
#include <vulkan/vulkan_core.h>
@@ -84,6 +85,7 @@ class VulkanRenderSession : public IRenderSession, public IVulkanDependent {
struct VulkanContext {
AtlasImage MainTest, LightDummy;
Buffer TestQuad;
std::optional<Buffer> TestVoxel;
VulkanContext(Vulkan *vkInst)
: MainTest(vkInst), LightDummy(vkInst),
@@ -170,6 +172,8 @@ public:
void beforeDraw();
void drawWorld(GlobalTime gTime, float dTime, VkCommandBuffer drawCmd);
static std::vector<VoxelVertexPoint> generateMeshForVoxelChunks(const std::vector<VoxelCube> cubes);
private:
void updateDescriptor_MainAtlas();
void updateDescriptor_VoxelsLight();