moving pointsets to the GPU via Uniform buffer

This commit is contained in:
CDaut 2024-07-09 20:18:28 +02:00
parent 74457d1a9c
commit 1114f4c8ff
Signed by: clara
GPG key ID: 223391B52FAD4463
6 changed files with 61 additions and 51 deletions

View file

@ -49,7 +49,7 @@ public:
void updateDescriptorSet();
void createUniformBuffer();
void createTextureImages(const VkCommandBuffer& cmdBuf, tinygltf::Model& gltfModel);
void createPointsetTexture(const VkCommandBuffer& cmdBuf);
void createPointsetImage(const VkCommandBuffer& cmdBuf);
void updateUniformBuffer(const VkCommandBuffer& cmdBuf);
void onResize(int /*w*/, int /*h*/) override;
void destroyResources();
@ -64,6 +64,7 @@ public:
nvvk::Buffer m_materialBuffer;
nvvk::Buffer m_primInfo;
nvvk::Buffer m_sceneDesc;
nvvk::Buffer m_pointsetBuffer;
// Information pushed at each draw call
PushConstantRaster m_pcRaster{
@ -85,7 +86,6 @@ public:
nvvk::Buffer m_bGlobals; // Device-Host of the camera matrices
std::vector<nvvk::Texture> m_textures; // vector of all textures of the scene
nvvk::Texture m_pointset; // Texture for starting locations of primary rays
nvvk::ResourceAllocatorDma m_alloc; // Allocator for buffer, images, acceleration structures
nvvk::DebugUtil m_debug; // Utility to name objects