Bug 407238 - 100% transparency in SDR images look like white on HDR display
Summary: 100% transparency in SDR images look like white on HDR display
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: HDR (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-05 16:21 UTC by Tiar
Modified: 2019-12-11 12:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Krita file that shows the problem (461.70 KB, application/x-krita)
2019-05-05 16:21 UTC, Tiar
Details
Screenshot of the problem (91.65 KB, image/x-krita)
2019-05-05 16:23 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2019-05-05 16:21:15 UTC
Created attachment 119851 [details]
Krita file that shows the problem

SUMMARY
100% Opacity in SDR sRGB 8bit ineger images look like white on HDR images. Semi-transparent pixels have visible checkerboard, but fully transparent pixels are fully white.


STEPS TO REPRODUCE
1. Make a new image sRGB 8bit/integer, sRGB built-in.
2. Erase part of the background if you have it (and for your eyes' sake, better have one). (Make sure the canvas background color is transparent).
3. Paint with semi-transparent black.

OBSERVED RESULT
Transaparent pixels look white (the very bright, HDR version of white).
Semi-transparent pixels have visible checkerboard.

EXPECTED RESULT
Transparent pixels have visible checkerboard, too, and don't have any HDR-looking colors.


SOFTWARE/OS VERSIONS
Krita version: 4.2.0-pre-alpha (git fb08951)
Windows: 10
Qt Version: 5.12.2
GPU Acceleration: auto
  Memory: 16191 Mb
  Number of Cores: 12
  Swap Location: C:/Users/Agata/AppData/Local/Temp
 
  Vendor:  "Google Inc." 
  Renderer:  "ANGLE (Intel(R) UHD Graphics 630 Direct3D11 vs_5_0 ps_5_0)" 
  Version:  "OpenGL ES 3.0 (ANGLE 2.1.0.57ea533f79a7)" 
  Shading language:  "OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0.57ea533f79a7)" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 10, greenBufferSize 10, blueBufferSize 10, alphaBufferSize 2, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::bt2020PQColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 10, greenBufferSize 10, blueBufferSize 10, alphaBufferSize 2, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 0, colorSpace QSurfaceFormat::bt2020PQColorSpace, profile  QSurfaceFormat::NoProfile) 
     Version: 3.0
     Supports deprecated functions false 
     is OpenGL ES: true 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsAngleD3D11: true 
  isQtPreferAngle: true
Comment 1 Tiar 2019-05-05 16:23:55 UTC
Created attachment 119852 [details]
Screenshot of the problem

The screenshot shows the problem even though it's not HDR; the area under the thin black line is fully transparent, except for the part where the semi-transparent black stroke is painted.
Comment 2 Tiar 2019-05-05 17:17:28 UTC
For the record, Krita version: 4.2.0-pre-alpha (git 0a552f7) that I got from the website (so should contain the newest patched Qt and so on) doesn't work either.

It looks like the OpenGL bug that appeared some time ago, I thought it got fixed though. If not, maybe it's the same problem.
Comment 3 Tiar 2019-10-11 14:21:22 UTC
Git commit 32ab64c90109672c6b363c996d236a203516ab95 by Agata Cacko.
Committed on 11/10/2019 at 14:20.
Pushed by tymond into branch 'master'.

Fix transparency checkers looked white on HDR display

On HDR displays before this commit transparency checkers
looked white because it was just a SDR image showed in
full HDR glory. Hence both light and darker light grey
checkers looked just bright white, no different from each
other, even though in fact their colors were different.
This commit fixes this behaviour by converting the colors
properly from SDR/sRGB to Rec2020-pq (or other display format)
as it should be done.
Related: bug 406698

M  +24   -14   libs/ui/opengl/kis_opengl_image_textures.cpp

https://invent.kde.org/kde/krita/commit/32ab64c90109672c6b363c996d236a203516ab95
Comment 4 Tiar 2019-12-11 12:51:32 UTC
Git commit 275cf87b66d93cd5ab13b9ea87ac920508666cab by Agata Cacko.
Committed on 10/12/2019 at 18:53.
Pushed by tymond into branch 'krita/4.2'.

Fix transparency checkers looked white on HDR display

On HDR displays before this commit transparency checkers
looked white because it was just a SDR image showed in
full HDR glory. Hence both light and darker light grey
checkers looked just bright white, no different from each
other, even though in fact their colors were different.
This commit fixes this behaviour by converting the colors
properly from SDR/sRGB to Rec2020-pq (or other display format)
as it should be done.
Related: bug 406698

M  +24   -10   libs/ui/opengl/kis_opengl_image_textures.cpp

https://invent.kde.org/kde/krita/commit/275cf87b66d93cd5ab13b9ea87ac920508666cab