The WebGPU contet
A buffer describing the grid: - gridMin: The min-point of the grid - gridMax: The max-point of the grid - gridBinSize: The xyz sizes of a grid bin/cell Together, these values describe an axis-aligned box, subdivided uniformly into bins/cells
The input buffers: - in_perElem_elemData: A buffer describing each element/atom Each element/atom occupies 4x float32 places in the buffer The first 3 places describe the element/atom's 3D coordinates (XYZ) The 4th places describes some other data (not used in this shader) - out_perBin_elemCount: An output buffer (per grid bin/cell) that will contain the number of atoms assigned to this grid bin/cell - out_perElem_binId: An output buffer that will contain (per element/atom) the index of the cell that this element/atom lies in
The output buffers and offsets (useful for debugging)
Makes it so that, in future executions of this shader, no elements/atoms will be transformed. See setTransform() to activate transformation of elements/atoms
Makes it so that, in future executions of this shader, a set of elements/atoms will be transformed by a matrix The function removeTransform() deactivates this feature
The matrix that will be used to transform the set of elements/atoms
The index of the first element/atom that will be transformed by the 'transform' matrix
The index PLUS ONE of the last element/atom to be transformed by the 'transform' matrix i.e.: The index of the first element/atom AFTER 'elemIdStart' that will NOT be transformed by the 'transform' matrix
Generated using TypeDoc
Assigns elements/atoms to a bin/cell in a grid Additionally, it counts how many elements/atoms each bin/cell contains
It may also apply a transform operation to a set of atoms through the function setTransform. To deactivate this, see the function removeTransform
See constructor for more details