Graphics Reference
In-Depth Information
Figure 11.19. The meaning of the parameter T in the blending process.
chapter, we will present examples where one of these images is a particular
base image, and the other is an image that you want to manipulate. The gen-
eral form of the linear combination is
(
) ∗+∗
=−
I
1.
T
I TI
.
out
base
source
We are used to equations such as this being limited by having the param-
eter Τ restricted to the range [0., 1.]. However, for some of these applications,
we don't make any such limitation, because for some effects it is easier to ask
for what you don't want than to ask for what you do. Going outside the [0., 1.]
range will allow us to extrapolate to the effect we want to achieve.
The parameter in the blend can be varied to get different results, and here
glman 's ability to atach a uniform variable to a slider can be very helpful in
experimenting with the effects of a parameter. The built-in GLSL mix( ) func-
tion supports the actual blending sum.
Blending an Image with a Constant Base Image
There are several image-manipulation processes that involve blending each
pixel of an image with a constant value. The operations that result are quite
common and are very useful. Many of the examples below have been set up
for the glman environment with a uniform slider variable T that performs the
blending operation shown in Figure 11.19.
Search WWH ::




Custom Search