next up previous contents
Next: 8.6 The Stencil Buffer Up: 8 Blending and Compositing Previous: 8.4 Blending with the   Contents

8.5 Blending Transitions

When generating real-time or interactive imagery, often the application may switch between different representations of an object. A different representation may be chosen which provides more detail or less detail, takes less time to render, or for a variety of other reasons. The two representations may not be similar enough to generate the same pixels on the screen, so the transition may generate an objectionable ``pop'' on the screen. The apparent discontinuity can be reduced by fading the old representation in and the new representation over a number of frames using blending. The new representation is rendered with glBlendFuncGL_ SRC_ALPHA, GL_ ONE(GL_ SRC_ALPHA, GL_ ONE) and the old representation with glBlendFuncGL_ ONE_MINUS_SRC_ALPHA, GL_ ONE(GL_ ONE_MINUS_SRC_ALPHA, GL_ ONE), varying alpha from 0 to 1 over a few frames.