HDR Rendering on back buffer for HDR Displays

253 views
Skip to first unread message

Javi Agenjo

unread,
Jul 13, 2018, 2:57:05 PM7/13/18
to graphi...@chromium.org
Hi:

I am a researcher at the Universitat Pompeu Fabra in Barcelona, collaborating with a European Project related to HDR called HDR4EU where there are partners for HDR capture, process and display.

I posted this question in the WebGL mail list but Ken Russell invited me to post it here.

Is it possible to render to a front/back buffer of more than 8 bits per color channel?

Watching that chrome already supports HDR for video decoding I was wondering how long till we can create a WebGL context that outputs to HDR.

Right now there are displays that support 10bits per channel already commercially available and the idea is that in the next years it would become more and more common for consumers to have one.

Let me know which advances are being done and how can we help.

Cheers.


Javier Agenjo Asensio
Graphics Technology Group
Universitat Pompeu Fabra

Christopher Cameron

unread,
Jul 13, 2018, 4:01:17 PM7/13/18
to javi....@gmail.com, graphics-dev
On Fri, Jul 13, 2018 at 2:57 PM Javi Agenjo <javi....@gmail.com> wrote:
Hi:

I am a researcher at the Universitat Pompeu Fabra in Barcelona, collaborating with a European Project related to HDR called HDR4EU where there are partners for HDR capture, process and display.

I posted this question in the WebGL mail list but Ken Russell invited me to post it here.

Is it possible to render to a front/back buffer of more than 8 bits per color channel?

Yes, there is experimental high-bit-depth support for WCG and HDR. I haven't tested it lately (so it may have bitrotted), but I'll check on Monday and get back to you with instructions, if it still works.

Support is based roughly on this proposal.

Watching that chrome already supports HDR for video decoding I was wondering how long till we can create a WebGL context that outputs to HDR.

Right now there are displays that support 10bits per channel already commercially available and the idea is that in the next years it would become more and more common for consumers to have one.

The provisional HDR support doesn't do 10-bit-per-channel, but rather supports half-float extended-sRGB. This is a color space which coincides with sRGB in the range of [0, 1], but is defined for r,g,b values outside of [0,1].

The general scheme is that one specifies that the WebGL backbuffer be half-float, and then any color values written (e.g, by a shader) outside of [0, 1] are then interpreted appropriately by the compositor. If your output display is WCG, then values outside of [0, 1] allow you to draw colors outside of the sRGB gamut. If your output display is HDR, then values outside of [0, 1] allow you to draw greater-than-SDR luminance colors

All platforms currently support WCG (although the final output buffer is 8 bit). Only Windows 10 currently supports HDR display and >8 bit depth output. What platform do you have in mind?
 

Javi Agenjo

unread,
Jul 13, 2018, 5:33:27 PM7/13/18
to graphics-dev
Thanks for the info Christopher

I dont have any platform in mind right now, so we are more in the phase of gathering information about the current situation of HDR.

It would be good to know the chances of this rolling to other OS too, but I understand that you are limited by the OS support for HDR.

Cheers

sipi...@gmail.com

unread,
Jun 9, 2020, 5:58:17 PM6/9/20
to Graphics-dev
Hello!

I know this post is a few years old, but I am facing exactly the same problem. I am trying to use 10 bit image data (stored in 16 bit images) with WebGL. I assume the backbuffer must be set to support this extra bit depth.

Did you find a solution?

Many thanks in advance

Ken Russell

unread,
Jun 9, 2020, 6:00:53 PM6/9/20
to sipi...@gmail.com, Graphics-dev
The ability to request a high-bit-depth canvas backing store hasn't been fully standardized between browsers yet. Recent progress is being made in https://github.com/WICG/canvas-color-space; check the outstanding pull requests. As HDR displays are becoming more popular, it's increasingly important that the web support this feature.

-Ken


Kai Ninomiya

unread,
Jun 9, 2020, 6:40:23 PM6/9/20
to Ken Russell, sipi...@gmail.com, Graphics-dev
Just to clarify (since I'm not sure what you need): high-bit-depth canvas is only necessary if you want to output high-bit-depth final results. If you only want high-bit-depth textures within WebGL (commonly used for HDR and physically-based rendering, even with SDR output), you can use the existing WebGL texture formats (RGB10_A2, RGB16F, etc.) I don't know offhand whether it's possible to get from a 16-bit image file (e.g. 16-bit PNG) into such a format directly, but you can definitely upload plain data using tex(Sub)Image2D.

-Kai

Simon Pickles

unread,
Jun 10, 2020, 1:44:36 PM6/10/20
to Kai Ninomiya, Ken Russell, Graphics-dev
Thanks for the responses.

I'm after high bit depth final results to use with 10bit monitors.

Sounds like this will be available eventually but not yet.

Simon Pickles

unread,
Jun 12, 2020, 2:06:08 PM6/12/20
to Kai Ninomiya, Ken Russell, Graphics-dev
Reply all
Reply to author
Forward
0 new messages