This proposal suggests a mechanism for specifying the amout of tone mapping to perform (or not) when importing HDR images and video to WebGL textures.
This fits into the HDR on the web, the big picture proposal. It is the "red star number 2" problem in the proposal diagram.
See related section for 2D canvas
See related section for 2D canvas
To the WebGLRenderingContextBase interface, add the following attribute:
partial interface WebGLRenderingContextBase {
// The linear HDR headroom to tone map the source image to when
// copying to the destination texture using tex[Sub]Image.
attribute float unpackLinearHDRHeadroom = 1;
}Note the similarity between this attribute and the unpackColorSpace attribute.
This attribute shall be ignored in all situations where the unpackColorSpace is ignored (when UNPACK_COLORSPACE_CONVERSION_WEBGL is NONE).
This attribute may be set to Infinity to indicate that the "maximum headroom" version is desired.
Setting this attribute to value outside of the interval [1, Infinity] shall have no effect.
Testing should use the same set of input images used in the related section for 2D canvas.