Blending (graphic)

from Wikipedia, the free encyclopedia

Under blending (engl. For mix ) are understood in the computer graphics a process in the screening , in which the color of a displayed pixel with that of the already in the video memory existing pixel is mixed.

With alpha blending , this blending process is carried out with the help of the alpha channel , which contains additional information about the transparency of an image. In the simplest case:

The new color value C is calculated from the color value A of the image, which is included in the equation with its corresponding alpha value as a factor. The existing color value B is reduced accordingly so that the two factors add up to 1. The result only depends on the alpha value of the new image, the transparency of the background is irrelevant. This technology is used, among other things, to create shadow effects.

In the case of fog blending , the image to be displayed is changed in such a way that the color of all points is mixed with a fixed hue according to their distance from the viewer in three-dimensional space. This technique is mainly used to make distant objects disappear in an artificial fog. To realize the effect, one uses the distance information of the pixels, which is stored in the Z-buffer . This value, together with a glare factor, a color and a simple function determine the resulting color value. Simple linear, exponential and also logarithmic functions are common.