Created attachment 129655 [details] test image The destination atop compositing op seems to mix the colors wrong with some artifacts in some cases. Attached is a test image file. STEPS TO REPRODUCE 1. Paint something in a transparent layer. 2. Paint something else a different color in another transparent layer on top of the previous, overlaping the two shapes. 3. Choose "Destination Atop" blending mode on the layer on top. OBSERVED RESULT Sample image: https://imgur.com/a/tcIngTC EXPECTED RESULT The artifacts shouldn't appear SOFTWARE/OS VERSIONS Operating System: Manjaro Linux KDE Plasma Version: 5.18.5 KDE Frameworks Version: 5.70.0 Qt Version: 5.15.0 ADDITIONAL INFORMATION I looked at the code and think this could be fixed by modifying the file libs/pigment/compositeops/KoCompositeOpDestinationAtop.h Changing lines 61 and 62: channels_type srcMult= mul(src[channel], appliedAlpha); dst[channel] = lerp(srcMult,dst[channel],dstAlpha); by: dst[channel] = lerp(src[channel],dst[channel],dstAlpha); seems to solve the problem
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/401
Git commit de9dc412bbc1b9cf83f973d1aa47ed01d105c5d4 by Dmitry Kazakov, on behalf of Deif Lou. Committed on 02/07/2020 at 07:46. Pushed by dkazakov into branch 'master'. Fix destination atop rendering M +1 -3 libs/pigment/compositeops/KoCompositeOpDestinationAtop.h https://invent.kde.org/graphics/krita/commit/de9dc412bbc1b9cf83f973d1aa47ed01d105c5d4
Git commit ffbfff5fc51a4da55458bbe1178d546f7912fb66 by Dmitry Kazakov, on behalf of Deif Lou. Committed on 02/07/2020 at 08:04. Pushed by dkazakov into branch 'krita/4.3'. Fix destination atop rendering M +1 -3 libs/pigment/compositeops/KoCompositeOpDestinationAtop.h https://invent.kde.org/graphics/krita/commit/ffbfff5fc51a4da55458bbe1178d546f7912fb66