Today's Hard|Forum Post
Today's Hard|Forum Post

NVIDIA's New FXAA Antialiasing Technology

NVIDIA's FXAA technology debuted in Age of Conan, and was recently found in Day 1 Studio's F.3.A.R. We'll look into FXAA and tell you what it is, what it does, and what gamers can expect out of it. We were surprised by the results, and we think you will be too. Will it be methods like this that replace traditional AA? We certainly hope so.

continued...

FXAA Performance

FXAA is clearly fast. On every video card we tested, FXAA 1 was faster in F.3.A.R. than traditional 2X MSAA, and 4X MSAA. With the GeForce GTX 580 at 2560x1600, FXAA was 13.3% faster than 2X AA and 52.8% faster than 4X AA. At 1920x1200, the GTX 570 was 24.8% faster with FXAA than 2X AA, and 51.6% faster with FXAA than 4X AA. With the GTX 560 Ti running F.3.A.R. at 1680x1050, FXAA was 23% faster than 2X AA and 50% faster than 4X AA.

The Radeon HD 6970 was 14.7% faster using FXAA at 2560x1600 than 2X AA, and 50.9% faster than 4X AA. At 1920x1200, FXAA performed about 16.1% faster than 2X AA with the HD 6950, and about 42% faster than 4X AA. Finally, the AMD Radeon HD 6870 gave us framerates that were on average approximately 15.8% faster with FXAA than with 2X AA, and 37.8% faster with FXAA than with 4X AA.

FXAA Image Quality

Compared to 2X AA, FXAA is uniformly superior. Compared to 4X AA, there are some I Q trade-offs, but the performance advantage that FXAA offers gives FXAA the advantage. In some areas, 4X AA offered slightly superior image quality, and in other areas FXAA is better.

Even though 4X AA offers slightly better hard edge aliasing reduction than FXAA, we still think FXAA is a better option in most circumstances. For starters, shader aliasing is reduced by FXAA but not MSAA. Alpha texture aliasing is reduced by FSAA, but not MSAA. Single-pixel aliasing is also reduced, as is sub-pixel aliasing. The flickering of very small objects or surfaces can be a big problem, and FXAA deals with it admirably while MSAA does not handle it at all.

FXAA vs. MLAA

FXAA is NVIDIA's response to MLAA, and we have seen it to be very similar in terms of image quality, but much faster. MLAA was an average of 37.1% slower than FXAA without offering any improvement in image quality. In fact, when processing transparent foliage textures, FXAA produced a smoother image than MLAA. Aside from performance, there are pros and cons to each solution. A brief list, according to what we've witnessed in F.3.A.R., follows:

NVIDIA FXAA:

Pros:

- Compatible with AMD and NVIDIA GPUs

- Small performance hit (compared to MSAA and MLAA).

- Image quality comparable to 4X MSAA and MLAA.

- Highly customizable for balancing performance and image quality.

- Can reduce aliasing on edges, textures, and shaders.

Cons:

- Requires game developer implementation

AMD MLAA:

Pros:

- Does not require game developer implementation, implemented in driver in any game.

- Compatible with every game and game engine, regardless of API (D3D or OpenGL).

- Can reduce aliasing on edges, textures, and shaders.

Cons:

- Only compatible with AMD GPUs.

- Large performance hit.

- Not as effective with single-pixel objects.

Given our way, we would like to see FXAA implemented as an NVIDIA Control Panel option so that games without in-built FXAA support can benefit from this technology. The nature of the way FXAA was conceived may prevent that from being possible, though. It would also be grand if game developers implementing this feature gave us gamers some degree of control over the parameters of whatever version of FXAA is utilized.


Brent's Thoughts

I wanted to chime in here, because I think FXAA, and other similar methods, including MLAA, are the future of antialiasing on the PC. Multisample Antialiasing has suited gamers well for the last decade and a half. There have been improvements in each new GPU architecture that keep making MSAA faster, and less of a memory bandwidth hog. However, it can only be taken so far, and MSAA has some major drawbacks. Traditional MSAA only reduces aliasing on polygon edges, i.e. the edges of geometric game objects. It also cannot reduce aliasing on alpha textures, and it cannot reduce aliasing associated with specular shader programs.

As games have become more shader based, we've seen specular shader aliasing start to be a problem. About 7 years ago, when the original Far Cry was released, was when we were brought into the world of shader programs being used heavily in a game. We can point you to evaluations years ago, where we have screenshots that clearly display how evident shader aliasing can be. If you look at this screenshot you will see specular shader aliasing on the corners of this object. Now, this was primitive vertex shading, but still quite evident, MSAA can't cure this. This screenshot shows very clearly how bad specular shader aliasing can be, all over the walls, and the floor. These are but a couple of examples, but it is things like this that traditional MSAA can't help you with, while methods like FXAA and MLAA can.

There have been several new techniques to try and overcome MSAA's failings, such as AMD's Adaptive Multisampling and Supersampling, and NVIDIA's Transparency Supersampling. Also NVIDIA's CSAA and AMD's new Custom Filtering and EQAA modes. These methods do work, but they require a lot of work and are huge memory drains, and in essence still based on multi-sampling. Supersampling takes a tremendous amount of memory bandwidth. Something new was needed, and so AMD came up with Morphological AA, which we looked at here. MLAA was a step in the right direction because it fixed all the problems of MSAA, except for one. MLAA improves polygon edge aliasing, alpha texture aliasing, and specular aliasing. However, it costs a tremendous amount of GPU processing power as well as VRAM capacity as we've found out. MLAA is on the right track though, but we feel NVIDIA has one upped MLAA and improved upon the ever important performance hurdle.

FXAA improves polygon aliasing, alpha texture aliasing, and specular aliasing, while maintaining performance that is FASTER than the performance cost of 2X AA! It is amazing, and it completely trumps MLAA. As we've noted in the above pro's and con's, FXAA gives you similar quality to MLAA, at useable performance, and works on NVIDIA and AMD GPUs. The only caveat, the game developer must implement it in the game. If the game doesn't have it, the game doesn't have it. With MLAA, you can at least force it on in every game, but only on AMD GPUs.

I hope it is post-processing shader methods like FXAA and MLAA that are used more and more in the future, eventually replacing traditional MSAA. Yes, you read that correctly, I want shader based aliasing programs like these to replace traditional AA, it is the only logical answer to the antialiasing problem. We need a revolution in AA, we need something that can reduce aliasing in every aspect of the game, with a minimal performance hit, and right now, FXAA is the best option. MLAA started the trend, and FXAA continues it. I long for the day that traditional AA goes away and is replaced by shader programs that use the shader power today's GPUs have and provide superior IQ and a reduced performance and memory impact. Instead of having to worry about 2X AA, and 4X AA and whatnot, I just want to turn on "AA" and be done with it. Right now, F.3.A.R. allows this, and we will use FXAA as an alternative to 2X and 4X AA.


The Bottom Line

In F.3.A.R., FXAA performs extremely well and reduces aliasing as well as or better than 4X AA in most cases. It's not perfect, but it is effective and inexpensive in terms of GPU time. In this particular title, we are grateful for the enhanced image quality and outstanding performance that FXAA offered us on all levels of video cards that we tested. We are extremely happy to see FXAA working on AMD and NVIDIA GPUs. We hope that NVIDIA can spread FXAA to more game developers and that those developers will make use of FXAA's more advances sub-pixel contrast reduction features.

This is a feature that has mostly flown in under the radar, and we think NVIDIA should have been more vocal about it. It is a great step forward for anti-aliasing technology, which has remained largely stagnant on the NVIDIA side of the pond since the introduction of CSAA with the GeForce 8800 series in late 2006. FXAA is a fast and effective tool, and we are excited to see how much better NVIDIA can make it going forward.

Big kudos to NVIDIA, for making Anti-Aliasing interesting again.

Discussion