next up previous contents
Next: 8.4 Blending with the Up: 8 Blending and Compositing Previous: 8.2 Advanced Blending   Contents


8.3 Painting

Two-dimensional painting applications can make interesting use of texturing and blending. An arbitrary image can be used as a paint brush, using blending to accumulate the contribution over time. The image source (paint brush) can be geometry or a pixel image. A texture mapped quad under an orthographic projection can be used in the same way as a pixel image and often more efficiently (when texture mapping is hardware accelerated).

An interesting way to implement the painting process is to precompute the effect of painting the entire image with the brush and then use blending to selectively expose the painted area as the brush passes over the area. This can be implemented efficiently with texturing by using the fully painted image as a texture map, blending the source image mapped on the brush with the current image stored in the color buffer. Use a geometric shape and translate the $<s,t>$ texture coordinates as the $<x,y>$ coordinates move across the image. The main advantage of this technique is that elaborate paint/brush combinations can be efficiently computed across the entire image all at once rather than performing localized computations in the area covered by the brush.


next up previous contents
Next: 8.4 Blending with the Up: 8 Blending and Compositing Previous: 8.2 Advanced Blending   Contents
2001-01-10