Bug 445672 - Color banding on openGL canvas view when output format is set to Rec.2020(10 bit)
Summary: Color banding on openGL canvas view when output format is set to Rec.2020(10...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: OpenGL Canvas (show other bugs)
Version: 4.4.8
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-18 04:43 UTC by 2376112839
Modified: 2022-02-16 11:02 UTC (History)
2 users (show)

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


Attachments
Screenshot: color banding at canvas (172.72 KB, image/png)
2021-11-18 04:45 UTC, 2376112839
Details
The gradient png file used in the screenshot, which is the gradient supposed to look like (783.28 KB, image/png)
2021-11-18 04:48 UTC, 2376112839
Details
Color banding screenshot at krita 5.0.2 (553.15 KB, image/png)
2022-01-24 05:02 UTC, 2376112839
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 2376112839 2021-11-18 04:43:49 UTC
SUMMARY
Color gradient at canvas becomes color banding and stair-stepping-like when output format is set to Rec. 2020 PQ (10 bit) and Canvas  Graphic Acceleration is enabled.
When the color gradient is export to png file and viewed at other software, it retains smooth which it is supposed to be.  Turning off Canvas Graphic Acceleration when Rec. 2020 PQ (10 bit) is on would make color gradient smooth, but it is slow and raises some rendering flaws. 

STEPS TO REPRODUCE
1.  At Display-HDR settings-Preferred Output Format,  chose Rec. 2020 PQ (10 bit).
2. Reboot Krita.
3. Create a new file. (color depth and icc profile keep default)
4. Paint some color gradient on canvas.

OBSERVED RESULT
Color banding and stair-stepping

EXPECTED RESULT
Color gradient should be smooth.

SOFTWARE/OS VERSIONS
Windows 10

ADDITIONAL INFORMATION
GPU: It can be reproduced on my nvidia 1650, 3050 laptop and amd integated GPU on 5800U, with latest driver.
Screen: It can be reproduced on my HDR400 capable screen and normal 8bit laptop screen.
I have tried changing file color depth and icc profile, but banding still reproduced.
Comment 1 2376112839 2021-11-18 04:45:10 UTC
Created attachment 143679 [details]
Screenshot: color banding at canvas
Comment 2 2376112839 2021-11-18 04:48:24 UTC
Created attachment 143680 [details]
The gradient png file used in the screenshot, which is the gradient supposed to look like
Comment 3 wolthera 2022-01-08 16:24:12 UTC
Hi, this should be fixed with Krita 5.0, as we made the gradients wide-gamut and high-bit depth aware. Can you try to see if it's still happening?
Comment 4 Bug Janitor Service 2022-01-23 04:37:34 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 2376112839 2022-01-24 05:00:49 UTC
Sorry for late reply. I repeated the same test at krita 5.0.2 with the same configuration and gradient file, but color banding still exists, as attachment 3 [details] shows.
Comment 6 2376112839 2022-01-24 05:02:08 UTC
Created attachment 145831 [details]
Color banding screenshot at krita 5.0.2
Comment 7 2376112839 2022-01-24 05:11:09 UTC
(In reply to 2376112839 from comment #5)
> Sorry for late reply. I repeated the same test at krita 5.0.2 with the same
> configuration and gradient file, but color banding still exists, as
> attachment 3 [details] shows.

It is attachment 145831 [details]
Comment 8 Alvin Wong 2022-02-11 14:35:56 UTC
Please don't change the version field. It should indicate the first version the bug was reported on.
Comment 9 Alvin Wong 2022-02-11 14:36:32 UTC
The merge request https://invent.kde.org/graphics/krita/-/merge_requests/1327 may unintentionally fix this bug, but I do not have the hardware to confirm.
Comment 10 Bug Janitor Service 2022-02-15 13:17:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1336
Comment 11 Alvin Wong 2022-02-16 10:51:05 UTC
Git commit 782fc72d7aa66656db6a1c28c983025a9b5e17e1 by Alvin Wong.
Committed on 16/02/2022 at 10:50.
Pushed by alvinwong into branch 'master'.

Fix banding when rendering canvas in HDR mode

Set the proper 16-bit RGBA texture format for the canvas FBO when HDR
rendering mode is active.

M  +7    -1    libs/ui/opengl/KisOpenGLCanvasRenderer.cpp

https://invent.kde.org/graphics/krita/commit/782fc72d7aa66656db6a1c28c983025a9b5e17e1
Comment 12 Alvin Wong 2022-02-16 11:02:40 UTC
Git commit 2d730ebdb7c91d463836f0767a130eed6bb1609f by Alvin Wong.
Committed on 16/02/2022 at 11:02.
Pushed by alvinwong into branch 'krita/5.0'.

Fix banding when rendering canvas in HDR mode

Set the proper 16-bit RGBA texture format for the canvas FBO when HDR
rendering mode is active.
(cherry picked from commit 782fc72d7aa66656db6a1c28c983025a9b5e17e1)

M  +7    -1    libs/ui/opengl/kis_opengl_canvas2.cpp

https://invent.kde.org/graphics/krita/commit/2d730ebdb7c91d463836f0767a130eed6bb1609f