Bug 426874 - Subtract alpha pattern mode changed its behaviour
Summary: Subtract alpha pattern mode changed its behaviour
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 4.4.0-beta1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-09-22 14:36 UTC by Wojtek Trybus
Modified: 2020-09-22 20:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Examples of not fully cut out pixels (1.62 MB, image/png)
2020-09-22 14:36 UTC, Wojtek Trybus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wojtek Trybus 2020-09-22 14:36:08 UTC
Created attachment 131871 [details]
Examples of not fully cut out pixels

SUMMARY
In the new behaviour of the subtract alpha, it is much more likely for pixels not to get fully subtracted. Especially visible with strong cut-off pattern enabled 

STEPS TO REPRODUCE
1. Create a new brush without any other dynamics than "pattern"
2. Pick any texture, and in its options, set texturing mode to "subtract (alpha)", cutoff policy to "cut off pattern", and place the left arrow much closer to the right one 

OBSERVED RESULT
in 4.3 the pattern gets cut, resulting only in some painted dots (where pattern had extreme value)
in 4.4 all the remaining pixels gets painted, but with the flow dependent on the pattern. It still saturates to the maximum value very easily

EXPECTED RESULT
Subtracting with pattern with extreme values, results in many fully subtracted pixels, not just a bit lower opacity ones.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 20.04
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2020-09-22 17:29:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/495
Comment 2 Dmitry Kazakov 2020-09-22 20:49:08 UTC
Git commit 604b2cedb334c86aca9070e2465dd16381a5c28c by Dmitry Kazakov, on behalf of Peter Schatz.
Committed on 22/09/2020 at 20:45.
Pushed by dkazakov into branch 'krita/4.3'.

Fix Cutoff Pattern option

Recent changes to how masks are adjusted caused Cutoff Pattern option to
not do anything with typical (non-RGBA) texture/pattern files.  This fixes
the issue.

M  +16   -12   plugins/paintops/libpaintop/KisTextureMaskInfo.cpp

https://invent.kde.org/graphics/krita/commit/604b2cedb334c86aca9070e2465dd16381a5c28c
Comment 3 Dmitry Kazakov 2020-09-22 20:52:07 UTC
Git commit 5d9ef478005b29286ee4305c44f9389d733d6611 by Dmitry Kazakov, on behalf of Peter Schatz.
Committed on 22/09/2020 at 20:51.
Pushed by dkazakov into branch 'krita/4.4.0'.

Fix Cutoff Pattern option

Recent changes to how masks are adjusted caused Cutoff Pattern option to
not do anything with typical (non-RGBA) texture/pattern files.  This fixes
the issue.

M  +16   -12   plugins/paintops/libpaintop/KisTextureMaskInfo.cpp

https://invent.kde.org/graphics/krita/commit/5d9ef478005b29286ee4305c44f9389d733d6611
Comment 4 Dmitry Kazakov 2020-09-22 20:53:18 UTC
Git commit 877573cb38692c91968f812066ed1bae5a19d40e by Dmitry Kazakov, on behalf of Peter Schatz.
Committed on 22/09/2020 at 20:52.
Pushed by dkazakov into branch 'master'.

Fix Cutoff Pattern option

Recent changes to how masks are adjusted caused Cutoff Pattern option to
not do anything with typical (non-RGBA) texture/pattern files.  This fixes
the issue.

M  +16   -12   plugins/paintops/libpaintop/KisTextureMaskInfo.cpp

https://invent.kde.org/graphics/krita/commit/877573cb38692c91968f812066ed1bae5a19d40e