When passing an input using the Input class, a texture can be mapped to memory in strange ways, resulting in different outputs for essentially the same inputs.
I expect the input tool for passing data to vary most quickly with the first index and least quickly with the last index.
In my example, output images should be the same: a single blue cell and 3 black cells.
Other Comments
This bug affects multiple browsers on my machine.
It seems selecting mode: 'cpu' makes Int16Array behave as a Float32Array-backed input, though still differently from the nested array, not using input.
This was especially confusing to me because the index order of the input array is not well-documented. It should probably be explicitly stated how the indices map to the memory values. It might be nice to make the per-axis memory strides into an exposed property on Input objects and/or accessor methods to make it simpler to manipulate their data.
What is wrong?
When passing an input using the
Input
class, a texture can be mapped to memory in strange ways, resulting in different outputs for essentially the same inputs.Where does it happen?
On my Linux machine running Ubuntu 20.04
How do we replicate the issue?
Here is a small reproducible codepen: https://codepen.io/rotu-the-bold/pen/WNpmVWm
How important is this (1-5)?
4
Expected behavior (i.e. solution)
I expect the
input
tool for passing data to vary most quickly with the first index and least quickly with the last index.In my example, output images should be the same: a single blue cell and 3 black cells.
Other Comments
This bug affects multiple browsers on my machine.
It seems selecting
mode: 'cpu'
makesInt16Array
behave as aFloat32Array
-backedinput
, though still differently from the nested array, not usinginput
.This was especially confusing to me because the index order of the
input
array is not well-documented. It should probably be explicitly stated how the indices map to the memory values. It might be nice to make the per-axis memory strides into an exposed property onInput
objects and/or accessor methods to make it simpler to manipulate their data.