Anisotropic filtration. Practical use of extensions: anisotropic filtering

Anisotropic filtering is one of such elements in the development of modern graphics, which makes many users talk about how accessible today various image enhancement technologies are for users.

After all, do not hide the fact that it is gamers who are so important today that the highest quality three-dimensional graphics are, and it is they who today are practically the only consumers of all kinds of new technologies in the field of video cards. After all, a high-power accelerator at the moment may be required only if you need to run some kind of game of the latest generation, in which there is a really demanding engine that operates with the most complex shaders of various versions.

What are the cards?

anisotropic filtration

To make some kind of overdeveloped engine in our time is a rather serious waste of money. And at the same time a significant risk. Such techniques are used only by high-budget projects with large-scale advertising, which in advance, even before the release, are confident that the game will be actively swept from the shelves. It should also be noted that recently, special attention has been paid to the “policy” regarding modern game engines, because in the gaming industry there is a long time ago a policy that prefers to take into account the interests of two leading companies in the field of graphics processors - these are NVIDIA and ATI.

The companies have long been competing with each other, and in fact there is no prospect that this confrontation will end in the near future, but this is only for consumers. Now it’s not enough just to develop a really high-quality engine, you also need to enlist the support of one of the manufacturers who even created their own affiliate programs for igrodelov.

And the graphics are growing and growing ...

anisotropic filtering in games

It is quite difficult to make an absolute revolution in the field of 3D graphic engines, as a result of which such upheavals are relatively rare. However, at the same time, of course, the image quality periodically improves over time and, strangely enough, this happens just in time for the release of a certain “for sale” game like Crysis.

It is on the basis of anisotropic filtering, as well as the so-called anti-aliasing, that a huge number of different drivers of video cards of each manufacturer are produced today, and each company uses its own approach and policy regarding this optimization, which often turns out to be fair not for all users.

What is anisotropic filtering?

trilinear filtering

Anisotropic filtering is a specialized way to improve textures on surfaces that are at a certain angle relative to the camera. In the same way as trilinear or bilinear, anisotropic allows you to completely eliminate aliasing on different surfaces, but at the same time introduces a minimum of blur, thereby preserving the extreme detail of the image.

It is worth noting the fact that anisotropic filtering in games is implemented through complex calculations, therefore, the provision of a relatively small "gluttony" of this setting in games began to be observed only since 2004.

In order to understand what anisotropic filtering is, you need to have some basic knowledge in this area. Of course, today every user perfectly understands that the image on the screen is made up of a huge number of different pixels, the number of which directly depends on the resolution. In order to display the image on the screen, the color of each pixel must be processed by the video card.

Operating principle

A specific texture is selected that matches the resolution across the viewing direction. After that, several texels are taken along the direction of view, after which their colors are averaged.

Since there can be more than one million pixels on the screen, and each texel is at least 32 bits, anisotropic filtering in games requires an incredibly high throughput of the video card, which many even the most modern devices do not provide. It is for this reason that such large memory requirements are reduced through the use of caching, as well as specialized texture compression technologies.

How it works?

three-dimensional graphics

Pixel color is determined by superimposing texture images on polygons consisting of two-dimensional image pixels - texels, which are superimposed on a 3D surface. The main dilemma in this case is which texels will determine the color of the pixel on the screen. In order to better understand the feature that is characterized by anisotropic filtering, you need to imagine that your screen is a large plate with a huge number of different holes, each of which is a pixel.

To determine the color of a pixel on any three-dimensional scene that is behind this plate, it is quite simple to look into the corresponding hole. Now imagine that a ray of light passes through it, after which it hits our polygon, and if it is parallel to the place of its entrance, then we get a round light spot. If not, then the spot will be somewhat distorted, that is, it will already have the shape of an ellipse. It is the polygons that are located in the light spot that will determine the color of each specific pixel.

Why is it needed?

anisotropic or trilinear filtering

Many people believe that anisotropic filtering is used solely to provide a better image, but in fact this is just the final result, which is provided far from only due to the filtering itself.

When creating an image of a certain texture, programmers set two levels of texture filtering, which are filters of minimum and maximum distance, which determine which filtering function will be used in the process of creating a texture image in case the camera moves away or approaches it.

For example, you can consider when anisotropic or trilinear filtering is used when approaching, that is, when each texel begins to have large dimensions, and already covers several pixels at the same time. In order to remove the gradation in this situation, filtering will be used. It should be noted that in this situation, this solution is far from optimal, since filtering (anisotropic or trilinear) slightly smears the image. In order to give a more realistic look to the picture, you will need to increase the resolution of the texture itself.

Which is better to choose?

anisotropic filtering which is better

Of course, any user and simple gamer has a logical question. Today there is trilinear and anisotropic filtering - which is better? Actually, of course, anisotropic technology is better. The thing is that trilinear filtering does not calculate the color of each individual texel very correctly, and more precisely, it does not calculate it correctly when it comes to inclined planes. The use of anisotropic technology allows you to complement the currently used filtering modes by adjusting the angle. Moreover, the larger the angle, the higher the realism and quality that anisotropic texture filtering can provide. However, at the same time, it must be understood that a greater amount of card power is required for data processing.

How does this help?

You should not expect that in the end, after enabling this function, the three-dimensional graphics will improve fabulously, rather, at certain large angles, some blur will even be obtained, but in general you will get a more realistic picture. In this regard, each for himself independently decides whether he should use this function and how productive it will be for him.

Since this function does not provide a very strong improvement in picture quality, those people who are trying to ensure maximum game performance on less powerful computers are looking for how to turn off anisotropic filtering. The exactingness of this function is a little disproportionate in comparison with what result it provides, so you should think about disabling it in the first place.

Point sampling

how to disable anisotropic filtering

Point Sampling is by far the easiest way to determine the color of a pixel. This algorithm is based on a texture image when a single texel is selected that is located as close to the center of the light spot as possible. It is easy to guess that this option is far from the most optimal, since the color of the pixel must be determined simultaneously by several texels, and only one is selected in this case, while the light spot can change its shape, which the algorithm does not take into account.

The main drawback that this anisotropic filtering differs in is that with a sufficiently close proximity to the screen, the number of pixels will increase significantly compared to the number of texels, as a result of which the image becomes far less interesting. Many often observe the so-called blocking effect in "ancient" computer games.

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


All Articles