Library/Graphics/Adaptive Multisampling

Outline:
 * Pixel as a region. Need for multisampling
 * Adaptive Multisampling, variance, limits
 * Stratified, random, uniform random
 * Useful functions

What is a Pixel?
Alvy Ray Smith's paper A Pixel is Not a Square answers this question better than I could.

Multisampling
Estimating the variance by taking multi-samples within the region. The more a value varies from the mean (average), the more samples we'll need to arrive at the actual mean.

Multisampling for area lights
For simplicity, let's treat a light as a disc centered at the point light position and always oriented with a normal pointing toward the intersection point.

Correct approach: for each point on the surface of the light, check if that point is visible from the intersection point. This of course is impossible, as there are infinitely many points on the light surface.

Sample the disc center and N samples around the circumference. The assumption being that the further you move from the center, the more light the shadow term is to change. This of course is not true in the general case, but may be true for small point lights with rays lying close to the edge of the surface.