At GDC 2018 today, Microsoft is announcing a new feature called DirectX Raytracing. The DirectX Raytracing (DXR) API enables straightforward access to real-time ray tracing running on development graphics hardware. According to Microsoft DXR introduces four, new concepts to the DirectX 12 API:
- The acceleration structure is an object that represents a full 3D environment in a format optimal for traversal by the GPU. Represented as a two-level hierarchy, the structure affords both optimized ray traversal by the GPU, as well as efficient modification by the application for dynamic objects.
- A new command list method, DispatchRays, which is the starting point for tracing rays into the scene. This is how the game actually submits DXR workloads to the GPU.
- A set of new HLSL shader types including ray-generation, closest-hit, any-hit, and miss shaders. These specify what the DXR workload actually does computationally. When DispatchRays is called, the ray-generation shader runs. Using the new TraceRay intrinsic function in HLSL, the ray generation shader causes rays to be traced into the scene. Depending on where the ray goes in the scene, one of several hit or miss shaders may be invoked at the point of intersection. This allows a game to assign each object its own set of shaders and textures, resulting in a unique material.
- The raytracing pipeline state, a companion in spirit to today’s Graphics and Compute pipeline state objects, encapsulates the raytracing shaders and other state relevant to raytracing workloads.
To help developers to make use of this feature, Microsoft is announcing that PIX for Windows will support the DirectX Raytracing API from Day 1. This tool will help game developers in capturing and analyzing frames built using DXR and understand how DXR interacts with the hardware.
DXR APIs will lead to better looking games, initially it will be used to supplement current rendering techniques such as screen space reflections. In future, Microsoft expects increase in utilization of DXR for techniques for rasterization, such as true global illumination.
Microsoft also announced that number of game studios and game engines are already planning to integrate DXR support into their games and engines. Some of them are Electronic Arts: Frostbite, Electronic Arts: SEED, Epic Games: Unreal Engine, Futuremark: 3DMark and Unity Technologies: Unity Engine.
If you are a game developer, you can learn more about this feature here.