Skip to content

Color Image, Lightness Map, and Gradient Map brush-tip support for Smudge Engine

Peter Schatz requested to merge voronwe/krita:voronwe/smudgefeatures into krita/4.3

This patch adds support for Color Image, Lightness Map, and Gradient Map modes to the smudge engine. Prior to this, the smudge engine treats brush tips as an alpha mask only, regardless of what type of brush tip it is. With this patch, Alpha Mask brush tips are handled exactly as they were before (so existing brushes should still work exactly as expected). However, if a different mode is chosen, the smudge engine gets the brush tip as it would be used in the pixel engine, and mixes the background with it based on the chosen settings. These settings (smudge length, color rate, dulling/smearing mode, and smear alpha) have the same effects as in mask mode, except that Color Rate refers to how much of the pixel engine version of the brush-tip is used. The exact method of mixing is a bit different, but should be just as performant (if not faster).

This does not apply Lightness to the smudging (copied background). This means there is no impasto effect if Color Rate is 0%, but it also means there is no issue with lightness buildup (repeated brushing over a spot causing lightness variations to build up to just white/black). I might add this feature in the future, but because of the build-up issues and the performance hit from applying lightness a second time, I'm leaving it out for now.

Edited by Peter Schatz

Merge request reports

Loading