SECTION 7.2
529
Basic Compositing Computations
The result shape and opacity are given by
f
r
=
Union
(
f
b
,
f
s
)
Union
(
f
b
×
q
b
,
f
s
×
q
s
)
-
q
r
= --------------------------------------------------------
f
r
where the variables have the meanings shown in Table 7.5.
TABLE 7.5 Variables used in the result shape and opacity formulas
VARIABLE
MEANING
f
r
f
b
f
s
q
r
q
b
q
s
Result shape
Backdrop shape
Source shape
Result opacity
Backdrop opacity
Source opacity
These formulas can be interpreted as follows:
The result shape is simply the union of the backdrop and source shapes.
The result opacity is the union of the backdrop and source opacities, weighted
by their respective shapes. The result is then normalized by the result shape,
ensuring that when this shape and opacity are subsequently used together in
another compositing operation, the opacity’s contribution is correctly repre-
sented.
Since alpha is just the product of shape and opacity, it can easily be shown that
α
r
=
Union
(
α
b
,
α
s
)
This formula can be used whenever the independent shape and opacity results
are not needed.
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.