BlendEquation

View source

Provides numeric choices for the operation that combines source and destination blend contributions.

Pass one of these numeric constants to gl.blendEquation. WebGL applies the selected operation to the values produced by the factors in BlendMode, for both color and alpha.

Examples

import { BlendEquation } from '@wimaengine/render-webgl'

// `gl` is an existing WebGL rendering context.
gl.blendEquation(BlendEquation.REVERSE_SUBTRACT)

Variants


ADD

View source

Adds the source and destination contributions: source + destination (0x8006).

SUBTRACT

View source

Subtracts the destination contribution from the source contribution: source - destination (0x800A).

REVERSE_SUBTRACT

View source

Subtracts the source contribution from the destination contribution: destination - source (0x800B).