feat(vulkan-rt): Mesh::BuildProcedural — AABB (procedural) BLAS build path (#33) #35
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics!35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/issue-33"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves #33
Adds the one missing piece for procedural geometry on the native Vulkan backend: an AABB BLAS build path, API-symmetric with the WebGPU
Mesh::BuildProcedural.Changes
Mesh::BuildProcedural(std::span<const RTAabb>, bool opaque, VkCommandBuffer)(Vulkan): uploads the boxes as a 24-byte-strideVkAabbPositionsKHR-compatible device buffer (ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY | SHADER_DEVICE_ADDRESS) and builds the BLAS from oneVkAccelerationStructureGeometryAabbsDataKHRgeometry (VK_GEOMETRY_TYPE_AABBS_KHR).opaquemaps toVK_GEOMETRY_OPAQUE_BIT_KHR(false = any-hit runs, matching the WebGPU path's default semantics).RTAabbnow also defined on the native branch of the:Meshpartition,static_assert'd layout-compatible withVkAabbPositionsKHR— portable user code compiles unchanged on both backends.RecordBLASBuildFromGeometryhelper shared by both paths; same scratch/lifetime handling, no TLAS/instance changes.Regression test: RTVolume ported to native Vulkan
The WebGPU procedural example now runs on both backends from the same scene code: a 3×3×3 grid of unit-box AABBs bound to a
PROCEDURAL_HIT_GROUP_KHRgroup —intersection.glsl(reportIntersectionEXT) marches each box into a radius-1 sphere,anyhit.glslpunches the spherical-checkerboard cut-out (visible proof the non-opaque path invokes any-hit),closesthit.glslshades per-instance tints. Runs clean under core + GPU-assisted validation.crafter-build test✅ (PushConstantRewrite) · native + wasm32-wasip1 builds ✅Screenshots