Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong color space #1207

Open
tasogare3710 opened this issue Feb 4, 2022 · 1 comment
Open

Wrong color space #1207

tasogare3710 opened this issue Feb 4, 2022 · 1 comment
Labels
bug Something is broken

Comments

@tasogare3710
Copy link

tasogare3710 commented Feb 4, 2022

I DELETED something important while editing.

egui uses the sRGB color space, but when using the sRGB color space, the default framebuffer color space must be sRGB, but there is no way to reliably specify the default framebuffer color space.

In summary,

we need a reliable way to specify the default framebuffer color space, and we don't have it.


Hi,
EXT_sRGB only converts linear space and sRGB space to each other when writing to the color attachment and during blending operations, but the default framebuffer color space is implementation-dependent. Also, EXT_sRGB_write_control only specifies whether to enable or disable the conversion when EXT_sRGB is available, and does not know about the default framebuffer format. Therefore, it is necessary to either not use sRGB or add an api to specify the color space explicitly to this crate. However, if you want to add api, you need to know the color space of the default frame buffer.


GLES does not standardize EXT_sRGB_write_control, so it cannot be used in basicaly.

{GLX,WGL}_FRAMEBUFFER_SRGB_CAPABLE_ARB has no effect in some environments(OpenGL api is good, GLES api is bad, etc toooooooo!).

Implementation too buggy.

EGL 1.5 can use KHR_gl_colorspace.

Fundamentally, it is the spec issue. Since WebGL is also based on GLES, there is no similar function for {GLX,WGL}_FRAMEBUFFER_SRGB_CAPABLE_ARB, so there is nothing we can do. If we're lucky, we can create a surface with an sRGB default framebuffer with {GLX,WGL}_FRAMEBUFFER_SRGB_CAPABLE_ARB or KHR_gl_colorspace. But, sRGB is confused.

Thank you.

See Also

Additionally

I tried to provide the minimum source code to reproduce it, but I couldn't find anything solid.

It is possible to reproduce the problem in an environment that meets the following:

  1. The default framebuffer color space specified by the implementation is linear RGB.
  2. some issue with the behavior of {GLX,WGL}_FRAMEBUFFER_SRGB_CAPABLE_ARB or KHR_gl_colorspace.
@tasogare3710 tasogare3710 added the bug Something is broken label Feb 4, 2022
@tasogare3710
Copy link
Author

There are few environments that can use KHR_gl_colorspace.

Please type KHR_gl_colorspace here. The coverage is 24.4%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant