-
Notifications
You must be signed in to change notification settings - Fork 344
Description
HDR images can be drawn an infinite number of ways, often unrepresentable as a single bitmap (e.g, gainmap images).
There exists a general problem wherein an HDR image must be put into pixels in a buffer. At the moment the HDR image is put into pixels in a buffer, this infinite number of ways of representing it must be collapsed into a single representation.
This problem exists in the form of drawImage for a CanvasRenderingContext2D.
This explainer and this spec issue propose solving this problem by adding a HDR headroom parameter to CanvasRenderingContext2D.
This problem also exists in the form of copyExternalImageToTexture and importExternalTexture in WebGPU.
This issue proposes to apply the same solution from CanvasRenderingContext2D to WebGPU by adding an HDR headroom parameter to GPUCopyExternalImageDestInfo and GPUExternalTextureDescriptor, indicating the amount of tone mapping to perform either when copying the source or after sampling the source.
See this explainer for details.