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 affected by FXAA. The high pass filter that excludes low contrast pixels can be tuned to balance speed and quality.
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 horizontal or vertical edge ends in order to take into account the actual edge's direction. 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 as pixels, according to how they appear on-screen, rather than analyzing the 3D model itself, as in conventional spatial anti-aliasing. Since it is not based on the actual geometry, it will smooth not only edges 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. The downsides are that high contrast texture maps are blurred; FXAA must be applied before rendering the HUD elements of a game lest it affect them too; and that polygonal details that are smaller than one pixel that would have been captured and rendered by MSAA and SSAA will not be captured and rendered by FXAA alone.