Skip to content

2.19.3

Latest

Choose a tag to compare

@fuzzie360 fuzzie360 released this 24 Jul 00:57

Bug-fix release: signed typed-array arguments.

Fixed

  • Int8Array and Int16Array arguments (plain or via Input) produced garbage in unsigned-precision kernels (#701). Signed arrays are transferred as Float32Array internally (the unsigned decode can't represent negatives), but the texture was still sized and decoded at their original element width — reading float32 bytes as int8/int16 pairs. They now use the transfer type's width, matching Int32Array's existing behavior. Negative values round-trip correctly on all backends.

Documentation

  • The Input memory layout is now explicit in the README: dimensions are [x, y, z] with x fastest-varying — input(flat, [X, Y, Z]) is equivalent to a nested [Z][Y][X] array. (The other half of #701's confusion.)

Installing

npm install gpu.js@2.19.3
<script src="https://unpkg.com/gpu.js@2.19.3/dist/gpu-browser.min.js"></script>