Anders Riggelsen

Visual glBlendFunc + glBlendEquation Tool

+ glBlendFuncSeparate and glBlendEquationSeparate


Source: (foreground)

Destination: (background)

Blend equation:


(sR*sA) + (dR*(1-sA)) = rR
(sG*sA) + (dG*(1-sA)) rG
(sB*sA) + (dB*(1-sA)) rB
(sA*sA) + (dA*(1-sA)) rA
  • Image presets
  • Image URLs
  • Blending color

Foreground: Background:
Hue: Alpha value:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBlendEquation(GL_FUNC_ADD);

Graphics from www.interfacelift.com:

Splash by Richard Mohler
Bisti Badlands by Ben DiAnna
Lazy Days II by boss019
Flamingos by Jestrella
Treetops - Michaux State Forest by Se7en
The Road To Bonneville by Chris F
Clouds Over Water by DerekProspero
Starry Night by ManiDProductions
Mt Rainier from Kerry Park by Jeffery Hayes
Moon Rise by Phil2001
Death Star by unknown (google search)
Thanks to:
Alex Huang for finding a bug in in the math for GL_FUNC_REVERSE_SUBTRACT.
David Geier for finding a bug with GL_SRC_COLOR and alpha values.
John Robinson for finding a bug with the mouse-over explanatory calculations for alpha values.
Mikkel Gjoel for finding the bug that new images wasn't premultiplied if the checkbox was checked.