Ray tracing

On this page 7

Ray tracing is a rendering technique that simulates the paths of light rays through a three-dimensional scene to calculate reflections, shadows, refraction and indirect lighting, instead of approximating them with screen-space tricks and precomputed maps. Among graphics settings in gaming, it is the option that most visibly improves lighting realism and also the one with the largest performance cost.

In real-time games, ray tracing is almost always hybrid: the main image is still produced by rasterization, and rays are traced only for selected effects. The most demanding variant, path tracing, extends the idea to nearly all lighting in the scene and relies heavily on upscaling and denoising to remain playable.

How ray tracing calculates light

Ray tracing works backwards from the camera. For each pixel, the renderer casts a ray into the scene, finds the first surface it hits, and then casts secondary rays toward light sources, along reflection directions or into the surroundings to determine how that point is lit. Each ray-triangle intersection test is the basic unit of work.

Testing every ray against millions of triangles would be impossible in real time, so scenes are organized into a bounding volume hierarchy (BVH), a tree of nested boxes that lets the hardware discard large parts of the scene quickly. Dedicated ray tracing cores in modern GPUs accelerate both BVH traversal and intersection tests.

Real-time budgets allow only about one to a few rays per pixel for each effect, which produces a noisy image. A denoiser then reconstructs a clean result by combining information from neighboring pixels and previous frames. The quality of this denoising step often decides whether ray-traced effects look stable or smeared.

Ray-traced effects and their cost

Games usually expose ray tracing as separate effects, each with its own quality setting, because their visual impact and performance cost differ widely. The table below summarizes the common ones.

EffectWhat it improvesRelative cost
Ray-traced shadowsSoft, accurate contact and area shadowsLow to moderate
Ray-traced reflectionsCorrect reflections of off-screen objectsModerate to high
Ray-traced ambient occlusionDarkening in corners and crevicesLow to moderate
Ray-traced global illuminationLight bouncing between surfacesHigh
Path tracingNearly all lighting from one unified methodVery high
Common ray-traced effects in games

Enabling several effects at their highest quality can reduce frame rates by roughly 30-60 percent compared with rasterized lighting, depending on the game, resolution and GPU. Reflections and global illumination usually change the look of a scene the most, while ray-traced shadows are often hard to distinguish from good conventional shadows.

The cost of ray tracing scales with the number of rays, which in turn scales with the internal rendering resolution. Many games therefore trace reflections at half or quarter resolution and reconstruct the result, and they limit how far rays travel or how many bounces are allowed. These hidden parameters explain why the same setting name, such as high, can mean very different workloads in different games.

Ray tracing compared with rasterization and path tracing

Ray tracing is best understood next to the two neighboring approaches. Rasterization projects triangles onto the screen and is extremely fast, but it only knows what is visible on screen, while path tracing follows many randomized light bounces for physically complete lighting.

ApproachHow lighting is computedTypical limitation
RasterizationShaders plus screen-space and baked approximationsMissing off-screen reflections, light leaks
Hybrid ray tracingRasterized image with traced effects addedCost scales with the number of effects
Path tracingRandomized multi-bounce rays for all lightingRequires strong upscaling and denoising
Baked lightingLighting precomputed into lightmapsCannot react to moving lights or objects
Rendering approaches compared

The practical advantage of ray tracing is dynamic correctness. A door opening or a light switching off updates reflections and bounced light immediately, which baked lighting cannot do without artists preparing every variation in advance.

Choosing ray tracing settings

Ray tracing is rarely enabled alone. It is usually paired with upscaling such as DLSS, FSR or XeSS, which renders at a lower internal resolution and reconstructs a sharp image, and sometimes with frame generation, which inserts interpolated frames to raise displayed frame rates.

SituationSuggested settingReason
Competitive multiplayerRay tracing offFrame rate and low latency matter most
Single-player at 60 fps targetReflections or global illumination with upscalingLargest visual gain per frame spent
Mid-range GPU at 1440pOne effect at medium qualityKeeps frame times stable
High-end GPU at 4KFull ray tracing or path tracing with upscalingHardware can absorb the cost
Low video memoryLower ray tracing quality or disable itBVH data and buffers need extra memory
Recommended approach by situation

Ray tracing also increases video memory use, because the BVH and additional buffers must stay resident. Cards with limited VRAM can stutter when ray tracing is combined with high-resolution textures, even if the average frame rate seems acceptable.

Limitations and common misconceptions

Ray tracing is powerful but not automatically more beautiful. Its benefit depends on the scene, the art direction and how well the developer integrated it.

  • Not every scene benefits: bright outdoor daylight shows smaller differences than reflective interiors at night.
  • Denoising artifacts such as ghosting and boiling noise appear in motion and on fine detail.
  • Frame generation does not lower input latency, so it cannot fully compensate for ray tracing in fast games.
  • Console implementations usually trace fewer rays at lower resolution than high-end PCs.
  • Ray tracing is not path tracing; most games trace only selected effects.

The trade-off between frame rate and lighting quality remains the core decision. Players who value responsiveness usually keep ray tracing off, while those playing slower, atmospheric games often find the improved lighting worth the cost.

In everyday language

Ray tracing is a way for a game to imitate how real light behaves. The computer follows imaginary beams of light as they hit walls, bounce off floors and reflect in windows. The result is shadows, reflections and lighting that look much closer to real life.

The catch is that this takes a great deal of computing work. Turning ray tracing on makes a game look better but run slower, so players decide whether they prefer prettier light or smoother movement.

Seen in the real world

A player with a mid-range graphics card runs a story-driven game set in a rainy city at 1440p. With ray tracing off, the game reaches about 90 frames per second, but puddles reflect only what is on screen, and neon signs vanish from reflections when the camera turns. The player enables ray-traced reflections at medium quality.

Frame rate drops to about 55 frames per second, so the player also switches the upscaler to its quality mode. The game returns to roughly 75 frames per second with accurate reflections on wet streets and only a slight softening of fine detail. For a slower single-player game, the player judges this to be the best balance between image quality and smoothness.