New colorsmudge engine for Krita 5.0
This branch is basically a rewritten version of the @voronwe's MR !422 (closed).
The patch implements:
- Lightness mode for the colorsmudge brush engine
- the patch also implements a framework for storing interstroke data inside layers to let the paint dry out
- Color Image and Gradient modes for the colosmudge brush engine
- Separation of Smudge Rate and Color Rate option. See this wishlist and KA-thread.
- Fix for the non-smooth lines produced by Dulling mode when painting with pierced brushes. See this wishreport and this bug
Still to be done:
-
F16 and F32 color spaces produce artifacts in Lightness mode -
Converting image colorspace U8->F32 should reset the interstroke data, not it creates weird artifacts after the conversion. -
KisOverlayPaintDeviceWrapper
should not create the overlay for non-U8 devices in non-lightness mode -
KisPrecisePaintDeviceWrapper
should be removed -
Smudge radius option is not yet ported into the strategy-based modes -
Smudge radius seems to do wrong sampling due to this commit. -
Smudge radius value is multiplied by 100 in the GUI. The fix should be backward-compatible. See this commit. -
Smudge radius should either have a GUI option or just be rewritten to fix "non-smooth lines produced by Dulling mode when painting with pierced brushes". The fix needs to weight the sampled colors by the current brush mask. -
Check if the current weighted Smudge Radius sampling algorithm can be optimized by doing some random sampling instead of the full coverage. Full coverage might be too slow for bigger brushes. -
Overlay mode is not yet available in strategy-based modes. -
Gradient and Color Image modes should be ported into strategies. -
New colorsmudge algorithm is extremely slow. It happens because all the blendind happens in U16 color space, and we have AVX/SSE optimizations only for U8 and F32 -
Reuse AlphaDarkenCompositor128
for U16 color spaces -
Reuse OverCompositor128
for U16 color spaces -
Implement SSE/AVX optimization for COMPOSITE_COPY blending mode. At least for U16 color spaces. -
Implement SSE/AVX optimization for color space scaling in KisOverlayPaintDeviceWrapper
-
-
Add dox to the new classes :) -
Check the status of Lightness and Gradient texture options and whether we can remove them. -
Overlay mode is not available for Lightness brush mode (and will never be). So it should be disabled.
Testing packages:
-
DK1 (18.03.2021)
-
DK2 (03.04.2021)
-
DK3 (15.04.2021)
-
DK4 (16.04.2021)
-
DK7 (20.04.2021)
- Win64: https://disk.yandex.ru/d/3ar1jFEbax4jNA (Windows package lacks MyPaint brushes plugin, that is a known issue)
- AppImage (with debug, slow): [skipped this time]
- AppImage (no debug, fast): https://disk.yandex.ru/d/dzj8qYjN5mFCAg
Edited by Dmitry Kazakov