Page MenuHome

Fix T74440: Blend Factor in Color Mix strips is broken
AbandonedPublic

Authored by Richard Antalik (ISS) on Apr 3 2020, 5:21 AM.

Details

Summary

Blend factor slider modulates alpha to change how much second input contributes in blending.

blend_color_xxxx_floatexpects modulated alpha in first channel*.
blend_color_xxxx_byte expects modulated alpha in second channel.

*Unfortunately this is also not consistent, which I could fix, but I am not sure if
some editor already has hacks in place, and I would break something.
Only float functions seem to be "broken" by having a quick look

Diff Detail

Repository
rB Blender
Branch
T74440 (branched from master)
Build Status
Buildable 7426
Build 7426: arc lint + arc unit

Event Timeline

As far as I know the difference between the byte and float functions is that byte has unpremultiplied alpha while float has premultiplied alpha.

Maybe what you're missing for float is that you need to multiply the 4 rgba channels of the second input by the blend factor, instead of only the alpha channel?

As far as I know the difference between the byte and float functions is that byte has unpremultiplied alpha while float has premultiplied alpha.

Maybe what you're missing for float is that you need to multiply the 4 rgba channels of the second input by the blend factor, instead of only the alpha channel?

Thanks, that seems indeed like correct approach. I forgot how to color...
However I did that and results were wildly different still. Since same functions are used by texture paint, I have checked how that works and it produces different results as well. T75844: Blend modes are broken

Closing as this was fixed in rBbdcc25830506