In computer graphics, A-buffer, also known as anti-aliased, area-averaged or accumulation buffer, is a general hidden surface mechanism suited to medium scale virtual memory computers. It resolves visibility among an arbitrary collection of opaque, transparent, and intersecting objects. Using an easy to compute Fourier window (box filter), it increases the effective image resolution many times over the Z-buffer, with a moderate increase in cost.
The A-buffer method is a descendant of the well known Z-buffer, which provides good quality results in moderate time.
In 3-D image synthesis system, the balance between the quality and the cost of computation has always been needed. Using a full object-precision visible-surface algorithm at each pixel is expensive. A-buffer method provides moderate quality results in moderate cost of computation.
A-buffer help in using visibility techniques and support all conceivable geometric modeling primitives: polygons, patches, quadrics, fractals, and so forth. It also help to handle transparency and intersecting surfaces (and transparent intersecting surfaces).
Carpenter's A-buffer algorithm addresses this problem by approximating Catmull's per-pixel object-precision area sampling with per-pixel image-precision operation performed on a sub-pixel grid. Polygons are first processed in scan-line order by clipping them to each square pixel they cover. This result in list of clipped polygon fragments corresponding to each square pixel. Each fragment have 4 by 8 bit mask of parts of the pixel it covers.
The bit-mask for a fragment was computed by xoring together masks representing each of the fragment's edges. When all polygons intersecting a pixel have been processed, the area-weighted average of the colors of the pixel's visible surfaces is obtained by selecting fragments in depth-sorted order and using their bit masks to clip those of farther fragments.
The bit masks can be manipulated efficiently with Boolean operations. For example, two fragment bit masks can be added together to determine the overlap between them. The A-buffer algorithm saves only a small amount of additional information with each fragment. For example. It includes the fragment's z extent, but no information about which part of the fragment is associated with these z values. Thus, the algorithm must make assumptions about the sub-pixel geometry in cases in which fragment bit masks overlap in z.
- Carpenter, Loren (July 1984). "The A-buffer, an Antialiased Hidden Surface Method". Computer Graphics. 18 (3): 103–108. doi:10.1145/964965.808585. Retrieved 2014-09-10.
- Catmull, Edwin (August 1978). "A Hidden-Surface Algorithm with Anti-Aliasing" (PDF). Computer Graphics. 12 (3): 6–11. doi:10.1145/965139.807360.
- Foley, James D.; Feiner, Steven K.; van Dam, Andries; Hughes, John F. (1995). Computer Graphics: Principles and Practice in C (2nd ed.). Addison-Wesley. ISBN 0-201-84840-6.