diff --git a/examples/raytracinggltf/raytracinggltf.cpp b/examples/raytracinggltf/raytracinggltf.cpp index e23732a2..65f929a8 100644 --- a/examples/raytracinggltf/raytracinggltf.cpp +++ b/examples/raytracinggltf/raytracinggltf.cpp @@ -1,7 +1,7 @@ /* * Vulkan Example - Rendering a glTF model using hardware accelerated ray tracing example (for proper transparency, this sample does frame accumulation) * - * Copyright (C) 2023 by Sascha Willems - www.saschawillems.de + * Copyright (C) 2023-2024 by Sascha Willems - www.saschawillems.de * * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) */ @@ -519,15 +519,12 @@ public: */ void createDescriptorSets() { - // @todo - uint32_t imageCount{ 0 }; - imageCount = static_cast(model.textures.size()); - + uint32_t imageCount = static_cast(model.textures.size()); std::vector poolSizes = { { VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, 1 }, { VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1 }, { VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1 }, - { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1 } + { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, static_cast(model.textures.size()) } }; VkDescriptorPoolCreateInfo descriptorPoolCreateInfo = vks::initializers::descriptorPoolCreateInfo(poolSizes, 1); VK_CHECK_RESULT(vkCreateDescriptorPool(device, &descriptorPoolCreateInfo, nullptr, &descriptorPool));