FXAA - what is it? Smoothing method. Smoothing in games

The time has already passed when the games impressed exclusively with their gameplay: the player has long ago become demanding and, in particular, demanding on the quality of the picture displayed on the screen. However, few people know that to ensure a high degree of quality today, many game developers use FXAA anti-aliasing. What it is - today, far from all gamers know, so many people wonder whether it is worth turning this feature on.

The overwhelming majority of players are well aware of what are the so-called ladders at the edges of objects, as well as how to solve this problem by using “anti-aliansing” or simply “smoothing”.

What is anti-aliasing?

fxaa what is it

Smoothing is a good phenomenon, since the perception of a picture increases significantly, and in modern realities those games in which it is not used, in the end, most often turn out to be booed. At the same time, the way how FXAA smoothing is implemented remains unsatisfactory. What it is, many users may not even be interested, but in fact it is the implementation that affects the quality of the final image.

Poor implementation often causes the target equipment to have insufficient processing power. Of course, those people who prefer to play on a PC find themselves in favorable conditions, since in this case the power of the equipment directly depends on the material capabilities of its owner, however, console players are most often content with the gameplay, since the quality of the graphics in most cases on computers is much better than what kind of graphics console games have. However, each person independently chooses where and on what to play.

What is FXAA?

fxaa smoothing

Immediately it is worth noting that for a long time already igrodelov used FXAA smoothing technology. They didn’t know what it was then, but its first use was found in the MMO Age of Conan, as well as in the worldwide famous FEAR shooter. In these games, however, only the initial version of this anti-aliasing was used, which at that time was not the best productive solution.

Nowadays, games use a slightly different format FXAA. What it is? It stands for Fast approximate Anti-Aliasing, which is a more effective solution compared to traditional MSAA technology. This is a single-pass pixel shader, with which the resulting frame is calculated at the post-processing stage. This shader was created as a faster solution, which is less memory intensive in comparison with the above, but the technology pays for its advantages with accuracy and quality. Seeing this, many may find that the technology is irrelevant. In fact this is not true.

What are the advantages of this method?

exponential smoothing method

FXAA anti-aliasing offers a host of benefits, including improved anti-aliasing for so-called subpixels and speculars. In an official document, the developer of this technology Timothy Lotts says that his product with medium quality settings performs post-processing of frames with a resolution of 1920 × 1200 based on the GTX 480 with a speed of less than one millisecond.

The main advantages that FXAA anti-aliasing has is that it uses the sub-pixel anti-aliasing algorithm that works more efficiently than the MLAA algorithm, which is quite sufficient for equipment that works at DirectX9 level. That is, in this case, post-processing in one pass is carried out, and the most interesting is complete independence from which GPU Compute API is used. However, there is one drawback - developers must necessarily integrate this technology into various games. At the same time, traditional anti-aliasing technologies work or, conversely, cannot work at the driver level. Thus, while programmers will use the exponential smoothing method in their engines and at the same time will not use the FXAA code in their engines, it will not be possible to achieve the desired effect, since it was not possible to include the code from the outside until recently.

How was the problem solved?

fxaa tool

Over time, it was decided to initially enter the FXAA code into the d3d.dl library, as a result of which it became possible to flexibly configure the result through various configuration files, as well as enable or disable FXAA using the [Pause] button. This set of files is initially copied to the directory where the executable file of the DX9 application is present, and this application, at startup, will pick up the library in which the necessary code is present. At the same time, since the developer of the technology for introducing this code into the library initially made sure that the work results were placed in the log, users actively began to identify bugs in the work of this technology, which were quickly fixed. Over time, there have also been “injections" with code for DirectX 10 and 11 formats.

How to check?

what is fxaa in games

The most obvious way to determine the effect of using exponential smoothing and FXAA is in World of Tanks.

If FXAA anti-aliasing is not used, explicit “escalators” begin to appear, and despite the fact that tank models can be quite large and also differ in decent detailing, artifacts are very noticeable, and especially with regard to various thin objects. The built-in anti-aliasing technology tries to blur the edges of objects in some way, but does it rather mediocre, not to mention the fact that in some places the picture can be blurred.

What are the changes?

smoothing method

After the FXAA tool is turned on, the result is obvious: the artifacts completely disappear, but there is some blurriness of the picture. In addition to this, there is also a unique FXAA Sharpen option. The technology developer in one version added a sharpening filter, which was taken from MPC-HC, while the final result was quite decent: the blurriness completely disappears, the textures get an even sharper look compared to the original, and the “stairs”, despite using this filter, almost completely absent. Now you know what FXAA is in games like World of Tanks. Due to the fact that the authors did not initially plan such sharpness of the texture, it could “knock out” the towers a little, but in the game process this is almost invisible.

Performance here is practically not decreasing. Of course, the World of Tanks engine works in a somewhat surprising way, so surges or, conversely, performance drops can ultimately come out of thin air.

NoAA, SMAA or FXAA

smaa or fxaa

If we compare the modes “noAA” or SMAA and “FXAA Sharpen”, the picture significantly changes for the better in the latter case. The only exception here is the sharpness filter used, which excessively thin lines narrows even more, in particular, this is especially noticeable in the mounted sight of artillery. At the same time, the number of frames per second in the FXAA version significantly exceeds the previous version.

During the lengthy tests, it was determined that when using FXAA, performance drops by about 10-12%, while if the smoothing method MSAA 4x is used, the quality of which today competes with FXAA technology, a drop in performance is manifested at all 50% or more.

Update

In 2011, there was also a customizable version of the injection, which included all of the above FXAA options and their advantages. In this assembly there were a fairly large number of filters, among which it is worth highlighting:

  • Blur
  • Vignetting.
  • Color saturation.
  • Sepia.
  • And many others.

All this is quite simple to configure through one file, and the most useful in this case: the settings can be easily changed even during the game, you just need to minimize the application, open the settings editor, expand the application and enjoy the new settings without having to restart the application you are interested in. Thus, it was possible to completely eliminate the fading of subsequently activating the sharpening filter, providing a clearer picture in which there are no blur ladders and high quality textures were achieved.

Source: https://habr.com/ru/post/C13986/


All Articles