Combine buffers

Mix buffers lets you interactively blend the main and swap buffer.  If the alpha is active, it will be used as a matte.

Alpha blit opaquely composites the swap buffer into the main buffer by passing it through the alpha channel.

Pre-multiplied alpha blit composites the swap buffer into the main buffer through the alpha in a way that preserves the brightness of the original. Say you did a normal alpha blit of a text logo with a lens flare onto a light background, the edges of the lens flare would appear dark grey. Pre-multiplied compositing adjusts for these situations.

Additive adds the swap buffer to the main buffer. The formula is simply Main(r,g,b) + Swap(r,g,b). If values exceed 255, they're clipped.

Subtractive subtracts the swap buffer from the main buffer. The formula is Main(r,g,b) - Swap(r,g,b). This is often used for finding the difference between two images. Pixels that are exactly the same will become black, where as pixels that are different between the two images won't.

Multiply multiplies the two buffers and divides them by 255. One of my personal favorites. This filter is very useful when doing watercolor like paintings. You can paint on one buffer, then go to the other and paint something else, and combine the two as if you were painting on top of dry watercolor paint.

Divide divides the two buffers. I've yet to find a use for it.

Screen inverts and multiplies the two buffers. The result is a sort of additive where the brightness never produces clipping.

Luminance combines the two buffers using the brightness of the swap buffer as a key.

Compliment combines the inverse of the swap buffer using the color of each channel as a key.

Difference combines the buffers by subtracting the swap from the main, and using the absolute value of the result.

Around gray combines the two buffers so that values above 127 are additive and values below 127 are subtractive.

Greater than combines if the value in the swap buffer are lighter then the values in the main buffer.

Less than combines if the values in the swap buffer are darker than the values in the main buffer.

Texturize multiplies the grayscale average of the swap buffer with the main buffer.

Binary is a way to dither an image down to 2 colors with the dither pattern being controlled by the swap buffer. You could for example use random noise, an ordered pattern, or a series of small circular gradients to create a halftone.

Hue lets you replace the hue channel of the main buffer with the swap buffer.

Sat lets you replace the saturation channel of the main buffer with the swap buffer.

Val lets you replace the value channel of the main buffer with the swap buffer.

And combines the two buffer with an bitwise AND operation.

0101   
1100   And
----
0100   (result)

If both bits contain a, a one will be passed through.

Or combines the two buffers with a bitwise OR operation.

0101   
1100    Or
----
1101   (result)

One or both bits can contain a 1, or a 0 is passed through.

Xor combines the two buffers with a bitwise Xor operation.

0101   
1100    Xor
----
1001   (result)

1s in both bits will nullify, otherwise the bits are passed through unchanged.