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

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

number[] | Float32Array<ArrayBufferLike>

Returns

DataTextureParams

Released under the MIT License.