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

@ -301,7 +301,7 @@ auto HelloVulkan::objectToVkGeometryKHR(const ObjModel& model)
triangles.indexData.deviceAddress = indexAddress;
// Indicate identity transform by setting transformData to null device pointer.
//triangles.transformData = {};
triangles.maxVertex = model.nbVertices;
triangles.maxVertex = model.nbVertices - 1;
// Identify the above data as containing opaque triangles.
VkAccelerationStructureGeometryKHR asGeom{VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR};