Bug 432758 - Hi bitdepth gradients look weird when dithering is off.
Summary: Hi bitdepth gradients look weird when dithering is off.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Color models (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-10 20:11 UTC by wolthera
Modified: 2021-02-11 14:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
rec 2020 image with first a dithered gradient, and then a non-dithered gradient drawn on top of that. (101.78 KB, image/png)
2021-02-10 20:11 UTC, wolthera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2021-02-10 20:11:25 UTC
Created attachment 135571 [details]
rec 2020 image with first a dithered gradient, and then a non-dithered gradient drawn on top of that.

SUMMARY
After the HDR patch got introduced, gradients that are 

STEPS TO REPRODUCE
1. Make a 16bit or 32bit image.
2. Select gradient tool, turn off dithering.
3. Draw with gradient tool.

OBSERVED RESULT
For 16bit there will be 8pixel wide lines drawn vertically, for 32bit 4 pixel wide lines, inbetween the lines there's transparency. Proly an itterator somewhere that's sampling the X-axis incorrectly.

EXPECTED RESULT
The full column is filled in, like it does when you are dithering.

ASIDE
CMYK isn't working right either, I noticed it wasn't working properly before (when doing SVG gradients stuff), but now it got even more messy.

SYSTEM INFORMATION:

Krita

 Version: 5.0.0-prealpha (git c88c561)
 Languages: en_US, en, en_GB, en, nl, en_US, en
 Hidpi: true

Qt

  Version (compiled): 5.15.2
  Version (loaded): 5.15.2

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.4.0-60-generic
  Pretty Productname: KDE neon User Edition 5.20
  Product Type: neon
  Product Version: 20.04
  Desktop: KDE
Comment 1 amyspark 2021-02-11 12:00:26 UTC
It's a typo on the optimized version of the no-op dither operation (when it's both disabled *and* it also doesn't require downcasting). I'll push the fix in a few minutes.
Comment 2 amyspark 2021-02-11 14:52:18 UTC
Git commit 76f54aa2e76684399280f116f5ea9d9e322c749e by L. E. Segovia.
Committed on 11/02/2021 at 14:47.
Pushed by lsegovia into branch 'master'.

Fix same-depth dithering op skipping pixels
Related: bug 343864

M  +1    -1    libs/pigment/KisDitherOpImpl.h

https://invent.kde.org/graphics/krita/commit/76f54aa2e76684399280f116f5ea9d9e322c749e
Comment 3 amyspark 2021-02-11 14:52:34 UTC
Git commit 688e896fb35107100c66a1069a05be1ee4ddb566 by L. E. Segovia.
Committed on 11/02/2021 at 14:47.
Pushed by lsegovia into branch 'master'.

Subclass the dither operator for CMYK color spaces

Floating point CMYK colorspaces have different normalization factors
for color and alpha channels.
Related: bug 343864

M  +222  -4    libs/pigment/dithering/KisCmykDitherOpFactory.h

https://invent.kde.org/graphics/krita/commit/688e896fb35107100c66a1069a05be1ee4ddb566
Comment 4 amyspark 2021-02-11 14:52:58 UTC
Git commit a4ac9f32c2531df412daa4bb3775af960644b718 by L. E. Segovia.
Committed on 11/02/2021 at 14:47.
Pushed by lsegovia into branch 'master'.

Fix typo in dither ops for 16-bit integer CMYK
Related: bug 343864

M  +1    -1    plugins/color/lcms2engine/colorspaces/cmyk_u16/CmykU16ColorSpace.cpp

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