# The math behind Variance Shadow Maps - moments

I am not asking how to implement them (that's not particularly difficult), but I'm having a bit of trouble understanding why the moments used in Chebyshev's inequality (indirectly) are equal to the depth value and the depth squared respectively.

To grasp why things are like this, I tried to understand what the random variable one computes the moments for is, and what is its density (the p(x) in those integrals used to compute the moments). Now that one can equate the moments to the depth and depth^2 is the magic behind this approach, hence the key of justifying it mathematically. Can anyone please explain what p(x) is, and why is the first moment equal to the depth value? I can probably pick up from there and easily understand the second moment.

• thanks. I also figured they were talking about double integrals, but computer science papers usually abuse formulas on a regular basis. What you're saying really explains a lot.. this approach can be used for basically anything (not just depths), if p(x) is the convolution kernel.. leaving you with a nifty trick for soft feature representation. Thanks again.. Aug 16, 2013 at 6:51