Page MenuHome

Fix blend_color_interpolate_byte returning wrong alpha in certain case
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Oct 27 2020, 2:03 PM.

Details

Summary

When the combined alpha [the 'tmp' variable having the mixfactor applied
already] - reached zero it was handled like a no-op (for the alpha as
well) and just copied the first color.

So e.g mixing 255/255/255/255 with 0/0/0/0 with a factor of 1.0 gave
alpha of 255, which looks wrong.

cases where tmp gets zero:
src1 alpha:0 src2 alpha:whatever mixfactor 0.0
src1 alpha:whatever src2 alpha:0 mixfactor 1.0
src1 alpha:0 src2 alpha:0 mixfactor whatever

Now set alpha to zero in that case.

Meant to be used for D9358

ref T81914

Diff Detail

Repository
rB Blender