﻿# Russian roulette in path tracing: terminate paths without changing expectation

Russian roulette trades additional variance for fewer traced continuations; correct survival weighting and matched-quality timing determine its value.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/learn-path-tracing-russian-roulette/
Language: en

Russian roulette in path tracing probabilistically terminates some continuing paths while increasing the weight of survivors. Correct weighting can preserve the estimator's expected value while changing variance and computation cost. This is different from simply discarding weak contributions. On a GPU, the policy also changes active queue sizes and how much uneven work remains at later path depths.

## Stopping a path changes an estimator

A continuing path can contribute light at later interactions. Removing it deterministically because its current weight looks small can remove a real part of the expected image. Russian roulette instead makes a random survival decision and compensates surviving paths by the appropriate probability factor. The combination matters: random termination without compensation is not the same algorithm. Check the expectation conceptually before considering the saved traversal or shading work.

Primary reference: [Physically Based Rendering: A Better Path Tracer](https://pbr-book.org/4ed/Light_Transport_I_Surface_Reflection/A_Better_Path_Tracer).

## The survival probability controls variance

A low survival probability avoids more continuation work but gives larger weights to the paths that survive. Those rare large contributions can increase visible noise. A high probability retains more work and may offer little computational saving. Useful policies consider path throughput and the estimator's numerical behavior. There is no need to assume a fixed universal probability is optimal across dark surfaces, transparent objects, and difficult indirect-lighting configurations.

Primary reference: [Physically Based Rendering: Light Transport and Surface Reflection](https://pbr-book.org/4ed/Light_Transport_I_Surface_Reflection).

## Refraction can complicate a naive heuristic

Intermediate path weights can include factors associated with refraction that later cancel when the path leaves an object. A termination heuristic that interprets every temporary reduction as permanent insignificance can terminate useful transmitted paths too aggressively. Follow the rendering algorithm's treatment of these factors rather than inventing a shortcut from current brightness alone. Controlled glass and mirror scenes help reveal a policy that produces unnecessary noise or incorrectly weighted contributions.

Primary reference: [Physically Based Rendering: Primitives and Intersection Acceleration](https://pbr-book.org/4ed/Primitives_and_Intersection_Acceleration).

## Fewer rays change the GPU tail

As paths terminate, later queues shrink. Some implementations gain from avoiding expensive continuation, while others become dominated by small launches or uneven surviving tasks. Track queue sizes and phase durations across path depths. A lower ray count does not imply an equal proportional reduction in render time. Fixed scheduling, compaction, and result-assembly costs remain, and the remaining rays can be more expensive than the average path that was removed.

## Compare error per unit of time

Render matched scenes with a well-defined reference and inspect both runtime and image error. Use multiple random realizations where practical, because the policy itself introduces randomness. Keep maximum-depth settings and denoising consistent when isolating roulette behavior. The useful conclusion concerns efficiency at a quality target, not an assertion that roulette always reduces noise. It deliberately changes variance to spend less work on statistically less valuable continuations.

Related reading: [Sharing GPUs between LLM inference and server rendering](/journal/gpu-llm-rendering-workload-scheduling/); [NVIDIA and AMD GPU catalogue for LLM inference and server rendering](/journal/nvidia-amd-gpu-catalog/).
