Blending Factors

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, ...

Get OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.