March 2013
Intermediate to advanced
984 pages
26h 18m
English
In basic blending mode, the incoming fragment’s color is linearly combined with the current pixel’s color. As with any linear combination, coefficients control the contributions of each term. For blending in OpenGL, those coefficients are called the source- and destination-blending factors. The source-blending factor is associated with the color output from the fragment shader, and similarly, the destination-blending factor is associated with the color in the framebuffer.
If we let (Sr, Sg, Sb, Sa) represent the source-blending factors, and likewise let (Dr, Dg, Db, Da) represent the destination factors, and use (Rs, Gs, Bs, As), and (Rd, Gd, Bd, Ad) represent the colors of the source fragment and destination pixel respectively, ...