From eda58d6419471be0d552a5bcf58e8200b2170bcf Mon Sep 17 00:00:00 2001 From: Hannes Loeschke Date: Fri, 18 Aug 2023 12:36:03 +0200 Subject: [PATCH] Fix #110635: VSE: strip color multiplication affecting alpha channel Factor of Color>Multiply should not have an effect on the alpha channel. Alpha values can be adjusted separately by the factor associated to blend mode. Factors below 1.0 reducing alpha would reduce color twice, while factors above 1.0 would be clamped to 1.0. - Removed ops on alpha channel in multiBuf() - Removed adjustement of ibuf-planes since alpha channel is no longer modified Pull Request: https://projects.blender.org/blender/blender/pulls/110984 --- source/blender/sequencer/intern/render.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/blender/sequencer/intern/render.cc b/source/blender/sequencer/intern/render.cc index 3fb9cb4743f..c4f7cf1c487 100644 --- a/source/blender/sequencer/intern/render.cc +++ b/source/blender/sequencer/intern/render.cc @@ -588,7 +588,6 @@ static void multibuf(ImBuf *ibuf, const float fmul) rt[0] = min_ii((imul * rt[0]) >> 8, 255); rt[1] = min_ii((imul * rt[1]) >> 8, 255); rt[2] = min_ii((imul * rt[2]) >> 8, 255); - rt[3] = min_ii((imul * rt[3]) >> 8, 255); rt += 4; } @@ -599,15 +598,10 @@ static void multibuf(ImBuf *ibuf, const float fmul) rt_float[0] *= fmul; rt_float[1] *= fmul; rt_float[2] *= fmul; - rt_float[3] *= fmul; rt_float += 4; } } - - if (ELEM(ibuf->planes, R_IMF_PLANES_BW, R_IMF_PLANES_RGB) && fmul < 1.0f) { - ibuf->planes = R_IMF_PLANES_RGBA; - } } static ImBuf *input_preprocess(const SeqRenderData *context,