DriftTexture · function
decodeCpu
Run the graph at one texture coordinate and one time, writing four components into out.
Explained in DriftTexture.
function decodeCpu(graph: DecodeGraph, resources: DecodeResources, u: number, v: number, t: number, out: Float32Array, registers: Float32Array, lod?: number): voidimport { decodeCpu } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
graph | DecodeGraph | |
resources | DecodeResources | |
u | number | |
v | number | |
t | number | |
out | Float32Array | |
registers | Float32Array | |
lod? | number |
In depth
registers is the caller's, MAX_REGISTERS * 4 floats, reused so this allocates nothing.
lod picks the level a latent is sampled at; 0, and anything that is not a positive number, is
level 0.