Microsoft Introduces DirectX Raytracing Bringing Photorealistic, Movie-Quality 3D To Games
Microsoft says that 3D gaming today is a lie. While the techniques game designers use can make games on your screen look like they're 3D, the rasterization process used ultimately only operates in two dimensions with 3D primitives mapped onto it via transformation matrices.
Things are changing with the introduction today of a DirectX 12 technique that aims to bridge the gap between rasterization techniques used today and the full 3D effects of tomorrow. The new feature that will do this is called DirectX Raytracing (DXR). DXR allows current techniques like screen-space reflections (SSR) to "naturally and efficiently" fill gaps left by rasterization.
Microsoft says that DXR adds four new concepts to the DirectX 12 API:
- The acceleration structure is an object that represents a
full3D 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 fordynamic 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
DXRworkloads to the GPU.
- A set of new High-Level Shader Language (HLSL) shader types including ray-generation, closest-hit, any-hit, and miss shaders. These specify what the
DXRworkload 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 ray tracing shaders and
other staterelevant to ray tracing workloads.
Microsoft says that no new GPU engine is required for
The big questions for gamers
The screenshot at the top of the story is from SEED, Electronic Arts and gives a glimpse at what scenes in future games might look like. Microsoft also says that it has been working with hardware vendors and developers for nearly a year to design and tune the API. Thanks to that work, Microsoft notes that a "significant number" of studios and engines are planning to integrate