GL_KHR_blend_equation_advanced#

Supported Hardware#

Series6, Series6XE, Series6XT

Valid APIs#

OpenGL ES 2.0, 3.x

Description#

On its own OpenGL ES provides only a limited number of blend equations for users, with a number of different sources and destinations. This extension adds several additional blending equations to the API as follows:

  • MULTIPLY_KHR

  • SCREEN_KHR

  • OVERLAY_KHR

  • DARKEN_KHR

  • LIGHTEN_KHR

  • COLORDODGE_KHR

  • COLORBURN_KHR

  • HARDLIGHT_KHR

  • SOFTLIGHT_KHR

  • DIFFERENCE_KHR

  • EXCLUSION_KHR

  • HSL_HUE_KHR

  • HSL_SATURATION_KHR

  • HSL_COLOR_KHR

  • HSL_LUMINOSITY_KHR

The exact meaning of these is detailed in the specification itself, but those familiar with various rendering or imaging suites should recognise most of them.

To use these functions, both API functions and shader code are required to enable them. There is a layout qualifier for output variables determining the likely blend modes, and new enums for the glBlendEquation* functions. Any mismatches in the two when rendering will cause a draw-time error.

Example#

// Set the colour dodge blend equation
glBlendEquationi(GL_COLORDODGE_KHR);

Example#

// Appropriate shader code for color dodge blending
layout(location = 0, blend_support_colordodge) highp vec4 outputColour;