Handmade Hero » Forums » Code » More about alpha blending than you'll want to know
sol_hsa
Jari Komppa
40 posts / 1 project

Programmer, designer, writer, a lot of other things; http://iki.fi/sol

#1750 More about alpha blending than you'll want to know
3 years, 8 months ago

This khronos OpenVG extension lists a bunch of alpha blending equations that are even more complex than you'll get from OpenGL blend operations:
khr_advanced_blending

The w3c compositing and blending specification goes over much of the same stuff, but also has pretty pictures:
w3c compositing and blending

All that said, most of the time you'll get by with "weighted average" (like in episode 38), "saturated add" (for explosions, fire and other and glowing stuff; saturated means that values cap at 1.0) and "multiply" (for shadows).

http://iki.fi/sol - my schtuphh