The PC industry is finally making a push toward a “holy grail” rendering technique that makes computer-generated imagery in movies appear so much more lifelike than the graphics in games. At GDC 2018 on Monday, Microsoft introduced a new “DirectX Raytracing” (DXR) feature for Windows 10’s DirectX 12 graphics API.
To coincide with the announcement, Nvidia announced “RTX technology” for enhanced DXR support in upcoming graphics cards, as well as new ray tracing tools for its GameWorks library that can help developers deploy the technology faster. Likewise, AMD said it’s “collaborating with Microsoft to help define, refine and support the future of DirectX 12 and ray tracing.” And top gaming engines like Unity, Unreal, and Frostbite are already planning to integrate DirectX Raytracing.
This is a big deal, in other words. Let’s dig into why real-time ray tracing matters, what’s needed to use DXR features, and why DirectX 12’s ray tracing support might make the games of tomorrow look better than ever. It’s a complex subject that we’ll cover at a very high level. But basically, better lighting, shadows, and reflections mean better graphics overall.
“The result is going to be really stunning,” says Tony Tamasi, Nvidia’s senior VP of content and technology. How stunning? Try this video, which shows DirectX raytracing in action, combined with Nvidia's RTX technology and the Unreal engine.
Ray tracing vs. rasterization
Ray tracing mimics how lighting works in the real world. Objects are illuminated by 3D light sources, with rays bouncing around before reaching your eyes (or the camera, in games). Light might be reflected by other objects, or look different after passing through water, or be blocked by another object completely and create a shadow. The objects the rays bounce off even affect the final color you see, just like in real life.
Ray tracing can deliver very high-quality images. Just look at the Avengers movies! But there’s a reason the technique is largely limited to films alone: Ray tracing is very computationally expensive. It takes a lot of resources.
Films can spend as long as they need to render a scene in processing; until now, consumer PCs simply couldn’t handle real-time ray tracing in games. Because of that, games are created with a technique called rasterization. Rasterization essentially converts a game’s 3D models into pixels on your 2D screen, then applies the color information after. Each of the pixels are then colored in independently, applying textures and shading with techniques like shadow mapping and screen-space reflection.
Rasterization is much faster than ray tracing—hence its use in real-time games. But rasterization has its drawbacks. Because it needs techniques like shadow mapping to simulate visual effects caused by normal light behavior, such as scattering and refracting, it takes a lot of time and expertise to make sure images look realistic and lighting behaves as expected. “There’s also an upper limit to how realistic a rasterized game can get, since information about 3D objects gets lost every time they get projected onto your 2D screen,” Microsoft says.
Shadows and reflections aren’t extra techniques or special effects with ray tracing. They just happen, because ray tracing “calculates what a pixel would look like if a virtual world had real light,” Microsoft explains. Ray tracing can create stunningly realistic images with the help of powerful modern GPUs, which is why it’s all the rage with today’s moviemakers. “It makes the fire, smoke, and explosions of war films look real,” Nvidia says.
Ray tracing isn’t completely foreign to games. It’s sometimes been dabbled with for objects that don’t need real-time lighting, and both Nvidia and AMD (among others) offer robust professional ray tracing technologies. But Microsoft’s DirectX Raytracing feature brings the eye-catching visual technology into the standardized fold of Windows 10’s DirectX gaming graphics API.
Ray tracing meets rasterization
The dream of a real-time, fully ray-traced game, well, remains a dream. It would bring even the beefiest of modern gaming PCs to their knees. Fortunately, ray tracing and rasterization aren’t all-or-nothing. Some of the biggest gaming companies around expect DirectX Raytracing to enhance existing rendering techniques, rather than supplanting them outright (in the short term, at least).
“It’s now possible for developers to build games that use rasterization for some of its rendering and ray tracing to be used for the rest,” Microsoft says. “For example, developers can build a game where much of the content is generated with rasterization, but DirectX Raytracing calculates the shadows or reflections, helping out in areas where rasterization is lacking.”
“I would expect most games that adopt [Nvidia] RTX and Microsoft’s DXR are going to have a hybrid implementation,” Nvidia’s Tony Tamasi said in a press briefing. “They’ll still do a great amount of work with rasterization and what you might call traditional game rendering, but they’ll start layering in some ray trace effects for shadows, reflections, and ambient occlusions.”
DirectX Raytracing hardware support
No single advancement suddenly made real-time ray tracing achievable. Instead, it’s a conflux of circumstances. Modern graphics processors are staggeringly more powerful and efficient than they were in years past—GPUs can do more with their raw horsepower now. The DirectX 12 graphics API introduced in Windows 10 gives game developers closer-to-the-metal hardware access, letting them wring out even more performance. So DirectX Raytracing requires the support of the entire ecosystem to work.
Microsoft says, “Developers can use currently in-market hardware to get started on DirectX Raytracing,” but says to ask hardware vendors directly for additional details. DirectX Raytracing can theoretically work on any DX12-capable hardware, according to Nvidia and AMD. The reality might be a little more complicated than that for gamers, though no major players would make firm performance projections yet.
“I think that remains to be seen,” AMD’s Scott Wasson said when I asked if the dedicated async compute hardware in Radeon graphics cards will help with DXR, which Microsoft describes as “fundamentally...a compute-like workload.”
“As graphics workloads evolve beyond rasterization, I expect [Radeon’s] strength in compute will be an asset for us,” Wasson said, citing the superior performance of Radeon cards in coin mining workloads, a similarly GPU compute-focused task. “In terms of whether we’ll be using the asynchronous scheduling hardware in supporting this, I don’t think we have a particular performance projection or application to give you about how async compute plays into [DirectX Raytracing] but you can imagine there’s potential there... There’s more [to be determined] on that front as we get closer to implementing this in real games.”
Wasson also pointed out that Radeon graphics cards “have had a form of async compute” on all GCN-based graphics cards. The GCN architecture was introduced on the Radeon HD 7970 all the way back in December 2011.
Alongside DirectX Raytracing’s reveal, Nvidia is introducing “RTX” technology that accelerates DXR performance. RTX consists of a ray tracing engine that leverages a combination of hardware and software, and will be supported only in graphics cards using the company’s new Volta GPU architecture, like the fearsome Titan V.
Update: On August 13, 2018, Nvidia announced a new Turing GPU architecture that will include dedicated "RT cores" for enhanced ray tracing capabilities.
“Effects-wise, [non-Volta GPUs] all use the same DirectX 12 API, so theoretically, they’re all capable of producing the same visual effects,” Nvidia’s Tamasi says. “This partially boils down to performance, and if [ray tracing] is truly useful in a game. Our perspective is that it’s going to take RTX-class hardware and software [for ray tracing to be] viable and practical for use in games.
“With that said, we very well could be surprised and we see usage of shadows, reflections, and ambient occlusions on DXR without RTX,” Tamasi continued. “We’re just getting started so we’re going to have to see.”
DirectX Raytracing software support
Nvidia also revealed Ray Tracing for GameWorks, an addition to its GameWorks library that developers can use to implement ray-tracing effects quickly. Tamasi describes the suite of tools as “turn-key modules built on DXR,” to enable ray-traced shadows, glossy reflections, and ambient occlusions. The GameWorks SDK is also receiving a ray tracing denoiser module to help combat visual graininess.
The company is already working with developers at EA, Remedy, and 4A Games to implement RTX and GameWorks features into upcoming titles. General availability for the Ray Tracing tools will hit the GameWorks SDK later this quarter, though ray-traced ambient occlusion tools won’t drop until summer time.
Several gaming engines already plan to integrate DirectX 12’s new DirectX Raytracing API. Microsoft revealed it’s coming to Unity, Epic’s Unreal, EA’s Frostbite, EA’s SEED work, Futuremark’s 3DMark, “and several others we can’t disclose yet.” Furthermore, Nvidia says that Unreal, Unity, Frostbite, and the Allegorithmic 3D texturing software will also bake in support for its enhanced RTX technology.
Microsoft’s own PIX for Windows will support DirectX Raytracing on day one. “Developers can get started [with DXR] immediately by joining the Windows Insider program, obtaining the latest flight, and following the instructions that will be posted to our blog,” a Microsoft spokesperson says. “Official support will ship later this year.” However, when asked if the ray-tracing technology is coming to Xbox consoles as well, Bryan Langley, the principal program manager for Windows Graphics, said “We don’t have anything new to announce for Xbox One at this time.” Microsoft recently released the Xbox One X ($500 on Amazon), the most powerful console ever.
While Nvidia anticipates games shipping this year with ray-traced visual effects, expect it to take time for these jaw-dropping visuals to become more common. To put it in some perspective, DXR piggybacks on DirectX 12. That launched within Windows 10 in 2015, and we’ve still only seen a trickle of DX12 games released. Triple-A game development takes a long time—but the tantalizing promise of real-time ray tracing is still closer than ever before.
“DirectX12 is a foundation that we will continue to build upon to keep Windows 10 and Xbox the best place for gaming now and in the years to come,” Microsoft says.
Microsoft, Nvidia, and AMD will be offering deep dives into DirectX Raytracing and Nvidia’s tools over the course of several sessions at the Game Developers Conference currently underway in San Francisco. Microsoft also plans on providing more in-depth technical details about DXR on the DirectX blog at the same time this post goes live.
This story was updated at 5:08 PM with the first video showing off DXR as well as the Nvidia RTX technology.