|
1 | 1 | /* |
2 | 2 | * Vulkan Example - Rendering a glTF model using hardware accelerated ray tracing example (for proper transparency, this sample does frame accumulation) |
3 | 3 | * |
4 | | - * Copyright (C) 2023-2024 by Sascha Willems - www.saschawillems.de |
| 4 | + * Copyright (C) 2023-2025 by Sascha Willems - www.saschawillems.de |
5 | 5 | * |
6 | 6 | * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) |
7 | 7 | */ |
@@ -142,7 +142,6 @@ class VulkanExample : public VulkanRaytracingSample |
142 | 142 |
|
143 | 143 | // Build |
144 | 144 | // One geometry per glTF node, so we can index materials using gl_GeometryIndexEXT |
145 | | - uint32_t maxPrimCount{ 0 }; |
146 | 145 | std::vector<uint32_t> maxPrimitiveCounts{}; |
147 | 146 | std::vector<VkAccelerationStructureGeometryKHR> geometries{}; |
148 | 147 | std::vector<VkAccelerationStructureBuildRangeInfoKHR> buildRangeInfos{}; |
@@ -174,7 +173,6 @@ class VulkanExample : public VulkanRaytracingSample |
174 | 173 | geometry.geometry.triangles.transformData = transformBufferDeviceAddress; |
175 | 174 | geometries.push_back(geometry); |
176 | 175 | maxPrimitiveCounts.push_back(primitive->indexCount / 3); |
177 | | - maxPrimCount += primitive->indexCount / 3; |
178 | 176 |
|
179 | 177 | VkAccelerationStructureBuildRangeInfoKHR buildRangeInfo{}; |
180 | 178 | buildRangeInfo.firstVertex = 0; |
@@ -224,8 +222,6 @@ class VulkanExample : public VulkanRaytracingSample |
224 | 222 | accelerationStructureBuildGeometryInfo.geometryCount = static_cast<uint32_t>(geometries.size()); |
225 | 223 | accelerationStructureBuildGeometryInfo.pGeometries = geometries.data(); |
226 | 224 |
|
227 | | - const uint32_t numTriangles = maxPrimitiveCounts[0]; |
228 | | - |
229 | 225 | VkAccelerationStructureBuildSizesInfoKHR accelerationStructureBuildSizesInfo{}; |
230 | 226 | accelerationStructureBuildSizesInfo.sType = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR; |
231 | 227 | vkGetAccelerationStructureBuildSizesKHR( |
|
0 commit comments