diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-12-29 16:18:56 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-12-29 17:00:57 +0300 |
commit | bdcc25830506aa8359351424707cc6d735df7f34 (patch) | |
tree | 7b295d0a5e5a154d6de6b9aac510408a2f6a122f /source/blender/sequencer | |
parent | 4bf74afacc1d1d6c975130aeb39f532de40ed603 (diff) |
Fix: VSE colormix blend factor not working
Blend factor was used to adjust alpha of background image, which is not
correct. This was done in fdee84fd567a where another change was, that
background alpha is copied into result, which is correct.
Apply blend factor to foreground image alpha channel.
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r-- | source/blender/sequencer/intern/effects.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index f2ee1a058e2..8776bc63cf0 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -1072,10 +1072,10 @@ BLI_INLINE void apply_blend_function_byte(float fac, for (int i = 0; i < y; i++) { for (int j = 0; j < x; j++) { - unsigned int achannel = rt1[3]; - rt1[3] = (unsigned int)achannel * fac; + unsigned int achannel = rt2[3]; + rt2[3] = (unsigned int)achannel * fac; blend_function(rt, rt1, rt2); - rt1[3] = achannel; + rt2[3] = achannel; rt[3] = rt1[3]; rt1 += 4; rt2 += 4; @@ -1098,10 +1098,10 @@ BLI_INLINE void apply_blend_function_float(float fac, for (int i = 0; i < y; i++) { for (int j = 0; j < x; j++) { - float achannel = rt1[3]; - rt1[3] = achannel * fac; + float achannel = rt2[3]; + rt2[3] = achannel * fac; blend_function(rt, rt1, rt2); - rt1[3] = achannel; + rt2[3] = achannel; rt[3] = rt1[3]; rt1 += 4; rt2 += 4; |