Fast approximate anti-aliasing (FXAA) is a
screen-space anti-aliasing Anti-aliasing may refer to any of a number of techniques to combat the problems of aliasing in a sampled signal such as a digital image or digital audio recording.
Specific topics in anti-aliasing include:
* Anti-aliasing filter, a filter used be ...
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
A creative work is a manifestation of creative effort including fine artwork (sculpture, paintings, drawing, sketching, performance art), dance, writing (literature), filmmaking, ...
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
In computing, computer performance is the amount of useful work accomplished by a computer system. Outside of specific contexts, computer performance is estimated in terms of accuracy, efficiency and speed of executing computer program instruction ...
. It achieves this by smoothing undesirable jagged edges ("
jaggies
"Jaggies" is the informal name for artifacts in raster images, most frequently from aliasing, which in turn is often caused by non-linear mixing effects producing high-frequency components, or missing or poor anti-aliasing filtering prior to samp ...
")
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 smal ...
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, an ...
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 between triangles, but also edges inside
alpha-blended textures, or those resulting from
pixel shader
In computer graphics, a shader is a computer program that calculates the appropriate levels of light, darkness, and color during the rendering of a 3D scene - a process known as ''shading''. Shaders have evolved to perform a variety of spec ...
effects, which are immune to the effects of
multisample anti-aliasing
Multisample anti-aliasing (MSAA) is a type of spatial anti-aliasing, a technique used in computer graphics to remove jaggies.
Definition
The term generally refers to a special case of supersampling. Initial implementations of full-scene anti-al ...
(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 mapping ...
are blurred, that FXAA must be applied ''before'' rendering the
HUD
Hud or HUD may refer to:
Entertainment
* ''Hud'' (1963 film), a 1963 film starring Paul Newman
* ''Hud'' (1986 film), a 1986 Norwegian film
* ''HUD'' (TV program), or ''Heads Up Daily'', a Canadian e-sports television program
Places
* Hud, Fa ...
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
Morphological antialiasing (MLAA) is a technique for minimizing the distortion artifacts known as aliasing when representing a high-resolution image at a lower resolution.
Contrary to multisample anti-aliasing (MSAA), which does not work for def ...
*
Multisample anti-aliasing
Multisample anti-aliasing (MSAA) is a type of spatial anti-aliasing, a technique used in computer graphics to remove jaggies.
Definition
The term generally refers to a special case of supersampling. Initial implementations of full-scene anti-al ...
*
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 t ...
*
Temporal anti-aliasing
Temporal anti-aliasing (TAA) is a spatial anti-aliasing technique for computer-generated video that combines information from past frames and the current frame to remove jaggies in the current frame. In TAA, each pixel is sampled once per frame but ...
*
Deep learning anti-aliasing
Deep learning anti-aliasing (DLAA) is a form of spatial anti-aliasing created by Nvidia. DLAA depends on and requires Tensor Cores available in Nvidia RTX cards.
DLAA is similar to deep learning super sampling (DLSS) in its anti-aliasing method, ...
*
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 graphics ...
References
{{reflist
Anti-aliasing algorithms