Bug 424210

Summary: Artifacts when using Masked Brush
Product: [Applications] krita Reporter: aist2710
Component: Brush enginesAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73, tamtamy.tymona
Priority: NOR    
Version: 4.3.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Artifacts around the brush strokes

Description aist2710 2020-07-14 18:55:48 UTC
Created attachment 130125 [details]
Artifacts around the brush strokes

SUMMARY


STEPS TO REPRODUCE
1. ./krita-4.3.0-x86_64.appimage
2. New File
   Width: 3508
   Height: 1357
   Resolution: 300 ppi
Color:
   Model: RGB/Alpha
   Depth: 16-bit float/channel
   Profile: sRGB-elle-V2-g10.icc
Content:
   Layers: 2
   Background Color: #908f8f
   Background: As raster layer
3. Select j)_WaterC_Flat_Big-Grain_Tilt
4. Draw

OBSERVED RESULT

Artifacts around the brush strokes see attached files.

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: plasmashell 5.12.9
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5
kf5-config: 1.0

ADDITIONAL INFORMATION

https://www.reddit.com/r/krita/comments/hr1fxb/artifacts_when_using_masked_brush_feature_on_gray/
Comment 1 Tiar 2020-07-14 18:59:15 UTC
Note: if you draw on a new layer, they will still appear. If you then convert that layer to sRGB, the artifacts disappear. Maybe it's just an unfortunate math corner case somewhere, but that brush is really bad on such images.
Also it's good to use red as a brush color, then you'll see cyan stroke outline besides the whiteish artifacts around.
Comment 2 Dmitry Kazakov 2020-08-28 08:47:32 UTC
Git commit 8f7b0ac218d8694ff6e5cc02de8af2a59cb89f6d by Dmitry Kazakov.
Committed on 28/08/2020 at 08:46.
Pushed by dkazakov into branch 'krita/4.3'.

Fix artifacts when using Masking Brush in Subtract mode in FP color space

Masking brush should never generate negative alpha values, otherwise
weird artivacts appear when this layer (with negative alpha) blends
into the background.

M  +20   -1    libs/ui/tool/strokes/KisMaskingBrushCompositeOpFactory.cpp

https://invent.kde.org/graphics/krita/commit/8f7b0ac218d8694ff6e5cc02de8af2a59cb89f6d
Comment 3 Dmitry Kazakov 2020-08-28 08:48:12 UTC
Git commit f8407b69774d64da841f5487cb9f231f29076ec2 by Dmitry Kazakov.
Committed on 28/08/2020 at 08:47.
Pushed by dkazakov into branch 'master'.

Fix artifacts when using Masking Brush in Subtract mode in FP color space

Masking brush should never generate negative alpha values, otherwise
weird artivacts appear when this layer (with negative alpha) blends
into the background.

M  +20   -1    libs/ui/tool/strokes/KisMaskingBrushCompositeOpFactory.cpp

https://invent.kde.org/graphics/krita/commit/f8407b69774d64da841f5487cb9f231f29076ec2