Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.42 KB

File metadata and controls

43 lines (27 loc) · 1.42 KB

WebGPU texture import and copy HDR headroom parameter

Introduction

This proposal suggest a mechanism for specifying the amout of tone mapping to perform (or not) when importing HDR images and video to WebGPU textures and shaders.

This fits into the HDR on the web, the big picture proposal. It is the "red star number 3" and "red star number 4" problems in the proposal diagram.

Motivation

See related section for 2D canvas

Related non-web APIs

See related section for 2D canvas

Proposal

Copying external images

To the GPUCopyExternalImageDestInfo dictionary, add the following entry:

  partial dictionary GPUCopyExternalImageDestInfo {
    // The linear HDR headroom to tone map the source image to when
    // copying to the destination texture.
    float linearHDRHeadroom = 1;
  }

To the GPUCopyExternalImageDestInfo dictionary, add the following entry:

  partial dictionary GPUExternalTextureDescriptor {
    // The linear HDR headroom to tone map the source image to when
    // sampling from the image.
    float linearHDRHeadroom = 1;
  }

Setting this attribute to value outside of the interval [1, Infinity] shall throw an exception.