FXAA
- Last UpdatedApr 07, 2023
- 2 minute read
Fast Approximate Anti-Aliasing (FXAA)
The algorithm
This is a 2D post-process algorithm by NVidia. From the source image, it produces an anti-aliased image using an edge-detection algorithm.
Advantages and disadvantages
The main advantages are:
-
It uses less memory with respect to MSAA.
-
It anti-aliases everything, not just polygons edges.
The main disadvantages are:
-
It blurs the source image a little.
-
It cannot fix aliasing problems inherent to the source image.
How to enable
FXAA is enabled from the config file: antialias à fxaa à enable.
Requirements
FXAA can be used when one of the following render pipelines are enabled:
-
Default
-
DOF HDR B
Parameters
You can set the parameters manually. You can also let the Engine set the parameters through the parameter preset .
quality
Choose the quality preset.
-
10 to 15 - default medium dither (10=fastest, 15=highest quality)
-
20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
-
39 - no dither, very expensive
-
The lowest digit is directly related to performance.
-
The highest digit is directly related to style.
subpix
Choose the amount of sub-pixel aliasing removal. This can effect sharpness.
-
1.00 - upper limit (softer)
-
0.75 - default amount of filtering
-
0.50 - lower limit (sharper, less sub-pixel aliasing removal)
-
0.25 - almost off
-
0.00 - completely off
edgeThreshold
The minimum amount of local contrast required to apply algorithm.
-
0.333 - too little (faster)
-
0.250 - low quality
-
0.166 - default
-
0.125 - high quality
-
0.063 - overkill (slower)
edgeThresholdMin
Trims the algorithm from processing darks.
-
0.0833 - upper limit (default, the start of visible unfiltered edges)
-
0.0625 - high quality (faster)
-
0.0312 - visible limit (slower)
-
preset must be set to none.
FXAA + DOF HDR B
The FXAA applies to the final scene before the HDR pass. Items such as fluids, refractions, shadows are anti-aliased.
Add an FXAA Post Process Effect to have the final scene completely anti-aliased with FXAA.
You can enable both MSAA and FXAA.