Home

unpremultiplied

Unpremultiplied refers to a representation of color with an alpha channel where the red, green, and blue components are stored as independent color values and have not been multiplied by the alpha value. In this form, the alpha channel expresses opacity, while the color channels represent the full color intensities of the fragment before blending.

This contrasts with premultiplied alpha, in which the color channels are stored already multiplied by alpha

In image formats, PNG and most non-animated formats typically use unpremultiplied alpha; some graphics engines and

Blending with unpremultiplied data uses the over operation: out alpha equals As plus Ad times (1 minus

Practical notes: ensure consistent representation when compositing; converting to a common form avoids artifacts. Working in

(R'
=
R
times
A,
G'
=
G
times
A,
B'
=
B
times
A).
Premultiplied
is
common
in
GPU
pipelines
because
blending
can
be
performed
without
division,
which
can
improve
performance
and
reduce
artifacts
at
edges.
textures
are
stored
as
premultiplied
alpha
internally,
and
many
rendering
pipelines
convert
to
premultiplied
form
for
compositing.
As).
If
the
resulting
alpha
is
nonzero,
the
output
color
channels
are
computed
as
(Rs
times
As
plus
Rd
times
Ad
times
(1
minus
As))
divided
by
the
output
alpha,
for
each
channel.
With
premultiplied
data,
the
over
operation
can
be
performed
as
out
color
equals
Cs
plus
Cd
times
(1
minus
As)
and
out
alpha
as
above,
where
Cs
and
Cd
are
premultiplied
color
values.
linear
color
space
helps
achieve
correct
blending
of
translucent
surfaces
and
reduces
color
issues
at
edges.