diff --git a/specs/latest/1.0/index.html b/specs/latest/1.0/index.html
index 074903f43..e7b4a7730 100644
--- a/specs/latest/1.0/index.html
+++ b/specs/latest/1.0/index.html
@@ -378,6 +378,11 @@
+ When presenting the drawing buffer, the pixel values in the drawing buffer shall be
+ converted from the color space of the drawing buffer to the color space of the screen, and
+ then shall be tone mapped as specified by drawingBufferToneMapping
.
+
While it is sometimes desirable to preserve the drawing buffer, it can cause significant
@@ -443,6 +448,46 @@
generate
INVALID_VALUE
.
If allocation fails, generate
OUT_OF_MEMORY
.
+
+
+
undefined drawingBufferToneMapping(WebGLToneMapping toneMapping);
+
+
+ The value of toneMapping.mode
indicates how the drawing buffer shall be
+ tone mapped by the HTML page compositor when presented.
+
+
+
+ The allowed values are:
+
+ -
+
+ standard
+
+
+ All colors that are inside of the standard dynamic range of the screen shall not
+ be changed, and all colors that outside of the standard dynamic range of the
+ screen shall be projected to the standard dynamic range of the screen.
+
+
+ This projection is often accomplished by clamping color values in the color
+ space of the screen to the [0, 1] interval.
+
+
+ extended
+
+
+ All colors that are inside of the extended dynamic range of the screen shall not
+ be changed, and all colors that outside of the extended dynamic range of the
+ screen shall be projected to the extended dynamic range of the screen.
+
+
+ This projection is often accomplished by clamping color values in the color
+ space of the screen to the interval of values that the screen is capable of
+ displaying, which may include values greater than 1.
+
+
+
@@ -780,6 +825,15 @@
Types
// The power preference settings are documented in the WebGLContextAttributes
// section of the specification.
enum WebGLPowerPreference { "default", "low-power", "high-performance" };
+
+enum WebGLToneMappingMode {
+ "standard",
+ "extended",
+};
+
+dictionary WebGLToneMapping {
+ WebGLToneMappingMode mode = "standard";
+};
@@ -1794,6 +1848,7 @@
object? getExtension(DOMString name);
undefined drawingBufferStorage(GLenum sizedFormat, unsigned long width, unsigned long height);
+ undefined drawingBufferToneMapping(WebGLToneMapping toneMapping);
undefined activeTexture(GLenum texture);
undefined attachShader(WebGLProgram program, WebGLShader shader);
diff --git a/specs/latest/1.0/webgl.idl b/specs/latest/1.0/webgl.idl
index 919c49ea7..7a0568adb 100644
--- a/specs/latest/1.0/webgl.idl
+++ b/specs/latest/1.0/webgl.idl
@@ -44,6 +44,14 @@ typedef unrestricted float GLclampf;
// section of the specification.
enum WebGLPowerPreference { "default", "low-power", "high-performance" };
+enum WebGLToneMappingMode {
+ "standard",
+ "extended",
+};
+
+dictionary WebGLToneMapping {
+ WebGLToneMappingMode mode = "standard";
+};
dictionary WebGLContextAttributes {
boolean alpha = true;
@@ -553,6 +561,7 @@ interface mixin WebGLRenderingContextBase
object? getExtension(DOMString name);
undefined drawingBufferStorage(GLenum sizedFormat, unsigned long width, unsigned long height);
+ undefined drawingBufferToneMapping(WebGLToneMapping toneMapping);
undefined activeTexture(GLenum texture);
undefined attachShader(WebGLProgram program, WebGLShader shader);