Fast approximate anti-aliasing (FXAA) is a
screen-space
This is a glossary of terms relating to computer graphics.
For more general computer hardware terms, see glossary of computer hardware terms.
0–9
A
B
...
anti-aliasing algorithm created by
Timothy Lottes at
Nvidia
Nvidia CorporationOfficially written as NVIDIA and stylized in its logo as VIDIA with the lowercase "n" the same height as the uppercase "VIDIA"; formerly stylized as VIDIA with a large italicized lowercase "n" on products from the mid 1990s to ...
.
FXAA 3 is released under a
public domain
The public domain (PD) consists of all the creative work to which no exclusive intellectual property rights apply. Those rights may have expired, been forfeited, expressly waived, or may be inapplicable. Because those rights have expired, ...
license. A later version, FXAA 3.11, is released under a 3-clause BSD license.
Algorithm description
# The input data is the rendered image and optionally the luminance data.
# Acquire the luminance data.
This data could be passed into the FXAA algorithm from the rendering step as an alpha channel embedded into the image to be antialiased, calculated from the rendered image, or approximated by using the green channel as the luminance data.
# Find high contrast pixels by using a high pass filter that uses the luminance data.
Low contrast pixels that are found are excluded from being further altered by FXAA.
The high pass filter that excludes low contrast pixels can be tuned to balance speed and sensitivity.
# Use contrast between adjacent pixels to heuristically find edges, and determine whether the edges are in the horizontal or vertical directions.
The blend direction of a pixel will be perpendicular to the detected edge direction on that pixel.
# Calculate one blend factor for a high-contrast pixel by analyzing the luminance data in the 3x3 grid of pixels with the pixel in question being the center pixel.
# Search along the detected edge to determine how long that edge goes for and what direction the actual edge goes when the detected horizontal or vertical edge ends in order to take into account the actual edge's direction in order to calculate a second blend factor.
This step can be tuned for more quality by increasing the search resolution and how far the search goes before the search for the edge's end gives up, or for more speed by reducing both.
# Blend the pixel using the chosen blend direction and the maximum of both of the blend factors that were calculated.
Comparison
The main advantage of this technique over conventional spatial anti-aliasing is that it does not require large amounts of
computing power. It achieves this by smoothing undesirable jagged edges ("
jaggies")
as
pixel
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device.
In most digital display devices, pixels are the s ...
s, according to how they appear on-screen, rather than analyzing the
3D model
In 3D computer graphics, 3D modeling is the process of developing a mathematical coordinate-based representation of any surface of an object (inanimate or living) in three dimensions via specialized software by manipulating edges, vertices, ...
itself, as in conventional spatial anti-aliasing.
Since it is not based on the actual
geometry
Geometry (; ) is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space such as the distance, shape, size, and relative position of figures. A mathematician who works in the field of geometry is c ...
, it will smooth not only
edges
Edge or EDGE may refer to:
Technology Computing
* Edge computing, a network load-balancing system
* Edge device, an entry point to a computer network
* Adobe Edge, a graphical development application
* Microsoft Edge, a web browser developed by ...
between triangles, but also edges inside
alpha-blended textures, or those resulting from
pixel shader effects, which are immune to the effects of
multisample anti-aliasing (MSAA).
The downsides are that high contrast
texture maps
Texture mapping is a method for mapping a texture on a computer-generated graphic. Texture here can be high frequency detail, surface texture, or color.
History
The original technique was pioneered by Edwin Catmull in 1974.
Texture mappi ...
are blurred, that FXAA must be applied ''before'' rendering the
HUD elements of a game lest it affect them too, and that polygonal details smaller than one pixel that would have been captured and rendered by MSAA and SSAA cannot be captured and rendered by FXAA alone.
See also
*
Morphological antialiasing
*
Multisample anti-aliasing
*
Anisotropic filtering
In 3D computer graphics, anisotropic filtering (abbreviated AF) is a method of enhancing the image quality of textures on surfaces of computer graphics that are at oblique viewing angles with respect to the camera where the projection of the ...
*
Temporal anti-aliasing
*
Deep learning anti-aliasing
*
Spatial anti-aliasing
In digital signal processing, spatial anti-aliasing is a technique for minimizing the distortion artifacts ( aliasing) when representing a high-resolution image at a lower resolution. Anti-aliasing is used in digital photography, computer graph ...
References
{{reflist
Anti-aliasing algorithms