Intent to Ship: WebGPU extended range (HDR) support

356 views
Skip to first unread message

Christopher Cameron

unread,
Jul 16, 2024, 10:19:53 AMJul 16
to blink-dev

Hello blink-dev! This is the first feature from HDR canvas work that is ready to ship. It has been split off and reduced in scope from this wider feature.


Contact emails

ccam...@chromium.org

Explainer

None

Specification

https://www.w3.org/TR/webgpu/#gpucanvastonemappingmode

Design docs


https://github.com/ccameron-chromium/webgpu-hdr/blob/main/EXPLAINER.md

Summary

Adds tone mapping parameters to the WebGPU canvas configuration, and adds options of "standard" (the current behavior of restricting content to the SDR range of the display) as the default, and "extended" (not imposing this restriction) as a new behavior. This allows WebGPU content to use the full range of a display.



Blink component

Blink>WebGPU

Search tags

WebGPUHDRCanvas

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None. This feature has been developed with and reviewed by representatives of Mozilla and WebKit, and maps to mature APIs present on all platforms (except ChromeOS, where support is coming soon).



Gecko: Positive (https://github.com/gpuweb/gpuweb/pull/4500) Approval does not automatically imply positive signal for Mozilla, but approver communicated that it does here (can file for signal if requested).

WebKit: Positive (https://github.com/gpuweb/gpuweb/pull/4500) Approval implies positive signal for Safari, in WebGPU WG.

Web developers: Positive (https://github.com/gpuweb/gpuweb/issues/4239#issuecomment-1935112593) Several requests have been made for this feature.

Other signals: PR (https://github.com/gpuweb/gpuweb/pull/4500) reviewed by kdashg at Mozilla and mwyrzykowski at WebKit

Ergonomics

This maps directly to the platform APIs that are used for HDR video and image rendering, and should require almost no additional work to support. On some platforms, this maps directly to the exact underlying API, while on other platforms some conversion is required.



Activation

This can be used immediately by developers.



Security

This introduces no new security or privacy issues.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None. WebView does not current support this (because it does not support HDR images), but the support for both features will come simultaneously.



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

No

ChromeOS platform support for HDR images (and canvas) has not been completed.



Is this feature fully tested by web-platform-tests?

No

Issues with testing the rendering of HDR (images, video, and now also canvas) is discussed at: https://github.com/web-platform-tests/wpt/issues/44320



Flag name on chrome://flags

None

Finch feature name

WebGPUHDR

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/333967627

Adoption expectation

Feature is currently being used by specific partners in prototypes. It is also used in internal features.

Sample links


https://ccameron-chromium.github.io/webgpu-hdr/example.html

Estimated milestones

Shipping on desktop128
Shipping on Android128
Shipping on WebView128


Anticipated spec changes

This was split off from a larger "HDR for all HTMLCanvasElement" spec. This feature is planned to be added to WebGL soon. Additional tone mapping modes are planned to be added as they are published.

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6196313866895360?gate=6588754021318656

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/S609KGTkSSk/m/1EW4CWn3BgAJ

Christopher Cameron

unread,
Jul 16, 2024, 11:13:44 AMJul 16
to blink-dev
On Tue, Jul 16, 2024 at 10:19 AM Christopher Cameron <ccam...@google.com> wrote:

Hello blink-dev! This is the first feature from HDR canvas work that is ready to ship. It has been split off and reduced in scope from this wider feature.


FYI, the wider-scoped feature had a TAG review last year here.

Domenic Denicola

unread,
Jul 16, 2024, 9:41:26 PMJul 16
to Christopher Cameron, blink-dev
This looks like a nice straightforward feature. Just one potential spec issue...

On Tue, Jul 16, 2024 at 11:19 PM 'Christopher Cameron' via blink-dev <blin...@chromium.org> wrote:

Hello blink-dev! This is the first feature from HDR canvas work that is ready to ship. It has been split off and reduced in scope from this wider feature.


Contact emails

ccam...@chromium.org

Explainer

None

Specification

https://www.w3.org/TR/webgpu/#gpucanvastonemappingmode

I found the spec for the toneMapping member a bit confusing. I filed https://github.com/gpuweb/gpuweb/issues/4756 to ask questions about potentially getting it clarified.
 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGnfxj_Pss5f2sXWHB%2BaxcqTfxxRBJctZ18xrv2Gd0Q-BaDGvg%40mail.gmail.com.

Domenic Denicola

unread,
Jul 16, 2024, 9:54:07 PMJul 16
to Domenic Denicola, Christopher Cameron, blink-dev
On Wed, Jul 17, 2024 at 10:41 AM Domenic Denicola <dom...@chromium.org> wrote:
This looks like a nice straightforward feature. Just one potential spec issue...

On Tue, Jul 16, 2024 at 11:19 PM 'Christopher Cameron' via blink-dev <blin...@chromium.org> wrote:

Hello blink-dev! This is the first feature from HDR canvas work that is ready to ship. It has been split off and reduced in scope from this wider feature.


Contact emails

ccam...@chromium.org

Explainer

None

Specification

https://www.w3.org/TR/webgpu/#gpucanvastonemappingmode

I found the spec for the toneMapping member a bit confusing. I filed https://github.com/gpuweb/gpuweb/issues/4756 to ask questions about potentially getting it clarified.

I also filed this issue on the potential future WebGL extension. It doesn't block this intent but there's a chance it might cause you to reconsider the design so I wanted to note it here. https://github.com/ccameron-chromium/webgpu-hdr/issues/4

Domenic Denicola

unread,
Jul 17, 2024, 10:09:16 PMJul 17
to blink-dev, Domenic Denicola, blink-dev, Christopher Cameron
On Wednesday, July 17, 2024 at 10:41:26 AM UTC+9 Domenic Denicola wrote:
This looks like a nice straightforward feature. Just one potential spec issue...

On Tue, Jul 16, 2024 at 11:19 PM 'Christopher Cameron' via blink-dev <blin...@chromium.org> wrote:
Hello blink-dev! This is the first feature from HDR canvas work that is ready to ship. It has been split off and reduced in scope from this wider feature.
Contact emailsccam...@chromium.org

ExplainerNone

I found the spec for the toneMapping member a bit confusing. I filed https://github.com/gpuweb/gpuweb/issues/4756 to ask questions about potentially getting it clarified.

Upon further discussion in the issue, it became clear that I was confused because of my lack of familiarity with graphics / WebGPU APIs, and not because of anything inherently contradictory in the spec. (There's also a minor wordsmithing issue being discussed, but that's not blocking.)

So, LGTM1.
 
 


Design docs
https://github.com/ccameron-chromium/webgpu-hdr/blob/main/EXPLAINER.md

Summary

Adds tone mapping parameters to the WebGPU canvas configuration, and adds options of "standard" (the current behavior of restricting content to the SDR range of the display) as the default, and "extended" (not imposing this restriction) as a new behavior. This allows WebGPU content to use the full range of a display.



Blink componentBlink>WebGPU

Search tagsWebGPUHDRCanvas

TAG reviewNone

TAG review statusNot applicable
Adoption expectationFeature is currently being used by specific partners in prototypes. It is also used in internal features.


Sample links
https://ccameron-chromium.github.io/webgpu-hdr/example.html

Estimated milestonesShipping on desktop128Shipping on Android128Shipping on WebView128

Anticipated spec changesThis was split off from a larger "HDR for all HTMLCanvasElement" spec. This feature is planned to be added to WebGL soon. Additional tone mapping modes are planned to be added as they are published.

Link to entry on the Chrome Platform Statushttps://chromestatus.com/feature/6196313866895360?gate=6588754021318656

Links to previous Intent discussionsIntent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/S609KGTkSSk/m/1EW4CWn3BgAJ

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Vladimir Levin

unread,
Jul 18, 2024, 9:44:55 AMJul 18
to Domenic Denicola, blink-dev, Christopher Cameron
LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/af37791a-9371-4db3-9be9-ebfa65dab8abn%40chromium.org.

Mike Taylor

unread,
Jul 18, 2024, 10:12:51 AMJul 18
to Vladimir Levin, Domenic Denicola, blink-dev, Christopher Cameron

Christopher Cameron

unread,
Jul 19, 2024, 12:37:19 PMJul 19
to Mike Taylor, Vladimir Levin, Domenic Denicola, blink-dev
Thanks all!

Larry LACa

unread,
Jul 19, 2024, 1:47:28 PMJul 19
to blink-dev, Christopher Cameron, vmp...@chromium.org, dom...@chromium.org, mike...@chromium.org
Christopher: Please update the main HDR feature to indicate this work (and any other pieces you're aware of).
Thx
Reply all
Reply to author
Forward
0 new messages