![]() |
|Download Files|
![]() ![]() ![]() ![]() ![]() Next: 4.3 DrawingReading, and Up: 4.2 Whole Framebuffer Operations Previous: 4.2.3 Clearing the Buffers
4.2.4 The Accumulation BufferEach portion of a pixel in the accumulation buffer consists of four values: one for each of R, G, B, and A. The accumulation buffer is controlled exclusively through the use of
void Accum ( enum op, float value ) ; (except for clearing it). op is a symbolic constant indicating an accumulation buffer operation, and value is a floating-point value to be used in that operation. The possible operations are ACCUM, LOAD, RETURN, MULT, and ADD.
The accumulation buffer operations apply identically to every
pixel, so we describe the effect of each operation
on an individual pixel.
Accumulation buffer values are taken to be signed values in the range
The RETURN operation takes each color value from the accumulation buffer, multiplies each of the R, G, B, and A components by value. The resulting color value is placed in the buffers currently enabled for color writing as if it were a fragment produced from rasterization, except that the only per-fragment operations applied are the pixel ownership test and, if enabled, dithering (section 4.1); color masking (section 4.2.2) is also applied. The MULT operation multiplies each R, G, B, and A in the accumulation buffer by value and then returns the scaled color components to their corresponding accumulation buffer locations. ADD is the same as MULT except that value is added to each of the color components.
The color components operated on by Accum
must be clamped only if the operation is RETURN.
In this case, a value sent to the enabled color buffers is first clamped
to No state (beyond the accumulation buffer itself) is required for accumulation buffering.
![]() ![]() ![]() ![]() ![]() Next: 4.3 DrawingReading, and Up: 4.2 Whole Framebuffer Operations Previous: 4.2.3 Clearing the Buffers David Blythe Sat Mar 29 02:23:21 PST 1997
|