Skip to content

createFloatDataTexture() ​

ts
function createFloatDataTexture(
  data: number[] | Float32Array<ArrayBufferLike>,
): DataTextureParams;

Creates texture parameters for a float data texture. Useful for passing arbitrary numerical data to shaders.

Example: particles

Parameters ​

data ​

number[] | Float32Array<ArrayBufferLike>

Flat array or Float32Array of data. Must have 4 components per element (RGBA).

Returns ​

DataTextureParams

Released under the MIT License.