Fixed maxVertex value

Following specification: maxVertex is the highest index of a vertex that will be addressed by a build command using this structure.
This commit is contained in:
mlefrancois 2023-08-30 10:39:32 +02:00
parent 12e17c280e
commit ef1c1e25d6
20 changed files with 21 additions and 21 deletions

View file

@ -75,7 +75,7 @@ auto Raytracer::objectToVkGeometryKHR(const ObjModel& model)
triangles.indexType = VK_INDEX_TYPE_UINT32;
triangles.indexData.deviceAddress = indexAddress;
triangles.transformData = {};
triangles.maxVertex = model.nbVertices;
triangles.maxVertex = model.nbVertices - 1;
// Setting up the build info of the acceleration
VkAccelerationStructureGeometryKHR asGeom{VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR};