One equation, five moving parts

The rendering equation, term by term

Everything a renderer does is an attempt to evaluate this one integral at every visible point. Click any term to switch it off and watch what it was contributing. Then raise the sample count and watch the estimate crawl towards the true answer — that crawl is Monte Carlo integration, and it is the whole cost of ray tracing.

The hemisphere above one point
Hover a sample to read its contribution

The equation click a term
Estimate against truth
Monte Carlo estimate
True value (dense integration)
Error
Samples used
Controls the estimate
24
0.72
0.00
0.13

Shrink the light and uniform sampling falls apart — most rays miss it entirely, so the estimate jumps around wildly. Switch to cosine-weighted sampling and it steadies. That is importance sampling: spend samples where the integrand is large.

The whole equation what each part does

The integral runs over the hemisphere above the surface — every direction light could arrive from. That is why it cannot be solved in closed form for a real scene: Li is whatever the rest of the room happens to be doing, which depends on this same equation evaluated somewhere else. It is defined in terms of itself.

Why an integral becomes an average. An integral is a continuous sum over infinitely many directions, and no computer can take infinitely many samples. Monte Carlo integration replaces it with a finite average: pick N directions at random, evaluate the integrand at each, average, and correct for how likely each direction was to be picked. The result is unbiased — right on average — but only approximately right for any particular N. Watch the estimate line wobble around the true value and settle: every renderer you have ever used is doing precisely this, a few billion times per frame.