Repository navigation
Conversation
greggman
left a comment
There was a problem hiding this comment.
lgtm
I'd really like to see an article about what each part of HDR/etc does
There's
- some CSS query
- the format of the canvas ('rgba16float')
- the colorspace of the canvas
- this
toneMapping.mode - other?
My impression is
-
some CSS query = can the display the page is on show HDR
-
canvas format = the bit depth of the canvas?
-
colorSpace = how the data in the canvas is interpreted
This suggests to me that an rgba8unorm canvas can display colors > 1 with some color space that scale the 0 to 1 values in the canvas to colors > 1.0.
rgba16floatalready supports values > 1.0 so I'd expectcolorSpacehere to define what those values mean -
toneMapping.modeno idea what this does currently.
More than getting an explanation here it'd be great to see an article on web.dev or something that explained all of this and detailed in grid the result of all of the combinations of these settings.
|
Agree it would be really nice to have an article! Some spot-answers:
Yes, and this can be used for SDR as well - "rgba16float"+"srgb" can represent SDR colors outside the sRGB gamut.
In principle yes, but there are only two color space options ("srgb" and "display-p3") and neither of them does this. IMO it's unlikely any color space would do this. (Though I will point out the hypothetical XDR formats (#4108) that are "norm" (fixed-point) formats that can represent values outside 0-1.)
I think https://gpuweb.github.io/gpuweb/#gpucanvastonemappingmode is a pretty good explanation, is there anything you think needs further explanation there? (aside from expanding it into a more digestible article format) |
|
FYI I'll start working on a "WebGPU & HDR" blog post for web developers. |
Assuming we land gpuweb/gpuweb#4922, `toneMapping` will be optional in practice until all browsers implement it.
Co-authored-by: Kelsey Gilbert <[email protected]>
|
What's the status of this PR? Shall we merge? |
|
It should be consistent with what Kelsey and I discussed, but @kdashg could you re-review? |
|
(the only significant change after your suggestions was that last commit: f5b2ca2) |
kelsey wrote almost all of what needed to be reviewed so it's OK if she doesn't re-review
GPU Web WG 2024-10-29/30 Mountain View F2F
|
This PR addresses #4828 (comment) and supersedes #4909