Skip to content

Voronwe/texturingfeatures

Changed the texture application method (KisTextureProperties::apply() in kis_texture_option.cpp) to include the option of using the texture as a value or lightness map instead of just as an alpha mask. Added those options in the dropdown in kis_texture_chooser.cpp.

Test Plan

  1. Choose any existing texture brush (reptile texture is a good example)
  2. go to the texture options for the brush.
  3. In the brush options, go to the texture->pattern section, and go to options tab.
  4. Select the Texturing Mode dropdown, and choose Value or Lightness,
  5. try painting with the brush.

What to look for: In Value mode, the dark parts of the texture should be dark, and the light parts should be the selected color. In Lightness mode, the dark parts should be dark, the light parts should be light, and gray parts should be the selected color. Invert pattern option works to switch the light and dark in both modes. All of the other options should also work as expected with these two modes. Performance should be pretty close to the normal alpha mask modes (might be a slower on slower computers... I have not tested this).

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Dmitry Kazakov

Merge request reports