FXAA
   HOME

TheInfoList



OR:

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 b ...
algorithm created by Timothy Lottes at
Nvidia Nvidia Corporation ( ) is an American multinational corporation and technology company headquartered in Santa Clara, California, and incorporated in Delaware. Founded in 1993 by Jensen Huang (president and CEO), Chris Malachowsky, and Curti ...
. FXAA 3 is released under a
public domain The public domain (PD) consists of all the creative work to which no Exclusive exclusive intellectual property rights apply. Those rights may have expired, been forfeited, expressly Waiver, waived, or may be inapplicable. Because no one holds ...
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 are 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 sampling. Jaggies are stai ...
") as
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a Raster graphics, raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, p ...
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 a surface of an object (inanimate or living) in three dimensions via specialized software by manipulating edges, vertices, and ...
itself, as in conventional spatial anti-aliasing. Since it is not based on the actual
geometry Geometry (; ) is a branch of mathematics concerned with properties of space such as the distance, shape, size, and relative position of figures. Geometry is, along with arithmetic, one of the oldest branches of mathematics. A mathematician w ...
, 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 s ...
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. It is an optimization of supersampling, where only the necessary parts are sampled more. Jaggies are only noticed in ...
(MSAA). The downsides are that high contrast texture maps 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 Multisample anti-aliasing (MSAA) is a type of spatial anti-aliasing, a technique used in computer graphics to remove jaggies. It is an optimization of supersampling, where only the necessary parts are sampled more. Jaggies are only noticed in ...
*
Anisotropic filtering In 3D computer graphics, anisotropic filtering (AF) is a technique that improves the appearance of Texture filtering, textures, especially on surfaces viewed at sharp Viewing angle, angles. It helps make textures look sharper and more detailed ...
*
Temporal anti-aliasing Temporal anti-aliasing (TAA), also known as TXAA (a proprietary technology) or TMAA/TSSAA (''Temporal Super-Sampling Anti-Aliasing''), is a spatial anti-aliasing technique for computer-generated video that combines information from past frames and ...
* 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 graphics ...


References

{{reflist Anti-aliasing algorithms