ccameron-chromium / webgpu-hdr

5 stars 1 forks source link

"Notes on analogous WebGL proposal" doesn't quite work #4

Open domenic opened 2 months ago

domenic commented 2 months ago

In particular

  gl.drawingBufferToneMapping = { mode:"extended" };

implies setting the value of an attribute to a dictionary. But Web IDL attributes cannot return dictionaries, so this would break.

You'd need either something like

gl.setDrawingBufferToneMapping({ mode: "extended" });

// now gl.getDrawinBufferToneMapping() can return a fresh dictionary each time

or

gl.drawingBufferToneMappingMode = "extended";

// and future extensions will also need to be flattened
ccameron-chromium commented 2 months ago

Thanks for the input! I'll discuss with the WebGL people about resolving this. The WebGPU API is much nicer in terms of setting these properties.