这是indexloc提供的服务,不要输入任何密码
Skip to content

copyExternalImageToTexture/importExternalTexture: Add HDR headroom parameter #5236

@ccameron-chromium

Description

@ccameron-chromium

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions