Graphics Reference
In-Depth Information
F 0.5
M 0.5
B 1.0
Foreground
Middle ground
Background
FIGURE A.6
Compositing randomly distributed color fragments for a pixel.
F 0.5
M 0.5
B 1.0
Foreground
Middle ground
Background
FIGURE A.7
Compositing correlated colors for a pixel.
When a F and a B represent full coverage opacities or uncorrelated partial coverage fractions, the
over operator computes a valid result. However, if the alphas represent partial coverages that share
an edge, then the compositing over operator does not have enough information to tell whether, for
example, the partial coverages overlap in the pixel area or whether the areas of coverage they represent
are partially or completely disjoint. Resolution of this ambiguity requires that additional information be
stored at each pixel indicating which part of the pixel is covered by a surface fragment. For example, the
A -buffer 3 algorithm [ 1 ] provides this information.
Alpha channel is a term that represents a combination of the partial coverage and the transparency
of the surface or surfaces whose color is represented at the pixel. Notice that when compositing colors, a
color always appears in the equation multiplied by its alpha value. It is therefore expedient to store the
color value already scaled by its alpha value. In the following discussion, lowercase rgb refers to a color
value that has already been scaled by alpha. Pixels and images whose colors have been scaled by alpha
are called premultiplied . Uppercase RGB refers to a color value that has not been scaled by alpha. In a
premultiplied image, the color at a pixel is considered to already be scaled down by its alpha factor, so
that if a surface is white with an RGB value of (1, 1, 1) and it covers half a pixel as indicated by an alpha
value of 0.5, then the rgb stored at that pixel will be (0.5, 0.5, 0.5). It is important to recognize that
storing premultiplied images is very useful.
3 The A -buffer is a Z -buffer in which information recorded at each pixel includes the relative depth and coverage of all frag-
ments, in z -sorted order, which contribute to the pixel's final color.
 
Search WWH ::




Custom Search