Accumulation Buffer Question submitted by Anonymous (06 June 2000) | Return to The Archives

| How does an A-Buffer (accumulation buffer) work for anti-aliasing images? |

| I've never personally used the A-Buffer, so I would be unable to properly describe it with implementation details. The reason that I've stayed away from this algorithm is because of its complexity when compared to multi-sample antialiasing, and because of artifact problems inherent in the A-Buffer algorithm. With multi-sample, you are also afforded the advantage of not requiring any code changes to your rendering pipeline. So, whenever it came time for requiring antialiasing, multi-sample was always the answer for my needs.
I know of two ways to do multi-sample antialiasing:

> - Standard: Multiply your resolution by two constants. If your resolution was 100x100 and your constants are [8, 8] then you would render an 800x800 image. Next, average blocks of pixels together. The size of each block depends on your constants. If you chose the constants [8, 8] then you would average the 8x8 blocks. I you chose [4, 4] then you would average every 4x4 block.
>   The resulting quality is directly related to your constants. The higher, the better. Note that all of the extra time is spent is in your rasterizers.
> - Alternate: Render the image a number of times (for this example, we'll use a constant of 4). Before each render, offset the vertices in the image by a fractional amount in each direction. If you were to render the image 4 times, you would render the image with these offsets to each screen-space vertex: [-0.5, -0.5] [+0.5 -0.5] [-0.5, +0.5] and [+0.5, +0.5]. Of course, these offsets need to change depending on the number of times you render your image. Once these images have been rendered, simply average them together.

This accomplishes the same result as the standard multi-sample algorithm, but with the advantage of smaller images, and the disadvantage of running through your entire pipeline multiple times (as opposed to just the rasterizer.)
Response provided by Paul Nettle

This article was originally an entry in flipCode's Ask Midnight, a Question and Answer column with Paul Nettle that's no longer active.

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.