Supersampling Anti-aliasing
   HOME

TheInfoList



OR:

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 A personal computer game, also known as a PC game or computer game, is a type of video game played on a personal computer (PC) rather than a video game console or arcade machine. Its defining characteristics include: more diverse and user-deter ...
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. These pixels all have the same size, and each one has a single color. A line can only be shown as a collection of pixels, and therefore appears jagged unless it is perfectly horizontal or vertical. The aim of supersampling is to reduce this effect. Color samples are taken at several instances inside the pixel (not just at the center as normal), and an average color value is calculated. 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. The number of samples determines the quality of the output.


Motivation

Aliasing is manifested in the case of 2D images as moiré pattern and pixelated edges, colloquially known as " jaggies". Common signal processing and
image processing An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
knowledge suggests that to achieve perfect elimination of aliasing, proper spatial sampling at the Nyquist rate (or higher) after applying a 2D Anti-aliasing filter is required. As this approach would require a forward and inverse fourier transformation, computationally less demanding approximations like supersampling were developed to avoid domain switches by staying in the spatial domain ("image domain").


Method


Computational cost and adaptive supersampling

Supersampling is computationally expensive because it requires much greater video card memory and memory bandwidth, since the amount of buffer used is several times larger. A way around this problem is to use a technique known as adaptive supersampling, where only pixels at the edges of objects are supersampled. Initially only a few samples are taken within each pixel. If these values are very similar, only these samples are used to determine the color. If not, more are used. The result of this method is that a higher number of samples are calculated only where necessary, thus improving performance.


Supersampling patterns

When taking samples within a pixel, the sample positions have to be determined in some way. Although the number of ways in which this can be done is infinite, there are a few ways which are commonly used. File:Supersampling_-_Uniform.svg, Grid algorithm in
uniform distribution Uniform distribution may refer to: * Continuous uniform distribution * Discrete uniform distribution * Uniform distribution (ecology) * Equidistributed sequence In mathematics, a sequence (''s''1, ''s''2, ''s''3, ...) of real numbers is said to be ...
File:Supersampling_-_Checker.svg, Rotated grid algorithm (with 2x times the sample density) File:Supersampling_-_Random.svg, Random algorithm File:Supersampling_-_Jittering.svg, Jitter algorithm File:Supersampling_-_Poisson_Disc.svg, Poisson disc algorithm File:Supersampling_-_QMC.svg, Quasi-Monte Carlo method algorithm File:Supersampling_-_N-Rooks.svg, N-Rooks File:Supersampling_-_RGSS.svg, RGSS File:Supersampling_-_Quincunx.svg, High-resolution antialiasing (HRAA), Quincunx File:Supersampling_-_Flipquad.svg, Flipquad File:Supersampling_-_Fliptri.svg, Fliptri


Grid

The simplest algorithm. The pixel is split into several sub-pixels, and a sample is taken from the center of each. It is fast and easy to implement. Although, due to the regular nature of sampling, aliasing can still occur if a low number of sub-pixels is used.


Random

Also known as stochastic sampling, it avoids the regularity of grid supersampling. However, due to the irregularity of the pattern, samples end up being unnecessary in some areas of the pixel and lacking in others.


Poisson disk

The poisson disk sampling algorithm places the samples randomly, but then checks that any two are not too close. The end result is an even but random distribution of samples. However, the computational time required for this algorithm is too great to justify its use in real-time rendering, unless the sampling itself is computationally expensive compared to the positioning of the sample points or the sample points are not repositioned for every single pixel.


Jittered

A modification of the grid algorithm to approximate the Poisson disk. A pixel is split into several sub-pixels, but a sample is not taken from the center of each, but from a random point within the sub-pixel. Congregation can still occur, but to a lesser degree.


Rotated grid

A 2×2 grid layout is used but the sample pattern is rotated to avoid samples aligning on the horizontal or vertical axis, greatly improving antialiasing quality for the most commonly encountered cases. For an optimal pattern, the rotation angle is (about 26.6°) and the square is stretched by a factor of .


See also

* Oversampling * Multisample anti-aliasing * Quincunx *
Graphics card A graphics card (also called a video card, display card, graphics adapter, VGA card/VGA, video adapter, display adapter, or mistakenly GPU) is an expansion card which generates a feed of output images to a display device, such as a computer moni ...
* Graphics processing unit * Ray tracing (graphics) * Framebuffer *
Game engine A game engine is a software framework primarily designed for the development of video games and generally includes relevant libraries and support programs. The "engine" terminology is similar to the term "software engine" used in the software i ...
* Image scaling * 2×SaI * Deep Learning Super Sampling


References


External links

* * *{{cite journal , title=Image Interpolation with Contour Stencils , journal=Image Processing on Line , year=2011 , doi=10.5201/ipol.2011.g_iics , url=http://www.ipol.im/pub/art/2011/g_iics/ , accessdate=21 October 2010, last1=Getreuer , first1=Pascal , volume=1 , pages=70–82 Image processing Anti-aliasing algorithms pl:Antyaliasing#Supersampling