Supersampling

Supersampling or supersampling anti-aliasing (SSAA) is a spatial anti-aliasing method, i.e. a method used to remove aliasing (jagged and pixelated edges, colloquially known as "jaggies") from images rendered in computer games or other computer programs that generate imagery.

Aliasing occurs because unlike real-world objects, which have continuous smooth curves and lines, a computer screen shows the viewer a large number of small squares.

This is achieved by rendering the image at a much higher resolution than the one being displayed, then shrinking it to the desired size, using the extra pixels for calculation.

The result is a downsampled image with smoother transitions from one line of pixels to another along the edges of objects.

Aliasing is manifested in the case of 2D images as moiré pattern and pixelated edges, colloquially known as "jaggies".

The naive "dart throwing" algorithm is extremely slow for large data sets, which once limited its applications for real-time rendering.

For an optimal pattern, the rotation angle is arctan (⁠1/2⁠) (about 26.6°) and the square is stretched by a factor of ⁠√5/2⁠[8][citation needed], making it also a 4-queens solution.

Calculating the end color value
Comparison of a rendered scene without (left side) and with supersampling anti-aliasing applied (right) (Not applying AA is analogous to a nearest-neighbor interpolation .)
Point samples generated using Poisson disk sampling, and graphical representation of the minimum inter-point distance