Renderer · interface
GpuDrivenLatent
A program is DecodeResources with bytes rather than floats, because bytes are what the
device array holds. The types are structural: core does not import @driftengine/texture, and
what encodeMaterial returns satisfies programFromEncoded as it stands.
Explained in Hello world.
interface GpuDrivenLatentimport type { GpuDrivenLatent } from '@driftengine/core';In depth
Every slot a graph names is program-local and is rewritten here to a global one — a layer, a network, a constant — so the interpreter needs no per-program indirection table. The graph a caller handed in is not modified; the rewritten copy lives only in the table.
Properties
| Name | Type | Description |
|---|---|---|
widthreadonly | number | |
heightreadonly | number | |
componentsreadonly | number | One to four. The lanes past them read zero, and alpha reads one, as decodeCpu does. |
levelsreadonly | readonly Uint8Array[] | Level 0 first, each half the last, down to one texel. components bytes a texel. |