1. Blending. Assume blending is enabled and the blending factors are set as below.
gl.blendFunc (gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
Write out the new colors in the frame buffer.
Original colors in the frame buffer:
(255, 0, 0, 0) (0, 255, 0, 255)
(0, 0, 255, 200) (255, 0, 255, 100)
Colors to be written into the frame buffer:
(0, 0, 127, 255) (127, 0, 127, 0)
(127, 0, 0, 100) (0, 127, 0, 200)
New colors in the frame buffer: