Skip to content
Monday, October 19, 2026
RenderedNews

Game graphics and engines explained: rendering, upscaling and how games are made

Latest
Rendering Explained

What Is Ray Tracing in Games? A Plain-English Explainer

What ray tracing actually does in games, how it differs from rasterization, which effects get ray traced, and why it costs so much performance.

In-game screenshot from Portal with RTX showing ray-traced lighting
Portal with RTX (NVIDIA Lightspeed Studios) Image: Portal with RTX (via Steam)

Ray tracing is the rendering feature that has dominated graphics menus, marketing and forum arguments since 2018. The name sounds technical, but the core idea is simple: instead of faking how light behaves, the game asks where light would actually travel and what it would hit along the way. This explainer walks through what a “ray” is, how ray tracing differs from the traditional way games draw images, which effects games actually ray trace, and why switching it on can cut your frame rate so sharply.

What a “ray” actually is

In rendering, a ray is just a mathematical line with a starting point and a direction. You can picture it as a laser pointer fired into a 3D scene. The renderer’s job is to answer one question for each ray: what is the first surface this line hits? That question is called an intersection test.

Once you know where a ray lands, you can ask follow-up questions by firing more rays from that point. Fire one toward a light source: if something blocks it, the point is in shadow. Fire one in the mirror direction: whatever it hits is what you see in a reflection. Fire many in random directions: the light they collect from nearby surfaces tells you how much bounced, indirect light reaches that point.

Real light travels from light sources into your eye. Rendering usually works backward, starting from the camera, because only the rays that reach the camera matter for the final image.

Rasterization: how games normally draw images

To understand why ray tracing matters, you need to know what it replaced, or rather what it supplements. Almost every real-time game draws its frames with rasterization. The engine takes the triangles that make up the 3D world, projects them onto the flat 2D screen, and figures out which pixels each triangle covers. A depth buffer keeps track of which triangle is closest to the camera at each pixel, and a pixel shader works out the color.

Rasterization is extremely fast, and GPUs have been built around it for decades. Its weakness is that each triangle is drawn largely in isolation. When the GPU shades a pixel on a wall, it does not naturally “know” what is behind the camera, what is around the corner, or what light bounces off the red carpet nearby. Everything that depends on the rest of the scene has to be approximated with clever tricks:

  • Shadow maps render the scene from the light’s point of view to guess what is in shadow.
  • Screen-space reflections reuse what is already on screen, so they break when the reflected object is off-screen.
  • Baked lightmaps precompute bounce lighting offline, which looks great but cannot react when lights or geometry move.
  • Screen-space ambient occlusion darkens creases by examining the depth buffer, again limited to what the camera can see.

These tricks are the reason rasterized games can look excellent. They are also the reason you sometimes see reflections that vanish when you tilt the camera, shadows that shimmer, or rooms that stay oddly bright after a light is destroyed.

How ray tracing is different

Ray tracing answers visibility questions against the whole scene, not just what is on screen. A reflection ray can hit a car parked behind the player. A shadow ray can detect a thin fence post that a low-resolution shadow map would miss. A bounce-light ray can pick up the color of a sunlit wall outside the current view.

Diagram of a primary ray from camera through a pixel, plus shadow and reflection rays
Primary rays find what a pixel sees; secondary rays add shadows and reflections Image: Rendered News

The technique itself is old. Turner Whitted’s 1980 paper on recursive ray tracing is a classic, and film and architectural visualization have relied on ray-traced renderers for years. What changed in the late 2010s was that GPUs gained dedicated hardware to accelerate ray intersection tests, and graphics APIs gained standard ways to use it. That made a limited number of rays per pixel affordable within the roughly 16 milliseconds a 60 fps frame allows.

Hybrid rendering: why most games still rasterize

A key point that marketing often blurs: in most games, “ray tracing on” does not mean the whole image is ray traced. Nearly every ray-traced game uses hybrid rendering. The main image, meaning which surface is visible at each pixel, is still rasterized because that is cheap and accurate. Ray tracing is then layered on for specific effects where the rasterized approximations are weakest.

Typical hybrid effects include:

  • Ray-traced reflections: accurate reflections on water, glass, polished floors and metal, including objects that are off-screen. Battlefield V, which added DXR reflections in November 2018, was the first major game to ship with this.
  • Ray-traced shadows: shadows that soften naturally with distance from the caster, with no shadow-map resolution limits. Shadow of the Tomb Raider was an early showcase.
  • Ray-traced global illumination (RTGI): light that bounces from surface to surface, so a sunlit floor lights up the ceiling. Metro Exodus (2019) made this its headline feature.
  • Ray-traced ambient occlusion (RTAO): contact darkening in corners and under objects, without the halos screen-space AO often produces.

Control (2019) became a popular reference because it combined several of these at once. The opposite end of the scale is path tracing, sometimes marketed as “full ray tracing,” where lighting for the whole frame is computed by tracing rays and almost all of the rasterized lighting tricks are dropped. Path tracing is a big enough topic to deserve its own explainer; for now, just know that it sits at the expensive end of a spectrum that starts with a single ray-traced effect.

BVHs: how the GPU finds what a ray hits

A modern game scene can contain millions of triangles. Testing every ray against every triangle would be hopelessly slow. The solution is an acceleration structure, almost always a bounding volume hierarchy (BVH).

A BVH wraps groups of triangles in simple boxes, then wraps groups of those boxes in bigger boxes, and so on, forming a tree. When a ray is traced, the GPU first checks the big boxes. If the ray misses a box, every triangle inside it can be skipped at once. Only when the ray enters a small enough box does the GPU test actual triangles. This turns a search through millions of triangles into a short walk down a tree.

Graphics APIs split this into two levels:

  • A bottom-level acceleration structure (BLAS) holds the geometry of an individual mesh, such as a character or a building.
  • A top-level acceleration structure (TLAS) holds instances of those meshes placed in the world with their positions.

This split matters because the BVH must be rebuilt or updated whenever things move. A car driving down the street only needs its instance moved in the top level, which is cheap. A deforming character or swaying foliage may need its bottom-level structure refit every frame, which costs time. This is one reason developers sometimes leave dense vegetation or particles out of ray-traced effects.

Denoising: making a few rays look like thousands

Offline film renderers can afford hundreds or thousands of rays per pixel. Real-time games typically get somewhere around one ray per pixel per effect, sometimes less. With so few samples, raw ray-traced lighting looks grainy, like a high-ISO photo taken in a dark room.

The fix is denoising. A denoiser is a filter that turns that sparse, noisy signal into a smooth image. Common strategies include:

  • Spatial filtering: blending a pixel’s result with its neighbors, guided by depth and surface normals so detail is not smeared across edges.
  • Temporal accumulation: reusing results from previous frames, using motion vectors to track where each surface moved.
  • Machine-learning denoisers: neural networks trained to reconstruct clean lighting, sometimes combined with upscaling in a single pass, as in NVIDIA’s Ray Reconstruction.

Denoising explains some characteristic ray-tracing artifacts: lighting that “boils” or shimmers in dark areas, reflections that lag slightly behind fast-moving objects, and smeary trails when the camera turns quickly. When you see those, you are usually looking at the denoiser struggling with too little information, not the ray tracing itself.

Why ray tracing is so expensive

Even with dedicated hardware, ray tracing costs more than rasterized effects for several reasons:

Offline ray-traced POV-Ray render of glasses, a pitcher and dice with realistic refraction
A classic offline ray-traced render made with POV-Ray (Gilles Tran, public domain) Image: Gilles Tran, Public domain via Wikimedia Commons
  1. Incoherent memory access. Rasterization processes neighboring pixels that touch neighboring data, which GPUs handle efficiently. Reflection and bounce rays scatter in different directions and touch unrelated parts of memory, which is much harder on caches.
  2. Shading at the hit point. Finding the intersection is only half the job. The surface the ray hits also needs its material and lighting evaluated, which can mean running additional shaders.
  3. Acceleration structure maintenance. Building and updating BVHs every frame takes GPU time and memory.
  4. Denoising. The filters that clean up the result are themselves a notable cost.
  5. Resolution scaling. Ray count tends to grow with pixel count, so higher resolutions multiply the work.

This is why ray tracing and upscaling became closely linked. Rendering internally at a lower resolution and reconstructing a sharper image with technologies like DLSS, FSR or XeSS frees up the budget that ray tracing consumes. Many games also offer quality tiers for each ray-traced effect, which usually change the number of rays, the distance they travel, or the resolution at which the effect is computed.

The APIs: DXR and Vulkan Ray Tracing

Games do not talk to ray-tracing hardware directly. They use a graphics API that exposes a standard model:

  • DirectX Raytracing (DXR) was announced by Microsoft in March 2018 and shipped with the Windows 10 October 2018 Update. It is part of DirectX 12, and later revisions added “inline” ray tracing that lets ordinary shaders cast rays without the full ray-tracing pipeline. DXR is one of the pillars of the DirectX 12 Ultimate feature set.
  • Vulkan Ray Tracing is Khronos Group’s cross-vendor, cross-platform equivalent. Provisional extensions appeared in March 2020 and the final specifications were released in November 2020.

Both APIs follow a similar structure: developers build acceleration structures, then write shaders for generating rays, handling hits and handling misses. Consoles from the PlayStation 5 and Xbox Series X|S generation also support hardware-accelerated ray tracing through their own APIs, which is a big reason ray tracing became common in mainstream releases rather than a PC-only extra.

Common misconceptions

“Ray tracing always looks better.” Not necessarily. A carefully baked lighting setup in a static scene can look as good as or better than real-time ray tracing, and a noisy, low-sample ray-traced effect can look worse than a polished rasterized one. Ray tracing’s biggest advantage is that it stays correct when things change: moving lights, destructible walls, time-of-day cycles, and off-screen objects.

“Software ray tracing isn’t real ray tracing.” Some engines trace rays against simplified scene representations using regular compute shaders. Unreal Engine 5’s Lumen, for example, offers a software ray-tracing mode that works without dedicated RT hardware, alongside a hardware mode. Both are ray tracing; they just make different trade-offs between accuracy and speed.

Where this is heading

If you are deciding whether to switch it on, enable one ray-traced effect at a time and compare; global illumination and reflections usually change the image most. The bigger picture is that real-time rendering is steadily shifting from approximations toward simulation. Rasterization is not going away soon, since it remains the fastest way to find visible surfaces, but the lighting on top of it is increasingly computed by tracing rays. Understanding what those rays do makes it much easier to judge every other setting that depends on them, from denoisers to upscalers to frame generation.

Sources

Elliot Varga

Elliot Varga is the pen name of the small independent editorial team behind Rendered News.