IT lexicon › Programming › Variance shadow maps (VSM)

Variance shadow maps (VSM)

Programming På svenska → Updated: 2026-10-25

A shadow map storing both depth and depth-squared so Chebyshev's inequality can estimate shadowing — letting the map be blurred and filtered like any texture, buying soft edges cheaply.

An ordinary shadow map cannot be filtered: the average of two depths is not the average of their shadow tests, so a blur gives wrong answers. William Donnelly and Andrew Lauritzen (2006) fixed it by storing depth's first and second moments. From them, Chebyshev's inequality gives an upper bound on the fraction of occluding geometry — a soft transition instead of a binary in-or-out of shadow.

Because the map now holds only numbers that may be averaged, it can be pre-filtered, mipmapped and MSAA'd like a texture. The downside is light bleeding where shadows meet; the ESM, EVSM and moment shadow map variants tame it.

← Back to the lexicon