-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Issues and possible improvements to transparency rendering #5943
Comments
its not necessarily srgb though right? https://ccameron-chromium.github.io/webgl-examples/p3.html. but I guess this would actually help here as we're letting the hardware do it |
True, but until we implement #5287, it's sRGB. Handling P3 is part of that issue. |
Related Chromium issue I created exploring the sRGB in WebXR: https://partnerissuetracker.corp.google.com/issues/352345526?pli=1 |
conclusion regarding WebXR, from the issue above: The mechanism for specifying a texture format for WebXR is the Layers API, which is not yet supported by Chrome but does have support in the Meta Quest browser. WebXR is not compatible with buffers allocated by drawingBufferStorage. |
#6838 implements support for sRGB framebuffer on WebGPU, but also support for sRGB render target on all platforms (just not the default framebuffer on WebGL), allowing linear rendering. |
Update on this.
|
The default framebuffer WebGL uses for rendering is RGB(A)8 buffer. The values written to it are expected to be in the display color space, which typically means sRGB. As this framebuffer is created by the canvas, we have no control over it, and it is not created with sRGB (EXT_sRGB) flag. Meaning the shader writing to it needs to manually encode values from linear to sRGB space.
LDR rendering
HDR rendering
References:
KhronosGroup/WebGL#2474
mrdoob/three.js#23019
https://stackoverflow.com/questions/51032480/how-do-you-implement-a-gamma-correct-workflow-in-webgl2
https://groups.google.com/g/angleproject/c/5ITMg4_m8Ug
#5287
The text was updated successfully, but these errors were encountered: