The accumulation buffer is an ancillary buffer useful in advanced rendering techniques that generally require rendering the entire scene, or some portion of it, multiple times and "accumulating" the resulting images. Such techniques include, but need not be limited to: antialiasing, motion blur, depth of field, and transparency. For more information on techniques which take advantage of the accumulation buffer, see the paper, "The Accumulation Buffer: Hardware Support for High-Quality Rendering", Computer Graphics, Volume 24, Number 4, August, 1990, pp. 309-318, written by Paul Haeberli and Kurt Akeley.
Accumulation is performed by adding the contents of an image (and possibly ancillary components of an image such as alpha values) to the buffer. Accumulation occurs using one of the following techniques, or by some combination:
At the end of accumulation, the buffer is typically transferred to a drawable to display the resulting image.
Accumulation buffers are not drawables; renderers cannot render directly to accumulation buffers. The images used during accumulation may consist of pixels that are the result from PEX rendering, so that in fact the accumulation buffers are "indirectly rendered". Both the accumulation buffers and the accumulated images must contain colors which are the result of the application of the color approximation steps. Therefore, accumulation is defined only for component visuals, i.e. those visuals which have X11 pixel values that directly specify each of the red, green and blue components. See the definition of DirectColor and TrueColor visuals in the core X11 specification for more detail on visual types.
Since accumulation is performed on images, the accumulation buffer is originally loaded from a drawable and has drawables accumulated into it. Core X11 semantics provide no mechanism to specify the existence of ancillary buffers such as the accumulation buffer or alpha buffer. These ancillary buffers may be described by the Extended Visual Extension to X (EVE) protocol in which case the client can determine capabilities of a drawable through its visual ID. If EVE is not available, then the client may not be able to determine what ancillary capabilities are available for a drawable of a given visual type. This does not preclude PEX from allocating and utilizing ancillary buffers for that drawable, if the drawable is indeed capable of supporting such ancillary buffers. If the implementation supports drawables with an alpha buffer capability (whether or not it also implements EVE to advertise the existence of such capabilities), then a PEX implementation supporting accumulation buffers must support the drawables with sufficient alpha planes to allow for accumulation of the ancillary alpha values. Additionally, the total depth of the accumulation buffer must be equal to or greater than the total depth of the drawable to which it is associated, and the depth of each component (red, green, blue, and if supported, alpha) must also be equal to or greater than the depth of each component. Also, since the accumulation buffer is an ancillary buffer to the drawable, it has the same width and height as the drawable.
Typical methods of using the accumulation buffer are as follows: