Raw compute
The raw compute tier: records (struct), storage buffers of them (buffer), and your own compute passes over them (kernel). For anything the simulation words do not cover. The engine still owns the bind groups, workgroup sizes, bounds checks and dispatch.
import {buffer, kernel, struct} from 'shaders/std'
Types
| Type | What it is |
|---|---|
BufferHandle | A storage buffer a sibling kernel can read and write. |
BufferInput | interface BufferInput extends InputNode { readonly kind: 'buffer' readonly type: StructType readonly count: ScalarArg readonly max: number } |
KernelInput | interface KernelInput extends InputNode { readonly kind: 'kernel' readonly body: string /** The buffer (by its inputs name) to run once per element of, or a fixed grid size. */ readonly over: string | readonly number, number readonly iterations: number readonly when: 'frame' | 'init' } |
StructFieldType | The field types a struct may hold. |
StructType | A record type, by name, for buffers and kernels. |