Premultiply alpha is an effect that allows for pre-multiplying or de-multiplying the alpha channel of an input image. De-multiplying refers to the process of reversing pre-multiplication.
In graphics, there are at least two ways to represent transparency (opacity, or alpha):
- Straight alpha
- Premultiplied alpha
Straight Alpha (Linear)
With straight alpha, RGB values define the pure color while alpha independently represents opacity. These components exist separately - you can modify one without affecting the other. When creating a fade effect, you simply reduce the alpha component while maintaining the original RGB values.
Blending uses the formula:
Premultiplied Alpha
In premultiplied alpha, RGB values are pre-combined with alpha, representing the color’s actual contribution to the final image. Alpha still indicates how much background is obscured. Since RGB and alpha are linked, full transparency is always represented as RGB=0, A=0.
Blending simplifies to:
Premultiplied alpha produces superior results when filtering images or compositing layers, making it the preferred choice for graphics rendering.
Within Vizzy
In the context of Vizzy, this effect might be useful for custom blending or effect chaining, utilizing buffers or Image items. In general, it might help fix dark outlines around transparent images.
Controllers
| Name | Type | Description | Range |
|---|---|---|---|
| De-multiply | Switch | Whether to reverse the premultiplication process | - |