diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-10-27 15:20:50 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-10-29 11:27:10 +0300 |
commit | 6a5d2f4ea2261528ae9d15c66852635b05743d97 (patch) | |
tree | d509bfa5323316d3dd3ce6babb06e9e8f5df9b93 /source/blender/blenkernel/intern/customdata.c | |
parent | 01d02e78b567d214926ce99be41fe76e7efc2bc6 (diff) |
Fix blend_color_interpolate_byte returning wrong alpha in certain case
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.
ref T81914
Maniphest Tasks: T81914
Differential Revision: https://developer.blender.org/D9357
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.c')
0 files changed, 0 insertions, 0 deletions