gpu.js icon indicating copy to clipboard operation
gpu.js copied to clipboard

Impossible to use `Int16Array` or `Int8Array` as argument or constant of kernel

Open stity opened this issue 3 years ago • 1 comments

Confused number

What is wrong?

Some TypedArray are not supported when passed as constants or as arguments and fail silently.

Where does it happen?

According to the Readme, Int16Array can be passed as inputs but they seems to be misinterpreted.

How do we replicate the issue?

I have created a JS fiddle to demonstrate issue. It uses a large choice of different TypedArray. All the resuts should be identical but it is not the case. https://jsfiddle.net/qz9824dy/7/

How important is this (1-5)?

4

Expected behavior (i.e. solution)

All the canvases should display a similar image of noise. The Uint8Array and Uint16Array results are the expected results.

Other Comments

@ludovenet

stity avatar Feb 11 '22 20:02 stity

Also Float64Array is not totally flat but probably same problem... I don't know if help

Float64Array

passariello avatar Feb 11 '22 20:02 passariello