-
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
Add support for Chrome HDR mode for WebGPU #6980
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming is becoming a little confusing since we can already render to HDR backbuffer.
How can we already render to HDR backbuffer? |
SHADER_FORWARDHDR |
ahh that .. that was removed in v2 .. confusion solved ;) |
yeah this bit, confusing |
Only mentioning so we can perhaps make the difference explicit in docs. Though it may not be necessary since as you say, it's gone from v2.0. |
@@ -104,6 +104,14 @@ class GraphicsDevice extends EventHandler { | |||
*/ | |||
isWebGL2 = false; | |||
|
|||
/** | |||
* True if the back-buffer is using HDR format, which means that the browser will display the | |||
* rendered images in high dynamic range mode. This is true if the displayFormat is set to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link displayFormat
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we cannot link to options.displayFormat directly I think, but I link a function accepting this options object.
kewl, this looks so much nicer than my hack from a while back |
Fixes #6975
This adds support for HDR displays for WebGPU (new in Chrome 129).
There is a new public constant that can be used to request HDR mode:
DISPLAYFORMAT_HDR
// this is now publicalso, new API to test if HDR is active:
GraphicsDevice.isHdr
Notes: