Function Kataglyphis::meshBaseOffsets#
Defined in File ObjectDescription.ixx
Function Documentation#
-
inline std::vector<uint32_t> Kataglyphis::meshBaseOffsets(std::span<const uint32_t> meshCountPerModel)#
One entry per model: the running sum of preceding models’ mesh counts. This is the value written to
VkAccelerationStructureInstanceKHR::instanceCustomIndexfor each model’s TLAS instance, and read back by the traced shaders (viaInstanceID()) as the object-index base they addGeometryIndex()to. It walks the samemeshCountPerModelcounts as assignTextureOffsets, just summing mesh counts instead of texture counts - the two must agree on model order.