15dice
12-23-2006, 01:08 PM
I asked this at another site, but since the DM wiki is the source of my confusion, I figured I'd ask here. :)
My favorite explanation of AF is here (http://www.devmaster.net/wiki/Anisotropic_filtering) on Devmaster:
How mipmapping works
When we render a square, say 256x256 pixels, and we use a square texture of the same size, it will look splendid. But if we tilt that square backward, it becomes more like a rectangle, being more wide than heigh. Let's say its dimensions are 256x32, roughly. This means that the texture that we map onto it is compressed 8 times in the vertical direction. In other words, we would skip 7 out of every 8 lines. All that information is lost. It also causes flickering, aliasing, because when you shift the tilted square up and down, other horizontal lines will become visible and others dissapear. To avoid the flickering, mipmapping uses a 32x32 version of the texture, where blocks of 8x8 pixels of the original texture are nicely averaged together. This is also a loss of information, but it stops the flicker. This is what is done with regular mip-mapping. The biggest disadvantage is that we now have 32 pixels horizontally in the texture, mapped onto 256 pixels on the screen. So we're stretching it out, making it look blurry.
How anisotropic filtering works
What we really wanted is to average 1x8 pixels together, so we'd get a 256x32 texture. But that doesn't work when we start rotating the square. And it also requires a lot of extra memory. The alternative, is to sample the texture 8 times per pixel, in the direction in which the polygon is tilted. That's anisotropic filtering. It doesn't matter how the square is rotated, it can take 8 samples in the texture in any direction required, and average them together. It's called anisotropic because the degree of filtering in one direction (the direction in which the polygon is tilted) is greater than the degree of filtering in the direction perpendicular to that.
My confusion is the italicized/bolded part of the quote above.
(1) Are those eight samples weighted averages?
(2) Are those resulting values then weighted-averaged (i.e. bilinearly filtered) to produce the final color?
My favorite explanation of AF is here (http://www.devmaster.net/wiki/Anisotropic_filtering) on Devmaster:
How mipmapping works
When we render a square, say 256x256 pixels, and we use a square texture of the same size, it will look splendid. But if we tilt that square backward, it becomes more like a rectangle, being more wide than heigh. Let's say its dimensions are 256x32, roughly. This means that the texture that we map onto it is compressed 8 times in the vertical direction. In other words, we would skip 7 out of every 8 lines. All that information is lost. It also causes flickering, aliasing, because when you shift the tilted square up and down, other horizontal lines will become visible and others dissapear. To avoid the flickering, mipmapping uses a 32x32 version of the texture, where blocks of 8x8 pixels of the original texture are nicely averaged together. This is also a loss of information, but it stops the flicker. This is what is done with regular mip-mapping. The biggest disadvantage is that we now have 32 pixels horizontally in the texture, mapped onto 256 pixels on the screen. So we're stretching it out, making it look blurry.
How anisotropic filtering works
What we really wanted is to average 1x8 pixels together, so we'd get a 256x32 texture. But that doesn't work when we start rotating the square. And it also requires a lot of extra memory. The alternative, is to sample the texture 8 times per pixel, in the direction in which the polygon is tilted. That's anisotropic filtering. It doesn't matter how the square is rotated, it can take 8 samples in the texture in any direction required, and average them together. It's called anisotropic because the degree of filtering in one direction (the direction in which the polygon is tilted) is greater than the degree of filtering in the direction perpendicular to that.
My confusion is the italicized/bolded part of the quote above.
(1) Are those eight samples weighted averages?
(2) Are those resulting values then weighted-averaged (i.e. bilinearly filtered) to produce the final color?