More stress on GPU, AA or AF?

Anti-Aliasing puts the most stress on the GPU. Anisotropic Filtering has little impact on performance from 2xAF to 16xAF unless the view distance in-game is great. The biggest performance with AF is experienced at 2xAF and the next biggest is at 4xAF. There is hardly any performance difference between 8xAF and 16xAF.
 
burningrave101 said:
Anti-Aliasing puts the most stress on the GPU. Anisotropic Filtering has little impact on performance from 2xAF to 16xAF unless the view distance in-game is great. The biggest performance with AF is experienced at 2xAF and the next biggest is at 4xAF. There is hardly any performance difference between 8xAF and 16xAF.

The performance has little to do with the view distance, and everything to do with the anisotropy level... Or in simpler terms... how 'un-square' texels are on screen. So basically it's about the amount of stretching. An anisotropic filter takes taps along the dominant axis of stretching, to make sure the texture remains sharp, rather than get over-blurred, like with a standard trilinear filter, which only takes taps from the 2x2 block of nearest texels in the texture. Since anisotropic filtering is done in a smart way, the card only takes as many taps as required, to get a sharp texture sample. The 2x-16x settings merely control the maximum nr of taps the hardware is allowed to do. If you have a scene where the textures are mostly 'isotropic' (eg facing a wall straight-on), two samples could be enough, so whether you set 2x or 16x, you won't notice any difference, neither in performance nor in image quality.
Ofcourse if you have a scene where the textures are very 'anisotropic' (eg a wall nearly parallel to your viewing direction), then you'll notice a huge difference between 2x or 16x, both in performance and quality.
But in most cases, surfaces that require a high degree of anisotropic filtering are also very 'small' in terms of on-screen surface, so there are not that many pixels that require heavy filtering.
So to cut a long story short, on modern cards (Radeon 9500 or better, or GeForce FX or better), anisotropic filtering is quite cheap, and usually you can get away with setting 16xAF without a very noticeable performance hit.

AA is another story however... With modern cards (again Radeon 9500/GeForce FX and up), AA is performed via the multisampling technique.
This means that the z/stencil buffer is at a higher resolution (supersampled), to calculate coverage. But the shading is only performed once for every onscreen pixel in a polygon.
This means that if you have a game with heavy shaders, but only modest use of z/stencil, AA will be very cheap, since there are little or no extra pixels shaded (only at polygons edges, where the edge doesn't cover an onscreen pixel completely). Half-Life 2 is a good example of such a game. Most older games will also be cheap with AA.
However, if you have a game that uses z/stencil a lot, then you will experience a very large hit, because everything has to be done at the higher resolution... Setting 4xAA will mean it has to stencil 4 times as many pixels, which costs 4 times the fillrate.
Doom3 is a good example of such a game (its shadowing algorithm makes heavy use of the stencilbuffer, you will notice the biggest performance differences between AA and no AA in situations where there are many shadows on screen).

So it's very much dependent on the situation... Sometimes you can turn AA up to 4x or even 6x with little or no loss in performance, in other cases performance may drop by about the same factor as you set the AA to.
 
Wow, I'm gonna have to save this post just so I can refer people to it instead of trying to explain it to my friends. Compared to this, my attempts basically boil down to baby talk

goo goo...
:D

 
Tomshardware said:
The filtering method that achieves the best results today is anisotropic filtering. As the name suggests, the texels are not gleaned from a symmetrical shape, but rather by using an irregular pattern adjusted to the perspective (anisotropic shape). The form of this shape is not standardized - usually, however, rectangular or trapezoidal patterns or parallelograms are used, the shapes of which depend on the angle of the surface.

The number of texels taken into account for filtering determines the filter level. With 1x, anisotropic filtering offers eight texels. With current graphics cards the filter level can be set in the driver. The maximum value is 16x, but manufacturers do not use all interim steps. The most common are: 2x (16 texels), 4x (32 texels), 8x (64 texels) and 16x (128 texels). As the filtering increases, the computing time increases accordingly, to a considerable degree.

Anisotropic filtering always functions in interaction with bilinear or trilinear filtering. The bilinear variation is logically faster but has one disadvantage: the visible edge on the mipmap transitions. The best result is achieved with the more computing-intensive trilinear anisotropic filtering, in which mipmap transitions are calculated from the neighboring textures.

http://graphics.tomshardware.com/graphic/20040603/ati_optimized-04.html

And view distance does play a role in AF performance because as you increase the view distance you increase the area where AF has to be applied. This is why there is more of an AF performance hit in games like Far Cry where you have much greater view distances. The anisotropy level just compacts the performance hit based on the view distance.
 
wanna see the hits in real time? play Riddick @ diff. settings with a rez higher than 1280x1024 ;)
 
burningrave101 said:
And view distance does play a role in AF performance because as you increase the view distance you increase the area where AF has to be applied. This is why there is more of an AF performance hit in games like Far Cry where you have much greater view distances. The anisotropy level just compacts the performance hit based on the view distance.

I'm sorry, but that's just wrong. Take my 'facing a wall straight on' example. No matter at what distance you view that wall, it will always have the same level of anisotropy. This goes for a surface of any orientation ofcourse, but that may be less intuitive (well, perspective distortion may have a bit of influence, but nothing big).
The area you speak of is handled by mipmapping, which has nothing to do with anisotropic filtering. Anisotropic filtering can only be used as a minification or magnification filter (actually, most cards only support minification, there's little use for magnification).

The extra hit in AF on great view distances could simply be because there are more surfaces in view (more overdraw), which gives the same relative performance hit, regardless of filtering method.
 
Scali said:
I'm sorry, but that's just wrong. Take my 'facing a wall straight on' example. No matter at what distance you view that wall, it will always have the same level of anisotropy. This goes for a surface of any orientation ofcourse, but that may be less intuitive (well, perspective distortion may have a bit of influence, but nothing big).
The area you speak of is handled by mipmapping, which has nothing to do with anisotropic filtering. Anisotropic filtering can only be used as a minification or magnification filter (actually, most cards only support minification, there's little use for magnification).

The extra hit in AF on great view distances could simply be because there are more surfaces in view (more overdraw), which gives the same relative performance hit, regardless of filtering method.

Bilinear Texture Filtering: Bilinear filtering is a computationally cheap but low quality texture filtering. It approximates the gaps between textures by sampling the color of the four closest (above, below, left and right) texels. All modern 3D accelerated video cards can do bilinear filtering in hardware with no performance hit.

Trilinear Texture Filtering: Trilinear filtering is a high quality bilinear filter which uses the four closest pixels in the second most suitable mip map to produce smoother transitions between mip map levels. Trilinear filtering samples eight pixels and interpolates these before rendering, twice as much as bi-linear does. Trilinear filtering always uses mip mapping. Trilinear filtering eliminates the banding effect that appears between adjacent MIP map levels. Most modern 3D accelerated video cards can do trilinear filtering in hardware with no performance hit. Anisotropic filtering is a different story.

Anisotropic Filtering: Anisotropic filtering is the best but most CPU intensive of the three common texture filtering methods. Trilinear filtering is capable of producing fine visuals, but it only samples from a square area which in some cases is not the ideal way. Anisotropic (meaning `from any direction') samples from more than 8 pixels. The number of sampled pixels and which sampled pixels it uses depends on the viewing angle of the surface relative to your screen. It shines when viewing alphanumeric characters at an angle

Mip Mapping: Mip mapping is a technique where several scaled copies of the same texture are stored in the video card memory to represent the texture at different distances. When the texture is far away a smaller version of the texture (mip map) is used. When the texture is near, a bigger one is used. Mip mapping can be used regardless of filtering method (see below). Mip mapping reduces memory bandwidth requirements since the images are in hardware, but it also offers better quality in the rendered image

Brilinear: Net Slang, This is a method where you use less than trilinear filtering, But more than bilinear filtering, Ideally this causes the GPU to do less work while still providing trilinear Quality

Keeping it Simple: Mipmaps join textures together. The Purpose of Bilinear/Trilinear filtering is to help join these mipmaps together. Trilinear filtering will generally hide these transitions better than Bilinear. When seeing these mip map transistions in motion. You will see rolling textures, also known as "Shimmering". To reduce the amount of texture shimmering trilinear filtering is reccomended. Take note of how the transistion will seem much softer with trilinear enabled. All Shots were taken with 4x Anti Aliasing enabled and 1024x768 resolution.

http://www.nvnews.net/vbulletin/showthread.php?t=31535&highlight=anisotropic+filtering

So, what is anisotropic filtering and what do we need it for?
Here is an elementary example. Imagine a railway running far to the skyline. More distant cross-ties get smaller and smaller and finally become simply a blur. As for the rails, they are clearly seen at a distance, because they coincide with the eyesight direction, unlike the cross-ties, being perpendicular to it. If the images were built in the same manner as the graphics cards do it, not according to the optics laws, at a certain distance the rails and cross-ties would've become indefinable for the eyesight.

For a 3D image of higher quality, we have to observe the optics laws. A method of texture filtering where the optics is taken into consideration is known as anisotropic filtering.

Anisotropic filtering considers the optic angle (the angle at which you look at an object surface), so the textures right in front of you get "smeared" along the object surface much more than in any other direction. To calculate a pixel color in bilinear filtering mode, for instance, the colors of four texels are used (or four "texture pixels" closest to the spot on the object surface, to which the pixel center is projected). In case of anisotropic filtering, ideally, the colors of all the texture samples falling into the pixel projection to the object should be taken into consideration. The number of these samples can be infinitely great if the angle between the object surface and the direction of your eyesight is very small. Today's accelerators are unable to do all these calculations fast enough, so the developers resort to simplifications, approximations and optimizations of all kinds. However, even these methods provide graphics of notably higher quality.

In Unreal Tournament anisotropic filtering is obviously enabled at greater distances than in Quake3 Arena. It implies that the optic angles and the distances at which anisotropic filtering of different levels is enabled depend on the particular application running. As a result, the performance losses caused by anisotropic filtering won't be the same for different applications.

http://www.xbitlabs.com/articles/video/display/gf3-anis-filtering.html

Anisotropic means non-uniform shape and is a filtering technique that works on non-uniform, or uneven, shaped areas. In reality, when the viewpoint is such that a surface is seen square on, the surface is elliptical in shape. Anisotropic texture filtering calculates the shape of this ellipse and maps it onto the required texture.

When used in conjunction with trilinear filtering, anisotropic filtering utilizes an additional average of 8, 16, or 32 texel samples within the ellipse to determine the color to be mapped to the target surface. As the dimensions of the ellipse can have any ratio between its height and width in addition to the angle viewed, the arrangement of the texels to be sampled can only be calculated at runtime.

http://www.nvnews.net/previews/geforce3/anisotropic.shtml

Filtering
Similar to anti-aliasing, filtering is used to blend textures to reduce blockiness and pixilation and to smooth transitions between textures as they move nearer to, or farther from, the point of view (MIP mapping).

Three types of filtering can be used: bilinear, trilinear, and anisotropic. Bilinear filtering blends flat textures from a two-dimensional point of view. Trilinear filtering adds a z value, which helps smooth the transition between MIP maps. MIP mapping involves using less-detailed textures as an object gets farther from the viewpoint, similar to what the human eye does when viewing distances. Anisotropic filtering can be used with bilinear or trilinear filtering, and it increases the filtering precision by using a wider range of texels (textured pixels).

Both ATI and Nvidia allow you to force anisotropic filtering through their driver interfaces. ATI’s driver interface allows you to set the level of anisotropic filtering from 2X to 16X, while Nvidia’s GeForce 4 and earlier chipset’s drivers allow you to force anisotropic filtering only from 2X to 8X. We have yet to see the GeForce FX or its driver interface.

http://www.devhardware.com/c/a/Video-Cards/The-Graphics-Card/4/

I just dont see how you can say that view distance doesn't play a role in the performance hit from AF considering the fact that when you increase the view distance you increase the number of textures to be filtered. The same thing happens when you increase the resolution with AF enabled.
 
burningrave101 said:
I just dont see how you can say that view distance doesn't play a role in the performance hit from AF considering the fact that when you increase the view distance you increase the number of textures to be filtered. The same thing happens when you increase the resolution with AF enabled.

Why did you bother to paste all these quotes? Apart from the Unreal one, none of them spoke of distance... And in the case of Unreal, it seems that they speak of the LOD bias and/or the maximum texture size... changing the bias or maximum texture resolution will affect when and where you will start to use minification, and therefore anisotropic filtering (as I said before, magnification is generally still done with bilinear rather than anisotropic, because anisotropic filtering really only has meaning for minification).

I'm not sure what you mean by 'view distance' anyway. At first it seemed that you meant that a polygon at a greater distance would give a larger performance hit with AF than a polygon at a small distance.
But now it seems you mean the maximum view distance of a game... But doesn't a larger distance always decrease performance, regardless of texture filtering mode, because of the simple fact that there is more to render? Or what do you mean? Please clarify yourself, these quotes didn't help much.
Also, the same goes for resolution. Obviously that will always decrease performance, regardless of the filtering method. That's not the point though, I thought we were considering the impact of turning on AA and AF, while leaving all other options the same. Else the comparison would be rather useless.
 
Scali said:
Why did you bother to paste all these quotes?

Well most of them were just to further explain what anisotropic filtering is and how it works for the benefit of other users. It was just building up to my point about the increased view distance.

Scali said:
I'm not sure what you mean by 'view distance' anyway. At first it seemed that you meant that a polygon at a greater distance would give a larger performance hit with AF than a polygon at a small distance.

Thats not what i meant.

Scali said:
But now it seems you mean the maximum view distance of a game... But doesn't a larger distance always decrease performance, regardless of texture filtering mode, because of the simple fact that there is more to render? Or what do you mean? Please clarify yourself, these quotes didn't help much.
Also, the same goes for resolution. Obviously that will always decrease performance, regardless of the filtering method. That's not the point though, I thought we were considering the impact of turning on AA and AF, while leaving all other options the same. Else the comparison would be rather useless.

This is what i'm talking about. I'm saying that the performance hit from AF increases as the view distance and resolution increases because of the increased number of textures to be filtered. Both of these factors will always decrease the performance as you said but its not regardless of the filtering method as to how much.

This is easily proven by comparing the performance loss at lower resolutions vs the performance loss at higher resolutions both with AF enabled and disabled and looking at the percentages.

This is why you see ATI's higher-end cards pull ahead of nVidia's at high resolutions with AF enabled in alot of games. Its not because of the resolution ither. You'll notice how the 6800 Ultra is almost always ahead of the X800XT regardless of the resolution when AF is not enabled. The performance loss from AF enabled at higher resolutions is greater on the NV40's then it is on the R400's because of ATI using more adaptive algorithms and better optimizations to improve performance.

My point is that for the most part 2xAF and 4xAF is where the biggest performance hit is when enabling AF and the performance hit from 8xAF and 16xAF is less. My point is also that the performance hit from AF will normally increase linearly with the view distance and resolution.

At least this is what i've gathered from benchmarks and my understanding of how AF works. If you've got any information you can link me to that shows view distance and resolution doesn't have an impact on AF performance then please show me.
 
burningrave101 said:
This is what i'm talking about. I'm saying that the performance hit from AF increases as the view distance and resolution increases because of the increased number of textures to be filtered. Both of these factors will always decrease the performance as you said but its not regardless of the filtering method as to how much.

Not in the absolute sense no, but in the relative sense, yes.
But I think anyone could have figured that out for themselves after having read the specifics of how anisotropic filtering works.

This is why you see ATI's higher-end cards pull ahead of nVidia's at high resolutions with AF enabled in alot of games. Its not because of the resolution ither. You'll notice how the 6800 Ultra is almost always ahead of the X800XT regardless of the resolution when AF is not enabled. The performance loss from AF enabled at higher resolutions is greater on the NV40's then it is on the R400's because of ATI using more adaptive algorithms and better optimizations to improve performance.

Well yes, that's just a simple result of the fact that the ATi has more efficient texture filtering. By increasing the resolution, you increase the nr of texels to be filtered, so the speed of the texturefilter will get a larger impact on the total performance. Which allows ATi to pull away from NVIDIA.
But I thought you were saying something like: "anisotropic filtering gets slower when you increase the resolution or viewing distance". That is not the case. The speed of the anisotropic filter depends solely on the amount of taps required to get a sample. Which is only related to the viewing angle, not the resolution or the viewing distance.
What you should be saying is something like: "the effect of a texture filter on performance will increase as the number of texture fetches increases". But that goes for any filter ofcourse, not just anisotropic filtering, which I tried to say in my previous post.

My point is that for the most part 2xAF and 4xAF is where the biggest performance hit is when enabling AF and the performance hit from 8xAF and 16xAF is less.

This is true, which as I explained before is a result of the 'smart' filtering, which doesn't take more taps than necessary, so if you set the maximum to 8xAF or 16xAF, it will probably still sample most texels with 4xAF or less.

My point is also that the performance hit from AF will normally increase linearly with the view distance and resolution.

Yes, this is true, but this goes for any texture filter... The same goes for bilinear vs trilinear, for example.
It's because you are redistributing the workload of the application... On a higher resolution, you will render the same amount of polygons, but more pixels, so the per-pixel operations will get a larger impact on the total performance... And texture filtering happens to be a per-pixel operation.
With increasing the view distance, you increase both the number of polygons and pixels to be rendered, so it could go either way.
So what you're saying is true, but it's not directly related to anisotropic filtering itself, but just a result of getting a different balance of per-vertex vs per-pixel operations. So it's not directly related to what we were originally discussing, which is why I misunderstood what you were trying to say. I was thinking of the anisotropic filtering operation itself, which doesn't change with resolution or view distance. But the amount of texture filtering done per frame does increase.
 
Back
Top