Summary
In this chapter, we have provided the details on how to use ray tracing in Vulkan. We started by explaining two fundamental concepts:
- Acceleration Structures: These are needed to speed up scene traversal. This is essential to achieve real-time results.
- Shader binding tables: Ray tracing pipelines can invoke multiple shaders, and these tables are used to tell the API which shaders to use for which stage.
In the next section, we provided the implementation details to create TLASes and BLASes. We first record the list of geometries that compose our mesh. Next, we use this list to create a BLAS. Each BLAS can then be instanced multiple times within a TLAS, as each BLAS instance defines its own transform. With this data, we can then create our TLAS.
In the third and final section, we explained how to create a ray tracing pipeline. We started with the creation of individual shader types. Next, we demonstrated how to combine these individual shaders into a ray...