Path tracing is compact in pseudocode and surprisingly easy to get subtly wrong. Every sampled direction, light choice, and termination decision changes the probability of the path—and therefore the weight required for an unbiased estimate.

This chapter derives the estimator used by HdRestir before following it into the renderer: the rendering equation, PDF measures, importance sampling, next-event estimation, multiple importance sampling, throughput, and Russian roulette.

A converged path-traced scene rendered at 64 samples per pixel

Read the full Monte Carlo path tracing article →