The Vulkan API is currently the most open graphical API of all, not to say it’s the only one of its kind on the market. While different manufacturers each have their own API associated with their hardware or operating system, Vulkan is completely agnostic on both sides and can theoretically be used on any platform. The problem? Outside of the world of PC and Google operating systems, others have long blocked the use of Vulkan on their systems.
Ray tracing has officially arrived in Vulkan
Vulkan is an API based on a lMain store that expands its functionality over time, but instead of doing it with full new versions, it does it through extensions or additional libraries:
- the official extensions maintained by the Khronos group and whose functionality cannot be replaced by third-party extensions. If a new feature reaches the official API, all third-party extensions that have executed that same feature are deprecated.
- Third-party extensions to support graphics hardware features that are not officially supported.
Almost two years ago, NVIDIA created a Vulkan extension for its RTX 2000 cards, while the Khronos group, which manages the official library, began work on implementing Ray Tracing in the official Vulkan library. since last March:
The reason Khronos took so long to implement Ray Tracing in Vulkan is very simple, until last March, when AMD confirmed Ray Tracing in RDNA 2 that the Khronos group could not offer a completely agnostic version of platform, because until then Ray Tracing was only NVIDIA’s business.
Vulkan RT hardly differs from DirectX Ray Tracing
In the same way that Direct3D and OpenGL use the same pipeline to render graphics, we find that DXR and Vulkan with the official extensions for Ray Tracing work exactly the same, but with a number of differences in the particular.
Aside from the pipeline, the part where the DXR and the Vulkan RT look the same is in the Ray queries, a capacity also available DXR 1.1 which call the intersection unit do not cross the spatial data structure for acceleration, BVH, but to make a simple request to a precise point of this structure and therefore without going through the BVH tree.
As for the differential element, we find it in build your own spatial data structures acceleration, Vulkan, unlike DirectX, allows CPU usage to build them from the geometry information of the GPU scene. This capability requires the CPU to have access to VRAM.
Which libraries constitute the official extension of Ray Tracing in Vulkan?
As for the main library, its extensions are as follows:
- VK_KHR_acceleration_structure
- VK_KHR_ray_tracing_pipeline
- VK_KHR_ray_query
- VK_KHR_pipeline_library
- VK_KHR_deferred_host_operations
The extensions to SPIR-V added are:
- SPV_KHR_ray_tracing
- SPV_KHR_ray_query
And as for the GLSL we find the following extensions:
- GLSL_EXT_ray_tracing
- GLSL_EXT_ray_query
- GLSL_EXT_ray_flags_primitive_culling
These are all official extensions of the Vulkan API, so it will no longer be necessary to create third-party extensions to support ray tracing in Vulkan.