overPremul

Premultiplied Porter-Duff "over": composite one straight-alpha layer (rgb, a) on top of the premultiplied accumulator dst, clamping the layer alpha.

overPremul(dst: string, rgb: string, a: string): string

Import effects from shaders/std and use effects.overlay.overPremul.

One statement, brace-scoped so repeated composites in the same block don't collide on the temp.

Parameters

NameTypeNotes
dststring
rgbstring
astring