In this video, we will be explaining the A-Buffer algorithm from Computer Graphics in detail.
What is A-Buffer algorithm?
A-Buffer algorithm is used for hidden face detection mechanism, which is suitable for medium-scale virtual memory computers.
It is also called an anti-aliased or accumulation buffer. A-Buffer is the extension of the Z-buffer method.
Difference between A-Buffer & Z-Buffer:
It is used for transparent objects and opaque objects, whereas a depth buffer is used only for opaque objects. A-buffer requires more memory and composes different colors correctly. The main data structure used in A-Buffer is the accumulation buffer.
A-Buffer has 2-fields:
1) Depth field: Depth field is used to store positive numbers or negative real numbers.
2) Surface data field: The surface data field is used to store surface intensity information or store the pointer information of the surface which contributes to a particular pixel position.
When a pixel overlap by only one surface: If the value of depth is >= 0, the number stored at that position is called the depth of a single surface overlapping the corresponding pixel area.
When a pixel overlaps by multiple surfaces: In multiple-surface contributions, pixel intensity is indicated by depth < 0.
When compared to Z-Buffer, A-Buffer is costlier because A-Buffer requires more memory, it is mainly used to show transparent objects.
The surface buffer in the A-buffer method includes :
If we consider the A-buffer method, every pixel consists of a group of sub-pixels. The final color of a pixel is calculated by adding all of its sub-pixels, because of this the accumulation takes place at the sub-pixel level, which is the reason the A-buffer method gets the name accumulation buffer.
A-Buffer Algorithm: https://www.geeksforgeeks.org/a-buffer-method/