Float16 on TypedArrays, DataView, Math.hfround

Any progress on this Stage 1 proposal?

At least, IMHO, DateView#{get, set}Float16 should go ahead.

See also:

1 Like

Maybe make Float16Array optional for WebGPU just like SharedArrayBuffer?


Leo Balter (2 years ago)
I've been trying to get some traction for the feature with implementors but it's being hard to get everyone positive about this being a native implementation rather than a non-native custom API.


Float16Array is required in Canvas Floating Point Color Values.

The ColorWeb CG therefore suggests:

  1. Moving ahead with
    ColorWeb-CG/canvas_float.md at main · w3c/ColorWeb-CG · GitHub in its current form, with unorm8 and float32 as options for readback.

  2. In parallel, working on adding Float16Array to ECMAScript, and prototyping it in browsers.

  3. Specifying a "float16" enum in ImageDataColorType once implementation experience has been achieved with Float16Array. Applications can feature-detect its support in browsers by catching exceptions raised by getImageData or createImageData.