-
Notifications
You must be signed in to change notification settings - Fork 313
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 HDR settings to Particles sample #432
Conversation
c738625
to
a380fa4
Compare
a380fa4
to
df78a48
Compare
@ccameron-chromium Please have a look as well |
df78a48
to
94bef95
Compare
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.
I think adding a HDR sample is great but I wonder if the particle example is a good example for it vs some dedicated sample? How will people know to go look at "particles" (guess you could rename it particles(HDR)?)
Also, I couldn't see any difference at a glance. I ran with
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --use-data-dir=$T/delme-canray-6933 --enable-unsafe-webgpu --enable-webgpu-developer-features --enable-blink-features=WebGPUHDR
So it makes me wonder if rather than a toggle, whichever HDR sample we end up with (could be this one) shows 2 canvases. One HDR, one not, side by side. Then, that they are different would stick out?
I've added the HDR bit to make it clearer. Thanks for the suggestion!
I tried your command line and it works great on the Built-in Liquid Retina XDR Display of my Apple M1 Pro device. When plugged to an external non-HDR display, there's no difference as the display doesn't support HDR at all as expected. Note that you only need
I think the particles sample really shines with HDR. Traditional HDR demos like https://webkit.org/blog-files/color-gamut/ are "okay" to understand what is HDR but I think the webgpu-samples should focus on how the WebGPU API works in regards to HDR with |
FYI I've just added a warning if the display is not HDR compatible to set user's expectations. |
Just tried it out on a MBP - works great! 🎉 |
I've tested Android as well and it works great there also! |
I'm using |
Oh interesting, I reloaded the page and the 'display not compatible' banner disappeared, looks like the detection works |
Is there a way to detect in JavaScript whether HDR canvas is supported instead of using this media query? |
Apologies for the delay but I looked around and didn't see anything conclusive. Could we check for Or should one be able to use HDR in WebGPU without an higher bit depth canvas (e.g., R10G10B10A2 type formats)? |
And I wonder if I should leave it as is. |
It’s certainly fine with me to leave as-is 👍 |
Results:
--enable-blink-features=WebGPUHDR