ColorWeb-CG icon indicating copy to clipboard operation
ColorWeb-CG copied to clipboard

Application tone mapping in HDR Canvas API

Open donmccurdy opened this issue 2 years ago • 3 comments

In the use cases and examples described by the "Canvas High Dynamic Range" proposal, I'm mostly reading descriptions of how to display existing HDR content, such as images and video. Use of the proposal for image formation in computer-generated imagery (CGI) and physically-based rendering (PBR) is not explicitly discussed. Consider a mixed 3D scene with various objects and light sources, resulting in an image that benefits from wider dynamic range.

Is this roughly an intended workflow for such applications?

  1. Application render pass outputs pixels to frame buffer in open domain [0, ∞], float-16, Linear-sRGB1
  2. Application tone mapping pass applies a view transform (e.g. Filmic), output is again open domain [0, ∞], float-16, Linear-sRGB, with high intensity values significantly compressed
  3. Depending on device / platform capabilities:
    • a. For SDR display, output to canvas with mode = 'default', pixel values in closed domain [0,1] sRGB
    • b. For HDR display, output to canvas with mode = 'extended', sRGB, pixel values in open domain [0, ∞] sRGB

Does this seem correct? In particular, I assume such an application will often want to avoid having a generic tone map performed by the platform or display device, as in the rec2100-pq and rec2100-hlg cases? Is it possible to output to a wider color gamut like P3, without enabling one of these two HDR color spaces? I only see extended sRGB discussed here, not extended Display P3, and do not know if there are active plans to bring Display P3 to WebGL.


1 Definitions:

  • Linear-sRGB: Linear / Rec. 709 / D65
  • sRGB: sRGB / Rec. 709 / D65

donmccurdy avatar Jun 16 '22 15:06 donmccurdy