If you've read our ray tracing guide, you might remember a throwaway line near the end: path tracing is "the hungriest option of all". That's true, but it undersells things. Path tracing isn't just ray tracing with the dial turned up. It's a different way of thinking about light, and once it clicks, a lot of graphics jargon you've been nodding along to suddenly makes sense.
It's also the reason the most expensive graphics card money can buy still can't run Cyberpunk 2077's Overdrive mode smoothly at native 4K.
Start with a room, not a computer
Picture a bedroom with one window on a sunny afternoon. A patch of sunlight lands on the floor. Some of that light bounces up to the ceiling, from the ceiling to the far wall, from the wall to the wardrobe. The corner behind the door never sees the sun directly, and yet it isn't black. It's lit by light that has bounced two, three, maybe ten times before getting there.
Direct light is the easy part. A computer can work out "is this spot facing the sun, and is anything in the way?" very quickly.
It's the bounces that make a room look like a room. And they're brutal to compute, because every surface is sending light to every other surface at the same time.
Ray tracing vs path tracing
Classic ray tracing, the version Turner Whitted described back in 1980, follows light only where physics forces it to go. A shadow ray heads straight for the lamp. A mirror sends the ray off at exactly the reflected angle. Glass bends it by a known amount. Everything's tidy and predictable.
The trouble is a plain painted wall. A matte surface doesn't send light in one direction; it scatters it in every direction at once. You can't follow every direction. There are infinitely many.
In 1986, James Kajiya published a paper called "The Rendering Equation", and his answer was, more or less: don't try. Pick one direction at random. Follow it. When it hits something, pick another random direction and follow that. Keep going until the ray reaches a light, or flies off into the sky, or you've bounced enough times that it no longer matters. That chain of bounces is one path.
Then do it again with different random choices. And again. Average all the results for the pixel.
That really is the whole algorithm. Everything else in the field, decades of research, is about making it faster.
If "average a bunch of random guesses" sounds too sloppy to produce a photo-real image, think of an election exit poll. Ask one voter and you learn almost nothing. Ask ten thousand and you get remarkably close to the real result. Mathematicians call this the Monte Carlo method, named after the casino, and path tracing is Monte Carlo applied to light.
Why it looks so real
Here's the bit I find genuinely elegant. In a path tracer you never decide which lighting effects to include.
Reflections, soft shadows, colour bleeding from a red sofa onto a white floor, the darkening in corners, light focusing through a glass of water onto a table: none of these are separate features. They all fall out of the same little loop. If light could physically get from the lamp to your eye by some route, a path will eventually find that route.
Compare that with a normal rasterised game, where each of those effects is its own system, built by a different programmer, with its own settings and its own bugs. That's where you get reflections that vanish when you look down, or a character who looks oddly pasted onto the background.
You can see the difference clearly in Cyberpunk 2077. With regular ray tracing on, only some lights cast ray-traced shadows. Switch to Overdrive, which is path traced, and every neon sign and car headlight lights the scene and casts shadows properly. Night City at night stops looking like a nice game and starts looking like footage.
The catch: noise
Run a path tracer with only a handful of paths per pixel and you get grain. Lots of it. It looks like a phone photo taken in a dark restaurant.
The maths here is unkind. Noise falls with the square root of the number of samples, which means four times the work only halves the grain. To halve it again, you need sixteen times the original work.
Films can live with that. Disney's Hyperion renderer, which made Big Hero 6 back in 2014, and Pixar's RenderMan are both path tracers, and a single frame of an animated film is allowed to take hours on a render farm with thousands of machines.
A game running at 60 fps gets 16.7 milliseconds for the entire frame. That has to cover physics, AI, audio and everything else too.
You don't have to take my word on any of this. Install Blender (it's free) and switch the render engine to Cycles, which is a path tracer. In Render Properties, under Sampling, set the render's max samples to 16 and untick Denoise, then press F12. Now try 1,024 samples. Then go back to 16 with Denoise ticked. Ten minutes with those three renders will teach you more than this whole article.
How games get away with it
A real-time path-traced game might get one or two paths per pixel. That's nowhere near enough on its own, so three things do the heavy lifting.
The first is smarter sampling. Instead of bouncing in a truly random direction, the renderer leans towards directions that are likely to matter, such as towards bright lights. A 2020 technique called ReSTIR, from NVIDIA and Dartmouth researchers, goes further by reusing good samples from neighbouring pixels and from the previous frame. It's a big part of why a scene with thousands of neon lights is feasible at all.
The second is denoising. A filter, increasingly a trained neural network, looks at that grainy image plus extra information like surface colours and depth, and reconstructs what the clean image probably looks like. NVIDIA's Ray Reconstruction, which arrived with DLSS 3.5 in 2023, replaced the hand-tuned denoisers in games like Cyberpunk, and the most obvious improvement was in reflections, which used to smear and crawl.
The third is upscaling and frame generation. The game traces at 1080p or lower, upscales to 4K, and then generates extra frames in between real ones. That's how an RTX 4090 goes from somewhere under 20 fps at native 4K in Overdrive to over 100 with DLSS doing its thing.
So when a game says "path traced", the honest description is: a small amount of real path tracing, plus a lot of very clever reconstruction. That isn't a criticism. It's how the trick works, and it's the only reason it works at all.
One thing to watch, though. Generated frames make the counter go up, but they don't make the game respond faster to your mouse. If the base frame rate is 30, it'll still feel a bit like 30, however smooth it looks.
Games you can actually try it in
Most of these came out of NVIDIA partnerships, so they run best on RTX cards. AMD and Intel cards can run several of them, but they usually take a much bigger hit.
- Quake II RTX (2019). The first three levels are free on Steam, which makes it the cheapest way to see full path tracing.
- Minecraft with RTX (2020), on the Windows Bedrock edition.
- Portal with RTX (2022), a free add-on if you own Portal. It's probably the clearest before-and-after you'll find.
- Cyberpunk 2077's RT Overdrive mode (2023).
- Alan Wake 2 (2023), which is the one I'd point to if someone asked what path tracing is for.
- Black Myth: Wukong (2024) and Indiana Jones and the Great Circle (2024), both under a "full ray tracing" setting, which is path tracing by another name.
Is it worth turning on?
On a top-end card, in a slow, atmospheric game, yes. Alan Wake 2 at 50 fps with a controller in your hands is a lovely experience, and the lighting is a huge part of its mood.
On a mid-range card, honestly, not yet. You'll end up leaning so hard on upscaling and frame generation that the image gets soft and the controls get mushy, and you'd be better off with regular ray tracing or none at all. In anything competitive, a shooter or a racer, don't even think about it. A steady high frame rate wins every time.
If you're not sure what your machine can manage, our Can I run it? tool will give you a rough idea before you spend an evening fiddling with settings.
If you make games
If you're a solo dev or a small team, you're not going to write a real-time path tracer, and you shouldn't. But path tracing is probably already in your workflow without you noticing.
When you bake lighting in Unity, its Progressive Lightmapper is a path tracer. It does the expensive work once, offline, and saves the result into textures your game reads cheaply at runtime. Baked lighting is basically path tracing you've paid for in advance.
Unreal Engine has a Path Tracer view mode built in. It's too slow for gameplay, but it's a superb reference. Flip to it, look at how light should behave in your level, then flip back and see where Lumen is cutting corners. Unity's HDRP has a path tracing option for trailers and stills too. Godot doesn't ship a path tracer, but its SDFGI and VoxelGI systems are chasing the same bounced-light look in cheaper ways.
How our own games fake it
None of our games trace a single ray. They run in a web browser, on Godot's Compatibility renderer (WebGL 2), on phones and budget laptops, where even ordinary ray tracing isn't available. So every lighting effect you see is a cheat, chosen on purpose.
Night in our racer Nitro Crown is a good example. The neon megacity isn't lit by its thousands of windows. The windows are drawn by a shader on the buildings, the glow is Godot's screen-space glow effect turned up for night tracks (an intensity of 0.9 at night against 0.55 by day), and the sky with its clouds and stars is another shader. In the garage, the car gets its own key light, placed by hand like a studio photographer would, because no bounce lighting is going to find the paintwork for us.
That's the real skill path tracing teaches a small team: once you know what light should do, you can decide which parts of it your players will actually notice, and fake only those.
And if you want to understand it properly, write one. The core is tiny. In rough pseudocode, for a scene of plain matte surfaces:
function trace(ray, depth) {
if (depth > 5) return BLACK; // stop bouncing eventually
const hit = scene.intersect(ray);
if (!hit) return skyColour(ray); // flew off into the sky
const emitted = hit.material.emission; // is this surface a light?
const dir = randomCosineDirection(hit.normal);
const incoming = trace(new Ray(hit.point, dir), depth + 1);
return emitted + hit.material.colour * incoming;
}
// For each pixel: call trace() many times and average the results.
That's a real path tracer. Slow, noisy, but correct. The free book Ray Tracing: The Rest of Your Life walks you from there to something properly fast, and Physically Based Rendering is the book you graduate to after that. Fair warning: you'll lose a weekend to watching the grain slowly clear, and it'll be a weekend well spent.
Sources & credits
This guide is original writing by Santoshi Games. It draws on, and links to, the free resources below. All rights to them belong to their creators. Please support them.
- The Rendering Equation (SIGGRAPH 1986), James T. Kajiya
- Ray Tracing: The Rest of Your Life, Peter Shirley, Trevor David Black and Steve Hollasch
- Physically Based Rendering: From Theory to Implementation, Matt Pharr, Wenzel Jakob and Greg Humphreys
- Cycles render engine manual, Blender Foundation
- Path Tracer in Unreal Engine, Epic Games
- Hyperion renderer, Walt Disney Animation Studios