Bug 430380 - MyPaint brushes paint transparency as white when using color smudge.
Summary: MyPaint brushes paint transparency as white when using color smudge.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 4.4.2-beta1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-14 16:03 UTC by wolthera
Modified: 2020-12-15 13:02 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2020-12-14 16:03:16 UTC
SUMMARY
This is likely caused by some weird bit of maths somewhere (mypaint, is afaik, premultiplied). I thought I had caused this by switching the engine to use the precise paint device wrapper, but it also happens on high bit depths.

STEPS TO REPRODUCE
1. Select a mypaint brush with smudge+color activated.
2. Have a sketch or piece of lineart, where the lines are semi transparent.
3. Draw over the lines.

OBSERVED RESULT
The painted color is somehow brightened.

EXPECTED RESULT
The painted color is mixed with transparency appropriately.
Comment 1 wolthera 2020-12-15 13:02:33 UTC
Git commit 4e02551fdf56413452108f6cae29dde5e497850f by Wolthera van Hövell tot Westerflier.
Committed on 15/12/2020 at 13:02.
Pushed by woltherav into branch 'master'.

Fix issues with blending in the mypaint op, break mirror mode for it.

This patch replaces the manual sampling with just using the colormixop
that we have already. It removes my attempt at making compositeops work
for this engine, as that just isn't compatible with mypaint's mixing.

It does implements it's own eraser mode. It also makes sure that color
mixing works in the floating point spaces.

Because I cannot figure out how to make a fixed paintdevice for the mypaint
mask, I had to remove mirror mode.

Fixes the test, also fixes the weird whitening, also fixes the fact that
the paintop was sampling from the image projection instead of the active layer.

M  +88   -95   plugins/paintops/mypaint/MyPaintSurface.cpp
M  +1    -3    plugins/paintops/mypaint/MyPaintSurface.h
M  +-    --    plugins/paintops/mypaint/tests/data/draw_dab.png

https://invent.kde.org/graphics/krita/commit/4e02551fdf56413452108f6cae29dde5e497850f