diff --git a/libs/pigment/compositeops/KoCompositeOpFunctions.h b/libs/pigment/compositeops/KoCompositeOpFunctions.h index 56e67cbf34e2ea93e3ffecd34990e37ad963ee24..70ee03cfacbd8bdd3fdbc1d508fb702756f6caad 100644 --- a/libs/pigment/compositeops/KoCompositeOpFunctions.h +++ b/libs/pigment/compositeops/KoCompositeOpFunctions.h @@ -485,6 +485,10 @@ inline T cfHardMixPhotoshop(T src, T dst) { const composite_type sum = composite_type(src) + dst; + if (sum == unitValue<T>()){ + return src > halfValue<T>() ? unitValue<T>() : zeroValue<T>(); + } + return sum > unitValue<T>() ? unitValue<T>() : zeroValue<T>(); }