Noticed your eyes widening a lot more when you game lately? If so, that may be because of a new technique that’s spreading, slowly, across the game-o-sphere. The latest, most spectacular visual enhancements in PC gaming are brought to you courtesy of ray tracing, something that has only recently become possible in real-time with specialized hardware.
Though ray tracing is commonly referenced in PC gaming, Microsoft’s Xbox Series X and Sony’s PlayStation 5 also have the necessary hardware and a growing library of games that support it. This article covers how ray tracing differs from traditional rasterization, why it’s important for the future of gaming, and of course, whether ray tracing should influence the purchase of your next gaming PC (whether that’s a gaming desktop or a gaming laptop) or console.
The Basics of Ray Tracing
Ray tracing is a technique that works well for illuminating a computer-generated scene. The concept is not new; what is new is having in reach the computing muscle to pull it off efficiently.
Imagine shooting a light ray at an object and tracing how it bounces off the surface, almost like walking into a dark room and pointing a flashlight. Then imagine shooting many rays, using the ones that do (and don’t) return to figure out how the scene should look. For example, rays that failed to return were likely blocked by an object, thus creating a shadow. (Thinking about the concept in the same way as how radar works isn’t far off.)
That basic explanation highlights how ray tracing parallels real-world lighting: The light that reaches your eye tells your brain what you’re seeing. Animated films have been using ray tracing for decades; Pixar’s Toy Story, for example, brought it into the limelight in 1995, and great strides in rendering have been made since then.
For about as long as the film industry has been using ray tracing, however, video games have relied on a different technique, rasterization, for rendering 3D worlds. But, before we get to the reasons behind that, let’s contrast ray tracing with rasterization.
The Fundamentals: Ray Tracing Versus Rasterization
Rasterization is an object-based approach to scene rendering. Each object is painted with color first, then logic is applied to show only the pixels that are closest to the eye. By contrast, ray tracing colors the pixels first, then identifies them with objects later. Simple…that explains everything, right?
Well, not quite, so think of it like this. Rasterization requires special techniques and tweaking to create realistic visuals. For instance, a game’s rendering pipeline might be tailored and optimized to apply a certain effect, where the pixels on an object have a given pattern. Naturally, this type of logic will vary from object to object and from scene to scene. It requires effort on the developer’s part to take advantage of this, but it can pay off in efficiency, since the computer may be able to render a complicated scene without proportionate amounts of processing power.
Ray tracing tends to be applied in a more general fashion than rasterization, since it is based on shooting light rays. As a result, techniques to achieve visual results with it are based around how those rays are used. Softer shadows and reflections, for instance, require shooting more rays, while motion and blurring effects may require altering ray timing or the rays’ point of origin.
All told, rasterization and ray tracing can be used to achieve the same result (or, at least, close to it). So now let’s explore why one would be used over the other.
Mainstream Gaming, Meet Ray Tracing
Decades ago, rasterization earned its place in video games because the hardware required to do it was affordable enough for mainstream buyers to access, unlike that which was required for ray tracing. This is still largely true; gaming graphics cards are optimized for rasterization, and they will be for many years to come.
Ray tracing’s journey into mainstream gaming began in 2018 with the launch of Nvidia’s GeForce RTX desktop card line, in the form of the GeForce RTX 2080. Nvidia introduced its second-generation GeForce RTX 3000 series cards in 2020 (headlined by the GeForce RTX 3080), and rival AMD quickly followed suit with its Radeon RX 6000 series. (See our review of the flagship Radeon RX 6800 XT.)
In brief, it took so long for ray tracing to enter the gaming scene because the computing resources to pull it off had been unattainable at prices that would permit mainstream adoption. Granted, the entry cost is still relatively high—neither AMD nor Nvidia offers a low-end desktop graphics card with hardware ray tracing yet. At the moment, the “entry level” video card capable of ray tracing in hardware is the GeForce RTX 2060, which launched in 2019 at a not-very-budget $349 and sells well in excess of that from most sources these days, due to the high demand for (and low supply of) video cards.
Still, at some point, prices will stabilize. And the scene is set for continued mainstream adoption, especially since the latest game consoles have joined the party.
Visual Improvements With Ray Tracing
It’s important to realize that ray tracing has only put its foot in the door of gaming graphics. That’s because rendering an entire game in real-time ray tracing is still well beyond the capabilities of today’s hardware. Games that support ray tracing use it only for certain effects, chiefly those related to shadows and lighting, while everything else is still rasterized.
First, a quick primer on terminology. Nvidia’s RTX-branded cards—the GeForce RTX 2060 or RTX 3080, for example—utilize a proprietary graphics-rendering implementation that Nvidia broadly refers to as “RTX.” This implementation can use DirectX 12, and more specifically its DirectX Raytracing API (DXR) to render out light paths in the game engine.
DXR, meanwhile, is a ray-tracing API that can operate independently of Nvidia’s hardware, or in conjunction with it. For example, the developers of the game Crysis showed off a demo of their own Crytek engine several years ago that ran ray-traced reflections on an AMD Radeon RX 5000 series card (a GPU with no RT cores onboard), though performance was expectedly slow. If you were to run the same demo on an AMD Radeon RX 6000 Series card, complete with RT cores onboard, it would process the DXR scene significantly faster.
RT cores (which are specialized for crunching the math of light rays) help any graphics card, AMD- or Nvidia-branded, run DXR faster, but DXR doesn’t need RT cores to run.
Let’s see how ray tracing can visually improve a game. I took the following screenshot pairs in Square Enix’s Shadow of the Tomb Raider for PC, which supports ray-traced shadows on Nvidia GeForce RTX graphics cards. Specifically, look at the shadows on the ground.
Here is another pairing of scenes from Shadow of the Tomb Raider…
And let’s look at a final set…
The ray-traced shadows are softer and more realistic compared with the harsher rasterized versions. Their darkness varies depending on how much light an object is blocking and even within the shadow itself, while rasterization seems to give every object a hard edge. The rasterized shadows still don’t look bad, but after playing the game with ray traced shadows, it’s tough to go back.
Currently, ray tracing support in games is somewhat polarizing because the feature must be implemented separately for AMD and Nvidia cards. More games support Nvidia cards mainly because Nvidia was the only one producing ray-tracing-capable graphics cards until 2020, but more games are starting to support both flavors. Examples of the latter include Cyberpunk 2077, Dirt 5, Godfall, and World of Warcraft: Shadowlands.
Ray Tracing: The Performance Impact
When it comes to PC graphics, everything comes at a price, and ray tracing’s visual goodies are no exception. Enabling it generally results in a performance penalty that varies in its impact from game to game.
Let’s take, for example, the built-in benchmark in the game Shadow of the Tomb Raider. I ran it on a gaming-ready desktop with an AMD Ryzen 9 5900X processor, a GeForce RTX 3080 graphics card, and 32GB of memory. The numbers presented below, tested at two resolutions, are the average frames per second (fps). At least 60fps is required for smooth gameplay.
The double-digit performance hits from ray tracing are significant, and note that this is with the performance-enhancing DLSS feature on. DLSS is an Nvidia-specific feature supported in certain games that can help reduce the impact on frame rates of ray tracing’s computational load. (For much more on DLSS, see our feature Testing Nvidia’s DLSS 2.0: Higher Frame Rates for Free?) DLSS shows great promise, but the game has to support it. While it is gaining momentum these days, support for it is far from universal.
Remember, this performance trade-off comes just from applying shadow and lighting effects, so today’s technology is indeed a long way from using ray tracing to render an entire game. That said, the performance hits are a worst-case scenario in this case, since this game has ray-traced shadow settings with less negative performance impact.
Game optimization deserves a mention. Developers will undoubtedly learn to better optimize ray tracing much like they did rasterization, so it should become possible to get more ray-traced effects out of current hardware. (Again, look at how far rasterization has come.)
DLSS is one approach that will help, as well, and we expect refinement and expansion of DLSS as time goes on. AMD is also working on its own DLSS-style performance-saving alternative, dubbed “Super Resolution.” Super Resolution is being developed in conjunction with Microsoft’s DirectML team (“ML” being short for “machine-learning”). However, AMD says the tech is still a ways out, and we likely won’t see any games running with it until 2022 at the earliest.
A Ray-Traced Future: Slowly Gaining Steam
Despite the limited applications of ray tracing in today’s games, it’s here to stay. The writing has been on the wall since AMD followed Nvidia by introducing Radeon graphics cards with hardware ray tracing support. Hardware ray tracing support in the Xbox Series X and the PlayStation 5 further drives that point home.
On that note, the choice to adopt ray tracing has been made for console gamers. It’s also been made for PC gamers buying modern mid- to high-end graphics cards, as all the latest models support hardware ray tracing, but the question remains whether gamers with older or lower-end graphics cards should upgrade, or those in the market should pony up.
In short, there’s no imperative to invest in a graphics card that supports hardware ray tracing unless you determine the visual differences are worth the money. Ray tracing currently provides little other advantage for gaming, so it boils down to simple enjoyment.
The current limited availability and high prices of graphics cards make ray tracing an even larger investment than it should be, so unless you have been fortunate enough to land a GeForce RTX or a Radeon RX 6800 card, it may make sense to keep ray tracing on the wish list and use the cash for games. That strategy could work out even better in the long term, since you’ll be able to re-experience any game you bought that added ray tracing support while you were waiting.