🌈 Vulkan raytracing with liblava
Support for the Vulkan KHR ray tracing extensions, integrated into liblava with idiomatic wrappers in lava::extras::raytracing
.
- abstraction over
VK_KHR_acceleration_structure
bottom_level_acceleration_structure
(BLAS) andtop_level_acceleration_structure
(TLAS) objects to- create
- build
- update
- compact
- abstraction over
VK_KHR_ray_tracing_pipeline
raytracing_pipeline
object with support for shader groups
-
shader_binding_table
object to automatically- generate SBT layout with correct alignments
- fill SBT with shader group handles
- and shader record data (parameters)
from a
raytracing_pipeline
raytracing cubes • raytraced reflecting cubes
This demo showcases:
- BLAS and TLAS creation
- BLAS compaction
- TLAS update each frame with transformation matrices
- callable shader
- SBT shader records
Build it with:
mkdir build & cd build
cmake ..
cmake --build . --parallel
To recompile shaders, run the appropriate gen_spirv
script in demo/res/cubes
.
Non-exhaustive list:
- host command support for acceleration structures
- serialization support
- test intersection shaders
- move SBT to device-local memory