Bug-fix release: signed typed-array arguments.
Fixed
Int8ArrayandInt16Arrayarguments (plain or viaInput) produced garbage in unsigned-precision kernels (#701). Signed arrays are transferred asFloat32Arrayinternally (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, matchingInt32Array's existing behavior. Negative values round-trip correctly on all backends.
Documentation
- The
Inputmemory layout is now explicit in the README: dimensions are[x, y, z]withxfastest-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>