From df4194be51f46604482ac0becfcb1a682cffbf3a Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Thu, 31 Aug 2023 21:16:11 +0200 Subject: [PATCH] Update how camera data is communicated to shader --- openVulkanoCpp/Scene/Camera.hpp | 11 +- .../Shader/DescriptorInputDescription.hpp | 1 + openVulkanoCpp/Scene/Shader/Shader.hpp | 2 +- openVulkanoCpp/Shader/Shaders.c | 288 +++++++++--------- openVulkanoCpp/Shader/Shaders.h | 12 +- openVulkanoCpp/Shader/background.frag | 4 +- openVulkanoCpp/Shader/background.vert | 2 +- openVulkanoCpp/Shader/basic.vert | 4 +- openVulkanoCpp/Shader/grid.frag | 2 +- openVulkanoCpp/Shader/grid.vert | 2 +- openVulkanoCpp/Shader/pointCloud.vert | 4 +- .../Vulkan/Debuging/ValidationLayer.cpp | 2 +- openVulkanoCpp/Vulkan/RenderPass.cpp | 4 +- openVulkanoCpp/Vulkan/Renderer.cpp | 7 +- .../Vulkan/Resources/ResourceManager.cpp | 20 +- .../Vulkan/Resources/ResourceManager.hpp | 3 + .../Vulkan/Resources/UniformBuffer.hpp | 12 +- openVulkanoCpp/Vulkan/Scene/VulkanCamera.hpp | 38 +++ openVulkanoCpp/Vulkan/Scene/VulkanShader.cpp | 18 +- openVulkanoCpp/Vulkan/Scene/VulkanShader.hpp | 2 +- openVulkanoCpp/Vulkan/VulkanDrawContext.hpp | 4 +- 21 files changed, 265 insertions(+), 177 deletions(-) create mode 100644 openVulkanoCpp/Vulkan/Scene/VulkanCamera.hpp diff --git a/openVulkanoCpp/Scene/Camera.hpp b/openVulkanoCpp/Scene/Camera.hpp index 1150219..3b145ed 100644 --- a/openVulkanoCpp/Scene/Camera.hpp +++ b/openVulkanoCpp/Scene/Camera.hpp @@ -27,9 +27,18 @@ namespace openVulkanoCpp::Scene { } - ~Camera() override = default; + ~Camera() override + { + //if (renderCamera) renderCamera->Close(); + } public: + static constexpr size_t SIZE = sizeof(Math::Matrix4f) * 3 + sizeof(Math::Vector4f) + sizeof(float) * 8; + + ICloseable* renderCamera = nullptr; + + void* GetData() { return &m_viewProjection; } + void Init(float width, float height, float nearPlane, float farPlane) { m_width = width; diff --git a/openVulkanoCpp/Scene/Shader/DescriptorInputDescription.hpp b/openVulkanoCpp/Scene/Shader/DescriptorInputDescription.hpp index d008182..7cbd7fb 100644 --- a/openVulkanoCpp/Scene/Shader/DescriptorInputDescription.hpp +++ b/openVulkanoCpp/Scene/Shader/DescriptorInputDescription.hpp @@ -65,4 +65,5 @@ namespace openVulkanoCpp }; static constexpr inline DescriptorSetLayoutBinding NODE_LAYOUT_BINDING = {0, DescriptorSetLayoutBinding::Type::TYPE_UNIFORM_BUFFER_DYNAMIC, 1, ShaderProgramType::ALL_GRAPHICS}; + static constexpr inline DescriptorSetLayoutBinding CAM_LAYOUT_BINDING = {0, DescriptorSetLayoutBinding::Type::TYPE_UNIFORM_BUFFER_DYNAMIC, 1, ShaderProgramType::ALL_GRAPHICS}; } \ No newline at end of file diff --git a/openVulkanoCpp/Scene/Shader/Shader.hpp b/openVulkanoCpp/Scene/Shader/Shader.hpp index 3583c74..d06174a 100644 --- a/openVulkanoCpp/Scene/Shader/Shader.hpp +++ b/openVulkanoCpp/Scene/Shader/Shader.hpp @@ -78,7 +78,7 @@ namespace openVulkanoCpp::Scene bool alphaBlend = false; // TODO allow fine control over blending Shader() = default; - ~Shader() override { if (renderShader) Shader::Close(); } + ~Shader() override { /*if (renderShader) Shader::Close();*/ } Shader& AddShaderProgram(const ShaderProgram& shaderProgram) { diff --git a/openVulkanoCpp/Shader/Shaders.c b/openVulkanoCpp/Shader/Shaders.c index 0e55bbf..19a2523 100644 --- a/openVulkanoCpp/Shader/Shaders.c +++ b/openVulkanoCpp/Shader/Shaders.c @@ -3,8 +3,8 @@ #include "Shaders.h" /* Contents of file background.frag.spv */ -const long int background_frag_spv_size = 1044; -const unsigned char background_frag_spv[1044] = { +const long int background_frag_spv_size = 1076; +const unsigned char background_frag_spv[1076] = { 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4C, 0x53, 0x4C, 0x2E, 0x73, 0x74, 0x64, 0x2E, 0x34, 0x35, 0x30, @@ -46,6 +46,8 @@ const unsigned char background_frag_spv[1044] = { 0x15, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x15, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xD4, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, @@ -62,8 +64,8 @@ const unsigned char background_frag_spv[1044] = { 0x18, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, - 0x3B, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x3B, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, @@ -74,8 +76,8 @@ const unsigned char background_frag_spv[1044] = { }; /* Contents of file background.vert.spv */ -const long int background_vert_spv_size = 2948; -const unsigned char background_vert_spv[2948] = { +const long int background_vert_spv_size = 2980; +const unsigned char background_vert_spv[2980] = { 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x00, 0x08, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4C, 0x53, 0x4C, 0x2E, 0x73, 0x74, 0x64, 0x2E, 0x34, 0x35, 0x30, @@ -146,6 +148,8 @@ const unsigned char background_vert_spv[2948] = { 0x1D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xEC, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, @@ -183,11 +187,11 @@ const unsigned char background_vert_spv[2948] = { 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x04, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, - 0x3B, 0x00, 0x04, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x04, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, + 0x3B, 0x00, 0x04, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x29, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, @@ -293,16 +297,16 @@ const unsigned char basic_frag_spv[376] = { }; /* Contents of file basic.vert.spv */ -const long int basic_vert_spv_size = 2824; -const unsigned char basic_vert_spv[2824] = { - 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x00, 0x08, 0x00, 0x5F, 0x00, 0x00, 0x00, +const long int basic_vert_spv_size = 2840; +const unsigned char basic_vert_spv[2840] = { + 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x00, 0x08, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4C, 0x53, 0x4C, 0x2E, 0x73, 0x74, 0x64, 0x2E, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x69, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, - 0x3C, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x5D, 0x00, 0x00, 0x00, - 0x5E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0xC2, 0x01, 0x00, 0x00, + 0x3C, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, + 0x5D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0xC2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00, 0x47, 0x4C, 0x5F, 0x41, 0x52, 0x42, 0x5F, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x5F, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x5F, 0x6F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x73, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x69, 0x6E, @@ -332,9 +336,9 @@ const unsigned char basic_vert_spv[2824] = { 0x74, 0x61, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x54, 0x00, 0x00, 0x00, 0x63, 0x61, 0x6D, 0x00, 0x05, 0x00, 0x04, 0x00, - 0x5C, 0x00, 0x00, 0x00, 0x74, 0x61, 0x6E, 0x67, 0x65, 0x6E, 0x74, 0x00, 0x05, 0x00, 0x05, 0x00, - 0x5D, 0x00, 0x00, 0x00, 0x62, 0x69, 0x54, 0x61, 0x6E, 0x67, 0x65, 0x6E, 0x74, 0x00, 0x00, 0x00, - 0x05, 0x00, 0x07, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, + 0x5B, 0x00, 0x00, 0x00, 0x74, 0x61, 0x6E, 0x67, 0x65, 0x6E, 0x74, 0x00, 0x05, 0x00, 0x05, 0x00, + 0x5C, 0x00, 0x00, 0x00, 0x62, 0x69, 0x54, 0x61, 0x6E, 0x67, 0x65, 0x6E, 0x74, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x07, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6F, 0x6F, 0x72, 0x64, 0x69, 0x6E, 0x61, 0x74, 0x65, 0x73, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -356,9 +360,11 @@ const unsigned char basic_vert_spv[2824] = { 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x52, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x47, 0x00, 0x04, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x47, 0x00, 0x04, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x47, 0x00, 0x04, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, @@ -395,12 +401,11 @@ const unsigned char basic_vert_spv[2824] = { 0x50, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x50, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x03, 0x00, 0x52, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x53, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x53, 0x00, 0x00, 0x00, - 0x54, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x55, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x53, 0x00, 0x00, 0x00, + 0x54, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x5B, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, - 0x5D, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, - 0x5E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x5D, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, @@ -463,20 +468,20 @@ const unsigned char basic_vert_spv[2824] = { 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x4B, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x05, 0x00, 0x55, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, - 0x56, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, - 0x0E, 0x00, 0x00, 0x00, 0x91, 0x00, 0x05, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, - 0x57, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x06, 0x00, 0x0C, 0x00, 0x00, 0x00, - 0x5A, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x05, 0x00, 0x39, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x05, 0x00, 0x15, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, + 0x0E, 0x00, 0x00, 0x00, 0x91, 0x00, 0x05, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, + 0x56, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x06, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x59, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x05, 0x00, 0x39, 0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x5A, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00 }; /* Contents of file grid.frag.spv */ -const long int grid_frag_spv_size = 6440; -const unsigned char grid_frag_spv[6440] = { +const long int grid_frag_spv_size = 6472; +const unsigned char grid_frag_spv[6472] = { 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x00, 0x08, 0x00, 0x0A, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4C, 0x53, 0x4C, 0x2E, 0x73, 0x74, 0x64, 0x2E, 0x34, 0x35, 0x30, @@ -551,6 +556,8 @@ const unsigned char grid_frag_spv[6440] = { 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xD4, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, + 0x8D, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, + 0x8D, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xD1, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xD6, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xE6, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, @@ -582,13 +589,13 @@ const unsigned char grid_frag_spv[6440] = { 0x0A, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x08, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x8A, 0x00, 0x00, 0x00, 0x8A, 0x00, 0x00, 0x00, 0x8A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8C, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x8C, 0x00, 0x00, 0x00, - 0x8D, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x8E, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x8C, 0x00, 0x00, 0x00, + 0x8D, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x8A, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x8E, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x8A, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x8E, 0x00, 0x00, 0x00, 0xB2, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xB3, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x8E, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x8E, 0x00, 0x00, 0x00, 0xB7, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0xD0, 0x00, 0x00, 0x00, 0xD1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xD2, 0x00, 0x00, 0x00, @@ -883,8 +890,8 @@ const unsigned char grid_frag_spv[6440] = { }; /* Contents of file grid.vert.spv */ -const long int grid_vert_spv_size = 3308; -const unsigned char grid_vert_spv[3308] = { +const long int grid_vert_spv_size = 3340; +const unsigned char grid_vert_spv[3340] = { 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x00, 0x08, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4C, 0x53, 0x4C, 0x2E, 0x73, 0x74, 0x64, 0x2E, 0x34, 0x35, 0x30, @@ -949,7 +956,9 @@ const unsigned char grid_vert_spv[3308] = { 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x23, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, - 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3D, 0x00, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x43, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x56, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x66, 0x00, 0x00, 0x00, @@ -986,11 +995,11 @@ const unsigned char grid_vert_spv[3308] = { 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x06, 0x00, 0x23, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x24, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x24, 0x00, 0x00, 0x00, - 0x25, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x28, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x3C, 0x00, 0x00, 0x00, @@ -1095,15 +1104,15 @@ const unsigned char grid_vert_spv[3308] = { }; /* Contents of file pointCloud.vert.spv */ -const long int pointCloud_vert_spv_size = 3244; -const unsigned char pointCloud_vert_spv[3244] = { - 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x00, 0x08, 0x00, 0x5F, 0x00, 0x00, 0x00, +const long int pointCloud_vert_spv_size = 3260; +const unsigned char pointCloud_vert_spv[3260] = { + 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x00, 0x08, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4C, 0x53, 0x4C, 0x2E, 0x73, 0x74, 0x64, 0x2E, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x69, 0x6E, - 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, - 0x3D, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, + 0x3C, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0xC2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00, 0x47, 0x4C, 0x5F, 0x41, 0x52, 0x42, 0x5F, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x5F, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x5F, 0x6F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x73, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, @@ -1136,18 +1145,18 @@ const unsigned char pointCloud_vert_spv[3244] = { 0x65, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x00, 0x06, 0x00, 0x08, 0x00, 0x28, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x70, 0x69, 0x78, 0x65, 0x6C, 0x53, 0x63, 0x61, 0x6C, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x2A, 0x00, 0x00, 0x00, - 0x63, 0x61, 0x6D, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x6F, 0x75, 0x74, 0x43, - 0x6F, 0x6C, 0x6F, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3D, 0x00, 0x00, 0x00, - 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x63, 0x61, 0x6D, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x6F, 0x75, 0x74, 0x43, + 0x6F, 0x6C, 0x6F, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3C, 0x00, 0x00, 0x00, + 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x40, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, 0x65, 0x72, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x00, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x06, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, - 0x6F, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x06, 0x00, 0x07, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x06, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, + 0x6F, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x06, 0x00, 0x07, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, 0x6F, 0x69, 0x6E, 0x74, 0x53, 0x69, 0x7A, 0x65, - 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x43, 0x6C, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x00, - 0x06, 0x00, 0x07, 0x00, 0x41, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x43, + 0x06, 0x00, 0x07, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x43, 0x75, 0x6C, 0x6C, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x00, 0x05, 0x00, 0x03, 0x00, - 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x5E, 0x00, 0x00, 0x00, + 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, @@ -1179,15 +1188,17 @@ const unsigned char pointCloud_vert_spv[3244] = { 0x48, 0x00, 0x05, 0x00, 0x28, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x28, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xEC, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x28, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, - 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x48, 0x00, 0x05, 0x00, 0x41, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x47, 0x00, 0x04, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x48, 0x00, 0x05, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x04, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, @@ -1214,28 +1225,27 @@ const unsigned char pointCloud_vert_spv[3244] = { 0x28, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x29, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x29, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x29, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x02, 0x00, 0x35, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, - 0x3B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, - 0x3B, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, - 0x19, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x04, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x06, 0x00, - 0x41, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x42, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x42, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x44, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x4B, 0x00, 0x00, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4C, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x43, 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x41, 0x20, 0x00, 0x04, 0x00, 0x56, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x19, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x02, 0x00, 0x34, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, + 0x3A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, + 0x3A, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x04, 0x00, + 0x3F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x06, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, + 0x3F, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x41, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x41, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x43, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, + 0x0B, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x43, 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x41, 0x20, 0x00, 0x04, 0x00, 0x55, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x19, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, @@ -1254,61 +1264,61 @@ const unsigned char pointCloud_vert_spv[3244] = { 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, - 0x2B, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x3D, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, - 0x83, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, - 0x2D, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x08, 0x00, 0x24, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, - 0x2E, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x26, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, - 0x3D, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, - 0x4F, 0x00, 0x08, 0x00, 0x24, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x3D, 0x00, 0x04, 0x00, 0x24, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, - 0x94, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, - 0x32, 0x00, 0x00, 0x00, 0xBA, 0x00, 0x05, 0x00, 0x35, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, - 0x33, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0xF7, 0x00, 0x03, 0x00, 0x38, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFA, 0x00, 0x04, 0x00, 0x36, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, - 0x38, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x02, 0x00, 0x37, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, - 0x3E, 0x00, 0x03, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0xF9, 0x00, 0x02, 0x00, - 0x38, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x02, 0x00, 0x38, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, - 0x3C, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x44, 0x00, 0x00, 0x00, - 0x45, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x91, 0x00, 0x05, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x05, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x49, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x05, 0x00, 0x4C, 0x00, 0x00, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, - 0x4B, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, - 0x4D, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x24, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, - 0x26, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x88, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x08, 0x00, 0x06, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, - 0x54, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x56, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, - 0x43, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x57, 0x00, 0x00, 0x00, - 0x55, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, - 0x1D, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x56, 0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x00, - 0x43, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x06, 0x00, 0x56, 0x00, 0x00, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, - 0x0F, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x5D, 0x00, 0x00, 0x00, - 0x5C, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00 + 0x11, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x3D, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, + 0x83, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, + 0x2C, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x08, 0x00, 0x24, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, + 0x2D, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x26, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, + 0x3D, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, + 0x4F, 0x00, 0x08, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, + 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x3D, 0x00, 0x04, 0x00, 0x24, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x94, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x31, 0x00, 0x00, 0x00, 0xBA, 0x00, 0x05, 0x00, 0x34, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0xF7, 0x00, 0x03, 0x00, 0x37, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFA, 0x00, 0x04, 0x00, 0x35, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x37, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x02, 0x00, 0x36, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x3E, 0x00, 0x03, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0xF9, 0x00, 0x02, 0x00, + 0x37, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x02, 0x00, 0x37, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, + 0x3B, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x43, 0x00, 0x00, 0x00, + 0x44, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x91, 0x00, 0x05, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x05, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, + 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x48, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x05, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x4C, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, + 0x4A, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x4D, 0x00, 0x00, 0x00, + 0x4C, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x24, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, + 0x26, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, + 0x88, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, + 0x51, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x08, 0x00, 0x06, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x53, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x55, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, + 0x42, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x56, 0x00, 0x00, 0x00, + 0x54, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, + 0x1D, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x55, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, + 0x42, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x06, 0x00, 0x55, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, + 0x0F, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x5C, 0x00, 0x00, 0x00, + 0x5B, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00 }; const TFileTableEntry fileTable[] = { - {"background.frag.spv", background_frag_spv, 1044}, - {"background.vert.spv", background_vert_spv, 2948}, + {"background.frag.spv", background_frag_spv, 1076}, + {"background.vert.spv", background_vert_spv, 2980}, {"basic.frag.spv", basic_frag_spv, 376}, - {"basic.vert.spv", basic_vert_spv, 2824}, - {"grid.frag.spv", grid_frag_spv, 6440}, - {"grid.vert.spv", grid_vert_spv, 3308}, - {"pointCloud.vert.spv", pointCloud_vert_spv, 3244} + {"basic.vert.spv", basic_vert_spv, 2840}, + {"grid.frag.spv", grid_frag_spv, 6472}, + {"grid.vert.spv", grid_vert_spv, 3340}, + {"pointCloud.vert.spv", pointCloud_vert_spv, 3260} }; const unsigned int fileTableSize = 7; diff --git a/openVulkanoCpp/Shader/Shaders.h b/openVulkanoCpp/Shader/Shaders.h index d273899..b35c090 100644 --- a/openVulkanoCpp/Shader/Shaders.h +++ b/openVulkanoCpp/Shader/Shaders.h @@ -4,11 +4,11 @@ /* Contents of file background.frag.spv */ extern const long int background_frag_spv_size; -extern const unsigned char background_frag_spv[1044]; +extern const unsigned char background_frag_spv[1076]; /* Contents of file background.vert.spv */ extern const long int background_vert_spv_size; -extern const unsigned char background_vert_spv[2948]; +extern const unsigned char background_vert_spv[2980]; /* Contents of file basic.frag.spv */ extern const long int basic_frag_spv_size; @@ -16,19 +16,19 @@ extern const unsigned char basic_frag_spv[376]; /* Contents of file basic.vert.spv */ extern const long int basic_vert_spv_size; -extern const unsigned char basic_vert_spv[2824]; +extern const unsigned char basic_vert_spv[2840]; /* Contents of file grid.frag.spv */ extern const long int grid_frag_spv_size; -extern const unsigned char grid_frag_spv[6440]; +extern const unsigned char grid_frag_spv[6472]; /* Contents of file grid.vert.spv */ extern const long int grid_vert_spv_size; -extern const unsigned char grid_vert_spv[3308]; +extern const unsigned char grid_vert_spv[3340]; /* Contents of file pointCloud.vert.spv */ extern const long int pointCloud_vert_spv_size; -extern const unsigned char pointCloud_vert_spv[3244]; +extern const unsigned char pointCloud_vert_spv[3260]; /* File table comprising original file name, address and size */ typedef struct { diff --git a/openVulkanoCpp/Shader/background.frag b/openVulkanoCpp/Shader/background.frag index c7731dc..897da81 100644 --- a/openVulkanoCpp/Shader/background.frag +++ b/openVulkanoCpp/Shader/background.frag @@ -2,13 +2,13 @@ layout (binding = 0) uniform sampler2D camTexture; #ifdef ENABLE_DEPTH_WRITE -layout (binding = 1) uniform sampler2D depthMap; +layout (set = 1, binding = 0) uniform sampler2D depthMap; #endif layout (location = 0) in vec2 texCoords; layout (location = 0) out vec4 fragColor; -layout(std140, push_constant) uniform CameraData +layout(set = 1, binding = 0) uniform CameraData { mat4 viewProjection; mat4 view; diff --git a/openVulkanoCpp/Shader/background.vert b/openVulkanoCpp/Shader/background.vert index 77aa76e..cf56d75 100644 --- a/openVulkanoCpp/Shader/background.vert +++ b/openVulkanoCpp/Shader/background.vert @@ -1,7 +1,7 @@ #version 450 #extension GL_ARB_separate_shader_objects : enable -layout(std140, push_constant) uniform CameraData +layout(set = 1, binding = 0) uniform CameraData { mat4 viewProjection; mat4 view; diff --git a/openVulkanoCpp/Shader/basic.vert b/openVulkanoCpp/Shader/basic.vert index cefb660..6a55b9f 100644 --- a/openVulkanoCpp/Shader/basic.vert +++ b/openVulkanoCpp/Shader/basic.vert @@ -9,12 +9,12 @@ layout(location = 4) in vec3 textureCoordinates; layout(location = 5) in vec4 color; layout(location = 0) out vec4 outColor; -layout(binding = 0) uniform NodeData +layout(set = 0, binding = 0) uniform NodeData { mat4 world; } node; -layout(std140, push_constant) uniform CameraData { +layout(set = 1, binding = 0) uniform CameraData { mat4 viewProjection; } cam; diff --git a/openVulkanoCpp/Shader/grid.frag b/openVulkanoCpp/Shader/grid.frag index 5dddbfb..f1ddb88 100644 --- a/openVulkanoCpp/Shader/grid.frag +++ b/openVulkanoCpp/Shader/grid.frag @@ -4,7 +4,7 @@ layout(location = 0) in vec3 nearPoint; layout(location = 1) in vec3 farPoint; layout(location = 0) out vec4 outColor; -layout(std140, push_constant) uniform CameraData +layout(set = 1, binding = 0) uniform CameraData { mat4 viewProjection; mat4 view; diff --git a/openVulkanoCpp/Shader/grid.vert b/openVulkanoCpp/Shader/grid.vert index 998e589..3f0b790 100644 --- a/openVulkanoCpp/Shader/grid.vert +++ b/openVulkanoCpp/Shader/grid.vert @@ -1,7 +1,7 @@ #version 450 #extension GL_ARB_separate_shader_objects : enable -layout(std140, push_constant) uniform CameraData +layout(set = 1, binding = 0) uniform CameraData { mat4 viewProjection; mat4 view; diff --git a/openVulkanoCpp/Shader/pointCloud.vert b/openVulkanoCpp/Shader/pointCloud.vert index 925f9dd..b4854d2 100644 --- a/openVulkanoCpp/Shader/pointCloud.vert +++ b/openVulkanoCpp/Shader/pointCloud.vert @@ -7,12 +7,12 @@ layout(location = 2) in vec4 color; layout(location = 3) in float weight; layout(location = 0) out vec4 outColor; -layout(binding = 0) uniform NodeData +layout(set = 0, binding = 0) uniform NodeData { mat4 world; } node; -layout(std140, push_constant) uniform CameraData +layout(set = 1, binding = 0) uniform CameraData { mat4 viewProjection; mat4 view; diff --git a/openVulkanoCpp/Vulkan/Debuging/ValidationLayer.cpp b/openVulkanoCpp/Vulkan/Debuging/ValidationLayer.cpp index e6ae466..0732193 100644 --- a/openVulkanoCpp/Vulkan/Debuging/ValidationLayer.cpp +++ b/openVulkanoCpp/Vulkan/Debuging/ValidationLayer.cpp @@ -8,7 +8,7 @@ #include "Base/Logger.hpp" #include -#define RENDER_DOC +//#define RENDER_DOC namespace openVulkanoCpp::Vulkan { diff --git a/openVulkanoCpp/Vulkan/RenderPass.cpp b/openVulkanoCpp/Vulkan/RenderPass.cpp index ddbf248..1c23f59 100644 --- a/openVulkanoCpp/Vulkan/RenderPass.cpp +++ b/openVulkanoCpp/Vulkan/RenderPass.cpp @@ -61,14 +61,14 @@ namespace openVulkanoCpp::Vulkan // Color attachment attachments.emplace_back(vk::AttachmentDescriptionFlags(), m_frameBuffer->GetColorFormat(), vk::SampleCountFlagBits::e1, m_useClearColor ? vk::AttachmentLoadOp::eClear : vk::AttachmentLoadOp::eLoad, vk::AttachmentStoreOp::eStore, vk::AttachmentLoadOp::eLoad, - vk::AttachmentStoreOp::eStore, vk::ImageLayout::eUndefined, vk::ImageLayout::ePresentSrcKHR); + vk::AttachmentStoreOp::eStore, vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR); vk::AttachmentReference* depthReference = nullptr; if (m_frameBuffer->UseDepthBuffer()) { // Depth attachment attachments.emplace_back(vk::AttachmentDescriptionFlags(), m_frameBuffer->GetDepthFormat(), vk::SampleCountFlagBits::e1, m_useClearDepth ? vk::AttachmentLoadOp::eClear : vk::AttachmentLoadOp::eLoad, vk::AttachmentStoreOp::eDontCare, m_useClearDepth ? vk::AttachmentLoadOp::eClear : vk::AttachmentLoadOp::eLoad, - vk::AttachmentStoreOp::eDontCare, vk::ImageLayout::eUndefined, vk::ImageLayout::eDepthStencilAttachmentOptimal); + vk::AttachmentStoreOp::eDontCare, vk::ImageLayout::eDepthStencilAttachmentOptimal, vk::ImageLayout::eDepthStencilAttachmentOptimal); depthReference = new vk::AttachmentReference(1, vk::ImageLayout::eDepthStencilAttachmentOptimal); } diff --git a/openVulkanoCpp/Vulkan/Renderer.cpp b/openVulkanoCpp/Vulkan/Renderer.cpp index 15daf2f..9badbc0 100644 --- a/openVulkanoCpp/Vulkan/Renderer.cpp +++ b/openVulkanoCpp/Vulkan/Renderer.cpp @@ -13,6 +13,7 @@ #include "Scene/VulkanShader.hpp" #include "Base/UI/IVulkanWindow.hpp" #include "Host/PlatformProducer.hpp" +#include "Vulkan/Scene/VulkanCamera.hpp" #include namespace openVulkanoCpp::Vulkan @@ -150,11 +151,15 @@ namespace openVulkanoCpp::Vulkan Scene::Drawable** drawablePointer; VulkanDrawContext drawContext { poolId, currentImageId, cmdHelper->cmdBuffer, this }; + + if (!scene->GetCamera()->renderCamera) resourceManager.PrepareCamera(scene->GetCamera()); + while((drawablePointer = jobQueue->Pop()) != nullptr) { Scene::Drawable* drawable = *drawablePointer; drawContext.EncodeShader(drawable->GetShader()); - cmdHelper->cmdBuffer.pushConstants(drawContext.GetShader()->pipelineLayout, vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment, 0, 3 * sizeof(Math::Matrix4f) + sizeof(Math::Vector4f) + 8 * sizeof(float), &scene->GetCamera()->GetViewProjectionMatrix()); + static_cast(scene->GetCamera()->renderCamera)->Record(&drawContext); + //cmdHelper->cmdBuffer.pushConstants(drawContext.GetShader()->pipelineLayout, vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment, 0, 3 * sizeof(Math::Matrix4f) + sizeof(Math::Vector4f) + 8 * sizeof(float), &scene->GetCamera()->GetViewProjectionMatrix()); drawable->GetEncoder().vulkan(drawable, &drawContext); } cmdHelper->cmdBuffer.end(); diff --git a/openVulkanoCpp/Vulkan/Resources/ResourceManager.cpp b/openVulkanoCpp/Vulkan/Resources/ResourceManager.cpp index e86ba37..63e48bc 100644 --- a/openVulkanoCpp/Vulkan/Resources/ResourceManager.cpp +++ b/openVulkanoCpp/Vulkan/Resources/ResourceManager.cpp @@ -14,6 +14,7 @@ #include "Vulkan/Scene/VulkanNode.hpp" #include "Vulkan/Scene/VulkanTexture.hpp" #include "Vulkan/Image.hpp" +#include "Vulkan/Scene/VulkanCamera.hpp" namespace openVulkanoCpp::Vulkan { @@ -165,12 +166,29 @@ namespace openVulkanoCpp::Vulkan buffer = CreateDeviceOnlyBufferWithData(sizeof(Math::Matrix4f), vk::BufferUsageFlagBits::eUniformBuffer, &node->worldMat); } - uBuffer->Init(buffer, frameSize, allocSize, GetDescriptorLayoutSet(NODE_LAYOUT_BINDING)); + uBuffer->Init(buffer, frameSize, allocSize, GetDescriptorLayoutSet(NODE_LAYOUT_BINDING), NODE_LAYOUT_BINDING, 0); vkNode->Init(node, uBuffer); node->renderNode = vkNode; } } + void ResourceManager::PrepareCamera(Scene::Camera* camera) + { + const std::unique_lock lock(mutex); + if (!camera->renderCamera) + { + const vk::DeviceSize allocSize = Utils::Align(Scene::Camera::SIZE, uniformBufferAlignment); + const uint32_t imgs = context->swapChain.GetImageCount(); + ManagedBuffer* buffer = CreateBuffer(imgs * allocSize, vk::BufferUsageFlagBits::eUniformBuffer, vk::MemoryPropertyFlagBits::eHostCoherent | vk::MemoryPropertyFlagBits::eHostVisible); + buffer->Map(); + UniformBuffer* uBuffer = new UniformBuffer(); + uBuffer->Init(buffer, allocSize, allocSize, GetDescriptorLayoutSet(CAM_LAYOUT_BINDING), CAM_LAYOUT_BINDING, 1); + VulkanCamera* vkCam = new VulkanCamera(); + vkCam->Init(camera, uBuffer); + camera->renderCamera = vkCam; + } + } + vk::DescriptorSetLayout* ResourceManager::GetDescriptorLayoutSet(const DescriptorSetLayoutBinding& descriptorSetLayoutBinding) { auto& layout = descriptorSetLayoutCache[descriptorSetLayoutBinding]; diff --git a/openVulkanoCpp/Vulkan/Resources/ResourceManager.hpp b/openVulkanoCpp/Vulkan/Resources/ResourceManager.hpp index 9911134..ee88c8b 100644 --- a/openVulkanoCpp/Vulkan/Resources/ResourceManager.hpp +++ b/openVulkanoCpp/Vulkan/Resources/ResourceManager.hpp @@ -12,6 +12,7 @@ #include "ManagedResource.hpp" #include "Vulkan/Image.hpp" #include "Scene/Shader/DescriptorInputDescription.hpp" +#include "Scene/Camera.hpp" #include #include #include @@ -82,6 +83,8 @@ namespace openVulkanoCpp VulkanTexture* PrepareTexture(Scene::Texture* texture); + void PrepareCamera(Scene::Camera* camera); + void RemoveShader(VulkanShader* shader) override; void CopyDataToImage(vk::DeviceSize size, void* data, openVulkanoCpp::Vulkan::Image* image); diff --git a/openVulkanoCpp/Vulkan/Resources/UniformBuffer.hpp b/openVulkanoCpp/Vulkan/Resources/UniformBuffer.hpp index f0b80b0..7a893bf 100644 --- a/openVulkanoCpp/Vulkan/Resources/UniformBuffer.hpp +++ b/openVulkanoCpp/Vulkan/Resources/UniformBuffer.hpp @@ -19,6 +19,7 @@ namespace openVulkanoCpp::Vulkan ManagedBuffer* m_buffer; vk::DescriptorSet m_descriptorSet; uint32_t m_frameOffset; + uint32_t m_setOffset, m_setCount = 1; public: ~UniformBuffer() override @@ -26,7 +27,7 @@ namespace openVulkanoCpp::Vulkan if (m_buffer) Close(); } - void Init(ManagedBuffer* buffer, uint32_t frameOffset, uint32_t frameSize, vk::DescriptorSetLayout* descriptorSetLayout) + void Init(ManagedBuffer* buffer, uint32_t frameOffset, uint32_t frameSize, vk::DescriptorSetLayout* descriptorSetLayout, const DescriptorSetLayoutBinding& binding, uint32_t setId) { m_buffer = buffer; m_frameOffset = frameOffset; @@ -34,11 +35,11 @@ namespace openVulkanoCpp::Vulkan const vk::DescriptorSetAllocateInfo descSetAllocInfo = { ResourceManager::INSTANCE->descriptorPool, 1, descriptorSetLayout }; m_descriptorSet = buffer->allocation->device.allocateDescriptorSets(descSetAllocInfo)[0]; vk::DescriptorBufferInfo bufferInfo = { buffer->buffer, 0, frameSize }; - vk::WriteDescriptorSet writeDescriptorSet = { m_descriptorSet }; - writeDescriptorSet.descriptorCount = 1; - writeDescriptorSet.descriptorType = vk::DescriptorType::eUniformBufferDynamic; + vk::WriteDescriptorSet writeDescriptorSet = { m_descriptorSet, binding.bindingId, 0, 1 }; + writeDescriptorSet.descriptorType = static_cast(binding.descriptorType); writeDescriptorSet.pBufferInfo = &bufferInfo; buffer->allocation->device.updateDescriptorSets(1, &writeDescriptorSet, 0, nullptr); + m_setOffset = setId; } void Close() override @@ -50,8 +51,7 @@ namespace openVulkanoCpp::Vulkan void Record(VulkanDrawContext* drawContext) override { uint32_t frameOffset = m_frameOffset * drawContext->currentImageId; - drawContext->commandBuffer.bindDescriptorSets(vk::PipelineBindPoint::eGraphics, drawContext->GetShader()->pipelineLayout, 0, 1, - &m_descriptorSet, 1, &frameOffset); + drawContext->commandBuffer.bindDescriptorSets(vk::PipelineBindPoint::eGraphics, drawContext->GetShader()->pipelineLayout, m_setOffset, m_setCount, &m_descriptorSet, 1, &frameOffset); } void Update(void* data, uint32_t size, uint32_t bufferId) const diff --git a/openVulkanoCpp/Vulkan/Scene/VulkanCamera.hpp b/openVulkanoCpp/Vulkan/Scene/VulkanCamera.hpp new file mode 100644 index 0000000..ba543fd --- /dev/null +++ b/openVulkanoCpp/Vulkan/Scene/VulkanCamera.hpp @@ -0,0 +1,38 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include "Base/ICloseable.hpp" +#include "IRecordable.hpp" +#include "Vulkan/Resources/UniformBuffer.hpp" + +namespace openVulkanoCpp::Vulkan +{ + class VulkanCamera : public ICloseable, public IRecordable + { + Scene::Camera* camera = nullptr; + UniformBuffer* buffer = nullptr; + + public: + void Init(Scene::Camera* camera, UniformBuffer* uniformBuffer) + { + this->camera = camera; + buffer = uniformBuffer; + } + + void Record(VulkanDrawContext* context) override + { + buffer->Update(camera->GetData(), Scene::Camera::SIZE, context->currentImageId); + buffer->Record(context); + } + + void Close() override + { + buffer->Close(); + } + }; +} \ No newline at end of file diff --git a/openVulkanoCpp/Vulkan/Scene/VulkanShader.cpp b/openVulkanoCpp/Vulkan/Scene/VulkanShader.cpp index 28c096b..6183582 100644 --- a/openVulkanoCpp/Vulkan/Scene/VulkanShader.cpp +++ b/openVulkanoCpp/Vulkan/Scene/VulkanShader.cpp @@ -23,7 +23,8 @@ namespace openVulkanoCpp::Vulkan device.destroyShaderModule(shaderModule); } device.destroyPipelineLayout(pipelineLayout); - device.destroyDescriptorSetLayout(descriptorSetLayout); + for(auto& descriptorSetLayout : descriptorSetLayouts) + device.destroyDescriptorSetLayout(descriptorSetLayout); } void VulkanShader::Init(Context* context, Scene::Shader* shader, IShaderOwner* owner) @@ -128,12 +129,15 @@ namespace openVulkanoCpp::Vulkan void VulkanShader::CreatePipelineLayout() { - vk::PushConstantRange camPushConstantDesc = { vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment, 0, 3 * sizeof(Math::Matrix4f) + sizeof(Math::Vector4f) + 8 * sizeof(float) }; - std::array camPushConstantDescs = { camPushConstantDesc }; - std::array layoutBindings = { reinterpret_cast(NODE_LAYOUT_BINDING) }; - vk::DescriptorSetLayoutCreateInfo dslci = { {}, layoutBindings.size(), layoutBindings.data() }; - descriptorSetLayout = device.createDescriptorSetLayout(dslci); - vk::PipelineLayoutCreateInfo plci = { {}, 1, &descriptorSetLayout, camPushConstantDescs.size(), camPushConstantDescs.data() }; + //vk::PushConstantRange camPushConstantDesc = { vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment, 0, 3 * sizeof(Math::Matrix4f) + sizeof(Math::Vector4f) + 8 * sizeof(float) }; + //std::array camPushConstantDescs = { camPushConstantDesc }; + std::array layoutBindings1 = { reinterpret_cast(NODE_LAYOUT_BINDING) }; + std::array layoutBindings2 = { reinterpret_cast(CAM_LAYOUT_BINDING) }; + vk::DescriptorSetLayoutCreateInfo dslci = { {}, layoutBindings1.size(), layoutBindings1.data() }; + vk::DescriptorSetLayoutCreateInfo dslci2 = { {}, layoutBindings2.size(), layoutBindings2.data() }; + descriptorSetLayouts.push_back(device.createDescriptorSetLayout(dslci)); + descriptorSetLayouts.push_back(device.createDescriptorSetLayout(dslci2)); + vk::PipelineLayoutCreateInfo plci = { {}, static_cast(descriptorSetLayouts.size()), descriptorSetLayouts.data(), 0, nullptr }; pipelineLayout = this->device.createPipelineLayout(plci); } } \ No newline at end of file diff --git a/openVulkanoCpp/Vulkan/Scene/VulkanShader.hpp b/openVulkanoCpp/Vulkan/Scene/VulkanShader.hpp index e8b4127..e5a5062 100644 --- a/openVulkanoCpp/Vulkan/Scene/VulkanShader.hpp +++ b/openVulkanoCpp/Vulkan/Scene/VulkanShader.hpp @@ -30,7 +30,7 @@ namespace openVulkanoCpp std::vector shaderModules; // TODO manage live time somewhere else to allow sharing of shader programs std::vector shaderStageCreateInfo; vk::Pipeline pipeline; // TODO pipeline and shader config should be split - vk::DescriptorSetLayout descriptorSetLayout; + std::vector descriptorSetLayouts; vk::PipelineLayout pipelineLayout; IShaderOwner* owner = nullptr; Context* context = nullptr; diff --git a/openVulkanoCpp/Vulkan/VulkanDrawContext.hpp b/openVulkanoCpp/Vulkan/VulkanDrawContext.hpp index 464b3b0..1534945 100644 --- a/openVulkanoCpp/Vulkan/VulkanDrawContext.hpp +++ b/openVulkanoCpp/Vulkan/VulkanDrawContext.hpp @@ -15,8 +15,8 @@ namespace openVulkanoCpp::Vulkan VulkanShader* m_lastShader = nullptr; public: - size_t encoderThreadId; - size_t currentImageId; + const size_t encoderThreadId; + const size_t currentImageId; vk::CommandBuffer& commandBuffer; Renderer* renderer;