What Is Ray Tracing? (And What It Means for PC Gaming)
Views: 5833
2023-05-11 02:52
Noticed your eyes widening a lot more when you play games lately? If so, that

Noticed your eyes widening a lot more when you play games lately? If so, that may be because many games now support ray tracing, a technology that's become possible in real-time since only 2018, thanks to specialized graphics hardware.

Though ray tracing is commonly discussed in terms of 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 explains how ray tracing differs from traditional rasterization and why it's important for the future of gaming, whether on a console, a gaming desktop, or a gaming laptop.

The Basics of Ray Tracing

Ray tracing is a highly effective technique for illuminating a computer-generated scene. The concept isn't new, though mass-market access to sufficiently powerful computing hardware is.

Imagine shooting a ray of light at an object and tracing how it bounces off the surface, rather 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, creating a shadow. (You can think about the concept in the same way as how radar works.)

A basic schematic of how ray tracing works

In other words, 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 instance, brought it into the limelight in 1995, and massive strides in CGI 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 for rendering 3D worlds: rasterization. Before we address the reasons for this, let's contrast the two approaches.

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. Ray tracing, by contrast, colors the pixels first, then identifies them with objects later. That explains everything, right?

Nvidia's GeForce RT 4070 is an enthusiast-grade graphics card with hardware ray tracing support.

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, giving the pixels on an object a particular pattern. Naturally, this type of logic varies from object to object and from scene to scene. It requires effort on the developer's part to take advantage of this, but rasterization can pay off in efficiency, since the computer may be able to render a complicated scene without a ton of processing power.

Ray tracing tends to be applied in a more general fashion than rasterization since it's based on shooting light rays. As a result, techniques to achieve visual results with ray tracing are based on how rays are used. Softer shadows and reflections, for example, require shooting more rays, while motion and blurring effects may require altering ray timing or their point of origin.

Regardless, rasterization and ray tracing can basically be used to achieve the same results (or at least close to it). So now let's explore why you'd use one over the other.

Mainstream Gaming Gains Ray Tracing

Decades ago, rasterization earned its place in video games because the hardware required to do it was affordable enough for mainstream buyers, unlike that required for ray tracing. This is still largely true—today's gaming graphics cards are optimized for rasterization and will be for many years to come.

Ray tracing first infiltrated mainstream gaming in 2018 with the release of Nvidia's GeForce RTX series of desktop graphics cards, first in the form of the high-end Nvidia GeForce RTX 2080. Nvidia introduced a second-generation GeForce RTX 3000 series (headlined by the Nvidia GeForce RTX 3080) in 2020, and archrival AMD quickly followed suit with its Radeon RX 6000 series. Fast forwarding to 2023, Nvidia has launched a third-generation GeForce RTX 4000 and AMD an advanced Radeon RX 7000 line. (See our reviews of the flagship GPUs, the Nvidia GeForce RTX 4090 and the AMD Radeon RX 7900 XTX.)

The AMD Radeon RX 7900 XTX competes with Nvidia's GeForce RTX 4080.

In brief, it took so long for ray tracing to enter consumer gaming because the computing resources to pull it off had been unavailable at prices permitting anything close to mainstream adoption. Indeed, the first GPUs capable of ray tracing were costly high-end cards. Mid-tier entries, notably the Nvidia GeForce RTX 2060, didn't come along until later in their lifecycles.

Top Ray-Tracing Graphics Cards We've Tested...

Nvidia GeForce RTX 3070 Founders Edition Review

5.0 Exemplary $539.94 at Amazon See It (Opens in a new window)

AMD Radeon RX 7900 XTX Review

4.5 Outstanding $1,189.99 at B&H Photo Video See It (Opens in a new window)

Nvidia GeForce RTX 3080 Founders Edition Review

4.5 Outstanding $1,349.99 at Amazon See It (Opens in a new window)

AMD Radeon RX 7900 XT Review

4.0 Excellent $878.73 at Amazon See It (Opens in a new window)

Nvidia GeForce RTX 4080 Founders Edition Review

4.0 Excellent $1,199.99 at Best Buy Check Stock (Opens in a new window)

Nvidia GeForce RTX 4070 Founders Edition Review

4.0 Excellent $599.99 at Best Buy Check Stock (Opens in a new window) See all (6 items)

Even more affordable, entry-level graphics cards supporting ray tracing had to wait until the AMD Radeon RX 6500 XT and the Nvidia GeForce RTX 3050 hit the shelves in early 2022. (These instantly disappeared from the shelves—those were the days of the graphics-card out-of-stock crisis, an unfortunate side effect of cryptocurrency mining—but are now much more widely available here in 2023.) Intel also joined the dedicated GPU market that year, starting with its Intel Arc A380 card, which was followed by the much-improved Intel Arc A770.

In short, while they're still optimized (and games are still written) for rasterization, nearly every current graphics card supports ray tracing, so even buyers in the budget segment can enjoy the visual treats the technology has to offer.

Visual Improvements With Ray Tracing

It's important to realize that ray tracing has put only a 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 mainstream hardware. Games that support ray tracing use it only for certain effects, chiefly related to shadows and lighting, while everything else is still rasterized.

A bit of terminology: Nvidia's current GPUs use a proprietary graphics rendering implementation that the company broadly refers to as RTX. This implementation can take advantage of DirectX 12 in Windows 11, specifically its DXR feature—the DirectX Ray Tracing application programming interface (API)—to render light paths in the game engine. Nvidia maintains a list of featured RTX-enabled games and apps.

DXR is a ray tracing API that can operate in conjunction with Nvidia's hardware or independently of it. For example, several years ago the developers of the game Crysis showed off a demo of their Crytek engine that ran ray-traced reflections on an AMD Radeon RX 5000 series card—a GPU with no ray-tracing cores onboard—though the performance was predictably slow. RT cores are silicon specialized for crunching the math behind light rays; they help any graphics card execute DXR code faster, though DXR doesn't need RT cores to run. If you ran the Crytek demo on a current AMD card that supports hardware ray tracing, the DXR scene would run significantly faster.

Let's see just how ray tracing can improve the appearance of a game. I took the following pairs of screenshots in Square Enix's Shadow of the Tomb Raider for PC, which supports ray-traced shadows with GeForce RTX graphics cards. Look closely at the shadows on the ground.

Rasterized shadows The same scene with ray-traced shadows (at the Ultra in-game setting)

Here is another pair of scenes from Shadow of the Tomb Raider:

More rasterized shadows More ray-traced shadows (again at the Ultra setting)

And let's look at a final set:

A third look at rasterized shadows A third look at ray-traced shadows

The ray-traced shadows are softer and more realistic than the harsher rasterized versions. Their darkness varies depending on how much light an object is blocking and even within individual shadows, while rasterization seems to give every object a hard edge. The original shadows don't really look bad, but after playing the game with ray tracing, it's hard to go back.

Ray tracing support can still be polarizing if a game implements the feature separately or differently for Nvidia and AMD graphics cards, but the more modern approach is to take advantage of DXR, which works on current AMD, Nvidia, and Intel GPUs.

Ray Tracing: The Performance Impact

When it comes to PC graphics, everything comes at a price, and the visual enhancements of ray tracing are no exception. The technology usually brings a performance hit that varies from game to game. New speedup technologies—Nvidia's Deep Learning Super Sampling (DLSS) and AMD's FidelityFX Super Resolution (FSR)—help reduce the performance penalty of ray tracing.

To illustrate, I ran the built-in benchmark of the auto racing simulator F1 22, using an entry-level gaming desktop with an Intel Core i5-12400F processor and Nvidia GeForce RTX 3050 graphics card. The numbers below show the average frames per second (fps). Gamers generally look for a minimum of 60fps for smooth play.

I ran all scenarios at F1 22’s Ultra High detail preset. "Ray tracing on" implies everything—shadows, reflections, ambient occlusion, and transparent reflections—with ray tracing quality set to High. When DLSS was on, I left it at its default setting of Quality.

Under the worst-case scenario, with ray tracing enabled and DLSS turned off, the desktop managed just 43fps. That's hardly playable for a fast-paced simulator. Enabling DLSS resulted in a sizzling 58% performance gain (to 68fps), so DLSS really saves the day.

However, the same PC achieved 125fps with DLSS on but ray tracing turned off, a far better frame rate for an esports title like this. So, at least on entry-level hardware, ray tracing can still be pretty demanding, to the point that you might need to tweak the settings or disable it entirely for some games. As noted, things vary widely from game to game; F1 22 is just one example.

Game optimization also deserves a mention. Developers continue to optimize their ray-tracing implementations just as they did rasterization (which has come incredibly far in five or six years), so it'll be possible to experience better and faster ray-traced effects from today's hardware tomorrow.

Key Ray-Tracing Games We've Reviewed

World of Warcraft: Shadowlands (for PC) Review

4.0 Excellent $39.99 at Blizzard Entertainment See It (Opens in a new window)

Cyberpunk 2077 (for PC) Review

3.5 Good $18.99 at Best Buy Check Stock (Opens in a new window)

Shadow of the Tomb Raider (for PC) Review

3.5 Good $59.99 at Microsoft Store See It (Opens in a new window)

DLSS and FSR will definitely help, and Nvidia's and AMD's respective technologies will be refined and expanded with time. DLSS is in its third generation now, while FSR works similarly but runs on any graphics card.

A Ray-Traced Future

With the widespread availability of ray tracing graphics cards including entry-level products, modern games now commonly support the base technology as well as the performance tweaks of Nvidia's DLSS and AMD's FSR. Hardware ray tracing support in the PlayStation 5 and Xbox Series X just emphasizes the point that ray tracing is here to stay.

Atomic Heart has been at the center of a debate around ray tracing since its launch without the long-touted feature.

While the integrated graphics popular in affordable laptops and low-end desktops don't currently support ray tracing, a wide variety of discrete GPUs do, and that goes for both laptops and desktops. Ray tracing's performance impact can still be severe on entry-level hardware, though it varies from game to game. No doubt, however, gamers craving the best visual effects will find ray tracing a tempting reason to upgrade from an older platform.

Tags graphics cards