Jump to content

Vulkan Ray Tracing Extensions Publicly Released


Guest_Jim_*

Recommended Posts


With few exceptions, ray-tracing in games today has been based on DirectX 12's DXR system, limiting it to Windows 10 PCs. While that does cover a great many systems today, the desire for another option has existed since the beginning, and today the Khronos Group publicly released the provisional extensions for Vulkan Ray Tracing. As Vulkan is designed to work on multiple platforms and across multiple pieces of hardware, this new open-standard for ray tracing should help the rendering technique spread and developers come up with new ways to use it. It is also worth noting these are provisional extensions and the specification has not been finalized. This release means that developers will be able to explore and experiment today so they can provide feedback both to Khronos but also to hardware vendors.

The new VK_KHR_ray_tracing extension is based on NVIDIA's VK_NV_ray_tracing extension that utilizes the RT cores on the GPU manufacturer's RTX 20-series graphics cards, but it is hardware agnostic. When AMD and Intel release GPUs with dedicated hardware acceleration components, Vulkan will be able to utilize them but the extension is also able to work with GPU compute. This means any GPU vendor could enable ray tracing in their Vulkan drivers on essentially any modern GPU, if they choose to do so.

The VK_KHR_ray_tracing extension is what gives the graphics API support for building and managing acceleration structure, ray tracing shader stages and pipelines, and ray query intrinsic for all shader stages, but there are other new extensions that provide additional functionality. The VK_KHR_pipeline_library adds the ability to provide a set of shaders to be efficiently linked into the ray tracing pipelines and the VK_KHR_deferred_host_operations extension enables intensive driver operations, such as ray tracing pipeline compilation and CPU-based acceleration structure construction that can then be done by an application-managed CPU thread pool. This last extension allows the planning of the ray tracing work to be done off of the GPU, taking advantage of a host CPU's multiple processing threads to build the Application Structure that is then copied to the GPU. This can also optimize the use of GPU memory as the size of the Application Structure will be known when copying.

One feature of this ray tracing solution that is rather interesting is the ability for a shader to invoke a single ray traversal at any time. This can simplify integrating ray tracing and may lead to the creation of new techniques as any shader, compute, vertex, and fragment shaders, can get intersection information and process it as needed. The pipeline library extension can also be leveraged to improved performance as there can be thousands of shaders involved in a ray-tracing pipeline. The library extension allows them to be incrementally compiled, reducing the processing load and removing application bottlenecks and stuttering.

The shaders Vulkan Ray Tracing will use are SPIR-V binaries, which themselves will use the SPV_KHR_ray_tracing and SPV_KHR_ray_query extensions. To create these from GLSL, OpenGL Shading Language, two additional extensions were created, GLSL_EXT_ray_tracing and GLSL_EXT_ray_query, but for those developers that use HLSL, High-Level Shader Language, the proprietary language for DirectX, you are still covered. Microsoft has previously open sourced its HLSL compiler, DXC, and contributions by member companies of the Khronos Group have given it the capability to generate SPIR-V code. This means the porting of DXR HLSL shaders to SPIR-V shaders will require minimal changes so developers can work with either GLSL or HLSL, depending on their preference.

It may be worth noting that some but not all of these features are also available with DirectX 12 DXR. Pipeline libraries are supported by both, but the ray query capability is only available with the DXR 1.1 tier. The ability to offload some of the work to the host, such as building the Acceleration Structure, is not possible with DXR at all, which may make any competition between these two standards interesting, if Vulkan is able to realize better performance as a result.

One thing is certain about this release, and that is ray tracing is definitely going to become a standard in the future of games, and potentially not just for graphics. The ability for any shader to invoke a ray traversal that Vulkan Ray Tracing has in these provisional extensions, and that DXR 1.1 will support when it releases means the method could be used for much more. It will be left to the imagination of developers what those additional uses can be.

Source: Khronos Group



Back to original news post

Share this post


Link to post
Share on other sites

×
×
  • Create New...