Skip to content

Premult

Premult
Composite

Multiplies RGB by alpha, converting straight (unassociated) alpha to premultiplied alpha for correct compositing math.

The same edge pixel stored two ways: Premult multiplies a pixel's color by its alpha, so a full red at 25% opacity is stored as 64, 0, 0 and its color fades out with the edge instead of bleeding past it.

Premult associates an image’s color with its coverage: every RGB value is multiplied by the pixel’s alpha, so fully transparent pixels go black and semi-transparent edges darken proportionally. Adds and filters across an edge need that form, and ArcBrush’s own nodes do it for you: Merge multiplies A and B by their alpha before it combines them (Plus included) and divides the result back, and Blur filters premultiplied color the same way, so images pass between nodes with straight alpha.

So you rarely need Premult, and never before Merge: a premultiplied input is multiplied by its alpha a second time there, and its soft edges come out too dark. It matters where an image leaves the graph for something that expects premultiplied color (a PNG or TGA export is written straight; an EXR export is premultiplied for you), or to undo an Unpremult you made on purpose.

Pins

ImageImage
InputRequired
ImageImage
Output
  • Do not premultiply before Merge, Plus included: Merge multiplies each input by its alpha itself, so a premultiplied input darkens its soft edges twice.
  • If an image already looks premultiplied (dark fringes on transparent edges), do not premultiply it again; that darkens edges further.
  • A source that arrived premultiplied (a render saved premultiplied, most often as a TGA, which Image In reads as straight) goes through Unpremult once, before any grade or Merge; Premult it again only on its way out to a file or app that wants premultiplied color.