# Modules

> `@typegpu/kit` 0.1.0. If it is installed, read `node_modules/@typegpu/kit/docs/` instead.

Each entry links the import to its page and lists factories, purpose and non-default facts. **kind** describes the module. cpu means no GPU; shader means 'use gpu' functions only; platform means platform helpers; tool means for development and tests. By default it is a module that borrows the root and owns GPU resources. **platform** names the supported platform. **stability** marks an unstable module, which may change in any way in a minor release. **records** lists recording methods and their compute pass, render pass, encoder or frame arguments. **owns** lists resources, **allocates** says when recording allocates, and **lifecycle** lists compilation and cleanup methods. **injects** describes placeholders filled by `inject()`: hooks and a definition's members, one instance per pipeline, piped as `root.pipe(x.inject())`. An instance's members carry their fill, so one pipeline reads several instances. **needs** names module arguments. **reads** names modules whose fills the calling pipeline needs. **requires** names device features. **submits** declares independent submissions. Exports follow the factories. Each options type lists its fields, with `?` marking optional fields. A field that takes a `'use gpu'` function, which runs in a shader, says so; other functions run on the CPU. The entry ends with its source file and examples. Example source is in `examples/<key>/`, and `examples/README.md` says how to run one.

- `@typegpu/kit`
  - [`import { bindings } from '@typegpu/kit'`](kit/bindings.md): `bindings.layout(entries) → Layout`, `bindings.share(root, parts) → Shared`. Declares module bindings that an app can combine in one shared layout. **stability** unstable: may change in any way in a minor release. **records** Set `shared.group()` on each pass that reads a part, or give the layout to `passes.create` as `shared`. **owns** a bind group: the shared layout recreates it when a part's resources change. **allocates** on change: a bind group from `group()`, after a shared part's resources change. **injects** definition: each part's accessors, filled from the shared layout or its own resources. **types** `Entries`, `Resources`, `Values`, `Part`, `AnyPart`, `Bound`. **options** `BindOptions` (Layout.bind) `unshared?`. `src/bindings.ts`; classroom.
  - [`import { cameras } from '@typegpu/kit'`](kit/cameras.md): `cameras.custom(root, options?) → CustomCamera`, `cameras.layered(root, count) → LayeredCamera`, `cameras.turn(goal, dx, dy, options?) → G`, `cameras.pan(goal, dx, dy, { height }) → G`, `cameras.eyeOf`, `cameras.orbit`, `cameras.flat`, `cameras.hitHeight`. Provides orbit, 2D, custom and layered cameras through the `cameras.current` accessor. **records** `update(dt)` once a frame, to ease the view towards its goal, or `jump()` to go there. **owns** 2 buffers: the current and previous camera uniforms. Writes when the view or size changes and once more in the next frame. `cameras.layered` owns 1 buffer, writing a layer's view when it changes. **injects** hook: `cameras.current`, for every shader that projects, and `cameras.reversed` from a camera created with `reversed: true`. **GPU functions** `toClip`, `farDepth`, `nearerDepth`, `forwardOf`, `lensOf`, `distanceOf`, `rayOf`, `towards`, `sees`. **accessors** `current`, `reversed`. **schemas** `Camera`, `Ray`. **types** `Out3`, `CpuRay`, `CpuView`, `CameraBase`, `Orbit`. **options** `DepthOptions` (custom) `reversed?`; `TurnOptions` (turn) `sensitivity?`; `PanOptions` (pan) `height`; `OrbitOptions` (orbit) `size`, `target`, `distance`, `yaw?`, `pitch?`, `fov?`, `near?`, `far?`, `pitchRange?`, `distanceRange?`, `floor?`, `reach?`, `damping?`, `reversed?`; `FlatOptions` (flat) `size`, `height?`, `fit?`, `center?`, `snap?`, `damping?`, `reversed?`; `HitOptions` (hitHeight) `grazing?`, `reach?`, `step?`. `src/cameras.ts`; afterimage, benthos, blockfall, censer, classroom, cloister, dominoes, ember-mirror, falling-sand, fireworks, fishtank, forest, hex-isle, jellies, jelly-world, kinetic, lattice, night-market, ocean, platformer, quiver-trees, raymarch, robot-arm, skeletons, solar-system, sph-sculpt, spider, stampede, star-map, survey-model.
  - [`import { clock } from '@typegpu/kit'`](kit/clock.md): `clock.fixedStep({ step, … }) → FixedStep`, `clock.cadence(options) → Cadence`, `clock.ease(dt, rate)`, `clock.spring({ stiffness, damping, … }) → Spring`, `clock.spring({ value, damping, stiffness, … }) → VectorSpring`. Counts fixed steps and cadences, and eases and springs values at the same pace at any frame rate. **kind** cpu. **records** `update(dt)` once a frame and run that many steps; a cadence's `due(dt)` says whether its work runs in the frame. **types** `Vector`. **options** `FixedStepOptions` (fixedStep) `step`, `maxSteps?`, `steady?`; `CadenceOptions` (cadence) `every?`, `hz?`; `SpringOptions` (spring) `stiffness`, `damping`, `value?`, `velocity?`; `VectorSpringOptions` (spring) `value`, `velocity?`, `damping`, `stiffness`. `src/clock.ts`; benthos, blockfall, censer, classroom, dominoes, ember-mirror, falling-sand, fireworks, fishtank, flow-field, jellies, jelly-world, kinetic, lattice, night-market, ocean, platformer, robot-arm, skeletons, slime-mould, solar-system, sph-sculpt, stampede.
  - [`import { liveLists } from '@typegpu/kit'`](kit/live-lists.md): `liveLists.create(root, { capacity, draws?, alive?, … }) → LiveLists`. Lists live slots by group on the GPU. **records** `compact` compute, `finish` compute, `draw` render, `dispatch` compute: `compact` after the table's flush, or `finish` after the kernels that `list`, then `draw` or `dispatch` each group from it. **owns** 4 buffers, 2 pipelines: the live slots per group, their counts, the indirect draws and the indirect dispatches. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** member: `slot`, `instanceSlot` and `count`, which read its own buffers in any pipeline. **requires** `indirect-first-instance` option: `firstInstance: true` needs it; without it the live lists throw. **types** `IndirectDraw`, `IndirectDispatcher`, `IndirectDrawer`. **options** `Options` (create) `capacity`, `draws?`, `groups?`, `group?`, `firstInstance?`, `workgroupSize?`, `label?`, `alive?`, `span?`. `src/liveLists.ts`; fishtank, platformer.
  - [`import { coroutines } from '@typegpu/kit'`](kit/coroutines.md): `coroutines.create(options?) → Coroutines`, `coroutines.wait(parts)`, `coroutines.frames(count) → Wait`, `coroutines.seconds(duration) → Wait`, `coroutines.budget`, `coroutines.deferred`, `coroutines.until`. Runs generators that pause at `yield*` and resume in a later frame. **stability** unstable: may change in any way in a minor release. **kind** cpu. **records** `run` frame: Call `run` once per frame while recording to resume coroutines whose waits are complete. **lifecycle** `destroy()`, `[Symbol.dispose]`. **helpers** `nextFrame`. **types** `Suspension`, `Wait`, `Coroutine`. **options** `Options` (create) `onError?`, `now?`, `time?`. `src/coroutines.ts`; blockfall, dominoes, platformer, stampede.
  - [`import { counters } from '@typegpu/kit'`](kit/counters.md): `counters.create(root, names, options?) → Counters`. Keeps a counter for each named kind of event, and no details of one. **records** `capture` frame, `clear` encoder: `capture` after the passes that add; `clear` before them, whenever the counting starts again; in frame mode, `capture` clears after copying. **owns** a buffer, a readback: the counters; the readback copies them at `hz`. **lifecycle** `destroy()`, `[Symbol.dispose]`. **injects** member: `add`, which adds to its own counters in any pipeline. **types** `Counts`. **options** `Options` (create) `per?`, `hz?`, `staging?`. `src/counters.ts`; dominoes, falling-sand, platformer, stampede.
  - [`import { frames } from '@typegpu/kit'`](kit/frames.md): `frames.create(root, record) → Frames`, `frames.encoderOf(target)`, `frames.dtOf(target, dt?)`, `frames.animate(loop, options?) → Animation`. Records a frame into one encoder and submits once, with a clock. **submits** every frame, on its own: once a frame after your recorder returns, and again at each `frame.submit()`. **lifecycle** `destroy()`, `[Symbol.dispose]`. **types** `Schedule`, `Frame`. **options** `AnimateOptions` (animate) `surface?`, `maxDt?`, `schedule?`, `onError?`. `src/frames.ts`.
  - [`import { history } from '@typegpu/kit'`](kit/history.md): `history.create(root, schema, options?) → History`, `history.create(root, schema, { usage, … }) → History`, `history.temporal(current, previous)`, `history.previously(callback)`. Keeps the previous frame's state for motion vectors and reprojection. **records** `record` frame: `record` once a frame, before the passes and kernels that read or move the state. **owns** 3 buffers: current state, previous state and pending writes. **lifecycle** `destroy()`, `[Symbol.dispose]`. **accessors** `epoch`. **options** `Options` (create) `usage?`, `initial?`. `src/history.ts`; classroom, jelly-world, lattice, ocean.
  - [`import { machines } from '@typegpu/kit'`](kit/machines.md): `machines.create(root, def, { capacity, step, alive?, … }) → Machines`, `machines.define(name, spec) → Definition`, `machines.run(def, options?) → Running`. Defines states and transitions for machines that run on the CPU or for each table row on the GPU. **stability** unstable: may change in any way in a minor release. **records** `listed.compact` compute, `listed.finish` compute, `listed.draw` render, `listed.dispatch` compute, `pipe().step` compute, `step` compute: `step(pass)` at each fixed step; it uploads the starts and sends made since the last with `queue.writeBuffer`, which `flush()` does sooner for a frame that reads them and records no step. With `lists`, dispatch work over `listed` after the step whose lists it reads. **owns** 3 to 5 buffers, a uniform, a pipeline, liveLists with `lists`: the rows, the CPU's starts and events, the events kernels send when the definition has any, the starts kernels make with `kernelStarts`, the ticks that seed rolls, the step's length, the step and, with `lists`, the rows in those states. **allocates** never in a step. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** definition: its definition's rows, events and starts, for guards, hooks and code written over any rows of the definition; each set's `gpu` members carry its own. **types** `State`, `Guard`, `Hook`, `Transition`, `StateSpec`, `Members`, `AnyDefinition`, `StateOf`, `EventOf`. **options** `Options` (create) `capacity`, `step`, `alive?`, `span?`, `roll?`, `kernelStarts?`, `lists?`, `random?`; `RunOptions` (run) `count?`, `random?`. `src/machines.ts`; night-market, robot-arm, skeletons, stampede.
  - [`import { passes } from '@typegpu/kit'`](kit/passes.md): `passes.create(root, screen, { shared?, … }?) → Description`, `passes.create(root, screen, writes, { shared?, … }?) → Description`, `passes.output(schema, spec) → Output`, `passes.drawing(spec) → Drawing`. Describes the targets and outputs for passes that draw a scene. **records** `pipe().record` encoder, `pipe().composite` encoder, `beneath().record` encoder, `beneath().composite` encoder, `record` encoder, `composite` encoder, `add().draw` render, `draw` render: `begin` from the frame, with the `shared` group set, then each drawing's `draw` from `add` into the pass; into targets with layers, `record` does so once per layer. `composite` records a pass of its own. **owns** the pipelines `add` builds, until the drawing or description is destroyed, a pipeline per description that composites, bind groups, a buffer per layer, a buffer per viewport its pipelines read, bindings when given parts as `shared`: WebGPU pipelines and bind groups need no destruction. Compound drawings free the resources they built for the description. `composite` lays translucent drawings over the colour with that pipeline and a bind group per pair of textures. A description drawn into layers holds each layer's index in a uniform with a bind group. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** member: what was piped into it, such as the camera, for a drawing's kernels per description. **needs** `bindings`: as `options.shared`; fills accessors in its pipelines. **accessors** `layer`, `viewport`, `sampleCount`, `depthOnly`. **outputs** `shaded`, `accumulation`, `revealage`. **schemas** `ScreenVertex`, `Region`. **constants** `color`, `depth`. **helpers** `fullScreen`. **types** `Output`, `Write`, `Writes`, `Fits`, `Shaders`, `Compound`, `Drawable`, `AnyDrawing`, `Drawn`, `Built`, `Into`, `Screen`. **options** `Options` (create) `jitter?`, `clear?`, `bias?`, `depthClear?`, `depthCompare?`, `stencilClear?`, `enabled?`, `active?`, `label?`, `shared?`; `TargetOptions` (create) `resolve?`, `jitter?`, `clear?`, `bias?`, `depthClear?`, `depthCompare?`, `stencilClear?`, `enabled?`, `active?`, `label?`, `shared?`; `BeginOptions` (Description.begin, Description.record) `clear?`, `layer?`, `timestampWrites?`. `src/passes.ts`; afterimage, benthos, blockfall, censer, classroom, cloister, dominoes, ember-mirror, falling-sand, fireworks, fishtank, forest, hex-isle, jellies, jelly-world, kinetic, lattice, night-market, platformer, quiver-trees, robot-arm, skeletons, solar-system, spider, stampede, star-map, survey-model.
  - [`import { picker } from '@typegpu/kit'`](kit/picker.md): `picker.create(root, camera, { capacity, size, position, … }) → Picker`. Finds a candidate under a screen point on the GPU. **records** `result.capture` frame, `pick` compute: `pick` once in a frame that picks, in a compute pass after whatever moves the candidates; `result.capture(frame)` after that pass, which copies what a pick found. **owns** 3 buffers, a pipeline, a readback: the pick's key, the pointer and the settings; the readback brings the key to the CPU. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** member: `found` and `ray`, for shaders that act on the pick in the same frame; `ray` also reads `cameras.current`. **needs** `cameras`: as `camera`; fills a hook in its pipelines. **GPU functions** `byPointer`, `byEye`. **schemas** `Settings`, `Candidate`. **constants** `none`, `defaults`. **options** `Options` (create) `capacity`, `size`, `position`, `radius?`, `alive?`, `span?`, `rank?`, `hz?`, `settings?`. `src/picker.ts`; dominoes, jellies, solar-system, stampede, star-map.
  - [`import { pipelines } from '@typegpu/kit'`](kit/pipelines.md): `pipelines.compile(from, options?)`, `pipelines.bindingsOf(pipeline, options?) → Bindings`. Compiles pipelines behind a loading screen, lists a pipeline's bindings per stage, and provides blend states. **kind** cpu. **constants** `blend`. **types** `Warmable`, `ShaderStage`, `BindingKind`, `Binding`, `Overflow`. **options** `CompileOptions` (compile) `onProgress?`, `budget?`; `BindingsOptions` (bindingsOf) `limits?`. `src/pipelines.ts`; afterimage, benthos, blockfall, censer, classroom, cloister, dominoes, ember-mirror, falling-sand, fireworks, fishtank, flow-field, forest, hex-isle, jellies, jelly-world, jump-flood, kinetic, lattice, night-market, ocean, platformer, quiver-trees, raymarch, robot-arm, skeletons, slime-mould, solar-system, sph-sculpt, spider, stampede, star-map, survey-model.
  - [`import { profiler } from '@typegpu/kit'`](kit/profiler.md): `profiler.create(root, options?) → Profiler`, `profiler.split(writes) → Split`. Times GPU passes with one shared query set and reads results without stalling. **records** `capture` frame: `capture` after the passes it times; a timer's `writes` in every frame that records its pass. **owns** a query set, 4 buffers: two timestamps per timer, a buffer they resolve into, and staging buffers mapped in turn, as many as `staging`. **lifecycle** `destroy()`, `[Symbol.dispose]`. **requires** `timestamp-query` optional: without it the profiler is inert and its timings stay undefined. **types** `TimestampWrites`, `Timed`, `Timing`, `Timer`. **options** `Options` (create) `capacity?`, `samples?`, `skip?`, `staging?`, `onSample?`. `src/profiler.ts`; jelly-world.
  - [`import { dynamicResolution } from '@typegpu/kit'`](kit/profiler.md#following-gpu-time): `dynamicResolution.create(timing, { budget, … }) → DynamicResolution`. Picks a resolution scale that keeps a GPU timing under a budget. **kind** cpu. **records** `update` frame: `update(frame)` once a frame, before the targets that read `scale` fit. **options** `Options` (create) `budget`, `range?`, `now?`. `src/dynamicResolution.ts`; jelly-world.
  - [`import { readback } from '@typegpu/kit'`](kit/readback.md): `readback.create(root, source, { bytes, … }) → Readback`, `readback.create(root, source, { bytes, decode, … }) → Readback`, `readback.create(root, source, { decode, … }) → Readback`, `readback.create(root, source, options?) → Readback`. Copies a buffer, or a range of its bytes, to the CPU without stalling, using a ring of staging buffers. **records** `capture` frame: `capture` after the pass that writes the buffer; a second capture in a frame does nothing. **owns** 3 buffers: staging buffers mapped in turn, as many as `staging`, each the size of the copy. **lifecycle** `destroy()`, `[Symbol.dispose]`. **options** `BytesOptions` (create) `bytes`, `offset?`, `size?`, `decode?`, `staging?`, `hz?`; `DecodeOptions` (create) `decode`, `staging?`, `hz?`; `Options` (create) `staging?`, `hz?`. `src/readback.ts`; fireworks, fishtank, sph-sculpt, stampede.
  - [`import { table } from '@typegpu/kit'`](kit/table.md): `table.create(root, def, { capacity, history, … }) → HistoryTable`, `table.create(root, def, { capacity, … }) → Table`, `table.rows(def, part, capacity) → Rows`, `table.define(name, parts) → TableDef`. Stores per-object rows in GPU buffers with stable ids. **records** `flush` encoder: `flush()` once a frame, before submit: it uploads the frame's changes with `queue.writeBuffer`, which land before every later submit. With `history`, `flush(frame)` also records copies that keep last frame's rows, before the passes that read the table. **owns** 3 or 4 buffers: the host and device rows, the live bits and the span; a part without fields has no buffer. With `history`, a part's buffer holds last frame's rows after its own, and 2 more per part hold the uploads and a copy on the way. **lifecycle** `destroy()`, `[Symbol.dispose]`. **injects** definition: its definition's rows, live bits and span, for code written over any table of the definition; each table's `gpu` members carry its own. **types** `Props`, `Rows`, `RowId`, `Getter`, `Getters`, `AnyTableDef`, `RowOf`, `FieldInput`, `Values`, `HostField`, `DeviceField`, `Fields`, `Live`. **options** `Options` (create) `capacity`, `defaults?`, `history?`. `src/table.ts`; blockfall, cloister, fishtank, hex-isle, jelly-world, night-market, platformer, robot-arm.
  - [`import { grid } from '@typegpu/kit'`](kit/grid.md): `grid.create(root, { capacity, low, size, sight, position, alive?, … }) → Grid`, `grid.counting(root, { capacity, keys, line, key }) → Binning`, `grid.radix(root, { capacity, keys, line, key }) → Binning`. Sorts items into a neighbour grid each step. **stability** unstable: may change in any way in a minor release. **records** `sort` compute, `dispatch` compute, `dispatchBlocks` compute: `sort` in a compute pass each step, before the kernels that walk. **owns** buffers, a uniform, pipelines, bind groups, a sorter with `radix`: each cell's sorted range, the blocks holding items, with `item` each item's copy in sorted order, the dispatches, the box, the binning's resources. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** member: `walk`, `around`, `range`, `neighbour`, `slot`, `slotAt`, `neighbourAt`, `count`, `holds` and `block`, which read its own buffers in any pipeline. **schemas** `Walk`, `Range`. **constants** `WORKGROUP`, `BLOCK`, `RANGES`. **types** `Candidates`. **options** `Options` (create) `capacity`, `low`, `size`, `sight`, `position`, `binning?`, `margin?`, `item?`, `itemOf?`, `alive?`, `span?`; `BinningOptions` (binning in create, counting, radix) `capacity`, `keys`, `line`, `key`. `src/grid.ts`; fishtank, skeletons, sph-sculpt, stampede.
  - [`import { workgroup } from '@typegpu/kit'`](kit/workgroup.md): `workgroup.sum(schema) → Monoid`, `workgroup.min(schema) → Monoid`, `workgroup.max(schema) → Monoid`, `workgroup.bounds(schema) → Monoid`, `workgroup.reduce`, `workgroup.scan`. These `'use gpu'` functions combine one value from each invocation of a workgroup: `reduce` gives every invocation the combination of all of them, and `scan` gives each the combination of those before it. **kind** shader. **types** `Ordered`. `src/workgroup.ts`.
  - [`import { sorter } from '@typegpu/kit'`](kit/sorter.md): `sorter.create(root, keys, options?) → Sorter`. Creates a stable radix sort of a buffer of keys, eight bits a pass, which carries a payload along. **records** `sort` compute: `sort` in a compute pass after whatever writes the keys. **owns** buffers, pipelines, bind groups: counts per 2 048 keys, a copy of the keys and payload to sort through, and the scan of the counts. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **types** `Key`. **options** `Options` (create) `values?`, `out?`, `direction?`, `range?`, `keyBits?`, `key?`. `src/sorter.ts`.
  - [`import { targets } from '@typegpu/kit'`](kit/targets.md): `targets.create(root, source, specs, { resolution? }?) → Targets`, `targets.scaled(source, scale) → SizeSource`. Creates render targets that follow a size. **records** `fit()` before the passes that use the targets; it returns true after a rebuild. **owns** a texture per target: replaced as a set when the size changes. **allocates** on resize: the whole set, new textures and their views; a new resolution allocates nothing. **lifecycle** `destroy()`, `[Symbol.dispose]`. **types** `Spec`, `Surface`, `FixedSize`, `FloatTexture`, `Depth`, `Target`. **options** `Options` (create) `resolution?`. `src/targets.ts`; afterimage, benthos, blockfall, censer, classroom, cloister, dominoes, ember-mirror, falling-sand, fireworks, fishtank, forest, hex-isle, jellies, jelly-world, kinetic, lattice, night-market, ocean, platformer, quiver-trees, raymarch, robot-arm, skeletons, slime-mould, solar-system, sph-sculpt, spider, stampede, star-map, survey-model.
  - [`import { baker } from '@typegpu/kit'`](kit/baker.md): `baker.create(root, texture, { texel }) → Baker`. Bakes a `'use gpu'` function of a texel's position into a texture, in your encoder or compute pass: a procedural picture, a distance field, a lookup table. **records** `record` compute: `record` before what reads the texture, each time what `texel` reads changes. **owns** a pipeline, 0 or 1 bind groups: the kernel or the draw that writes the texels, and the storage view a kernel writes them through. **lifecycle** `initAsync()`. **options** `Options` (create) `texel`. `src/baker.ts`; dominoes, ember-mirror, jelly-world, ocean, slime-mould.
  - [`import { mipmaps } from '@typegpu/kit'`](kit/mipmaps.md): `mipmaps.create(root, texture, { combine, … }) → Mipmaps`. Fills a texture's mip levels in your encoder, each texel combining a 2×2 block of the level above with a `'use gpu'` function: a mean for sampling, the farthest depth for occlusion. **records** `record` compute, `of().record` compute: `record` after whatever writes level 0 or `source`, before what reads the levels. **owns** a pipeline, a bind group per level: the kernel or the draw that fills a level, and the views each level reads and writes. **lifecycle** `initAsync()`. **GPU functions** `mean`, `largest`, `smallest`. **types** `Combine`. **options** `Options` (create) `combine`, `source?`. `src/mipmaps.ts`; ocean.
  - [`import { images } from '@typegpu/kit'`](kit/images.md): `images.create(root, picture, options?)`, `images.decodeBitmap(image)`, `images.decode(image, custom?)`, `images.decodeHdr(bytes) → HdrImage`, `images.array`, `images.cube`, `images.sampler`, `images.decodesItself`, `images.rgbm`. Puts images on the GPU from files, pixels or Radiance HDR, as colour or data, with mips, layers of an array or a cube, and samplers. **submits** while setting up: `create`, `array` and `cube` generate mips with TypeGPU's `generateMipmaps`, which submits its own commands, unless `mips` is false. With `packed`, or a `format` other than the image's, they first draw each layer through a pipeline of their own and submit it. **owns** textures, samplers, a baker with `packed` or a narrower `format`: the textures and samplers each call returns, of which you destroy the textures; a staging texture it destroys and a baker that draws it into the texture, used once while creating. **requires** `rg11b10ufloat-renderable` option: `format: 'rg11b10ufloat'` needs it. **constants** `HDR`. **types** `EncodedImage`, `DecodedImage`, `Picture`, `ImageSource`, `Decode`, `Format`, `Unpack`, `Texture`. **options** `Options` (create, array, cube) `color?`, `mips?`, `packed?`, `format?`; `SamplerOptions` (sampler) `wrap?`, `filter?`, `anisotropy?`. `src/images.ts`; classroom, dominoes, kinetic, quiver-trees.
  - [`import { video } from '@typegpu/kit'`](kit/video.md): `video.create(root, { size, … }) → Feed`, `video.live(root, options?) → LiveView`. Fits camera frames into a texture, or samples them in place. **stability** unstable: may change in any way in a minor release. **records** `update` frame, `record` encoder: `update` and `record` into a render pass of their own, before the passes that read the texture. **owns** a texture, a buffer, a sampler, a pipeline, bind groups: a feed's picture, fitting, fit and each recorded frame's group; a live view's blank frame, orientation and sampler. **allocates** every `record`: a bind group for the imported frame. For a live view, each new frame: an external texture from the source and a bind group from the share that holds its part; a web video imports again every frame. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** hook: the frame, sampler and orientation `video.sample` reads, from a live view's part. **GPU functions** `sample`. **types** `Fit`, `Rotation`, `Imported`, `Latest`, `Source`, `Crop`. **options** `Options` (create, live) `size`, `fit?`; `LiveOptions` (live) `crop?`. `src/video.ts`; ember-mirror.
  - [`import { bloom } from '@typegpu/kit'`](kit/finish.md#bloom): `bloom.create(root, { source, region?, … }) → Bloom`. Creates bloom from a chain of half-size textures. **records** `record` encoder: `record` after whatever wrote the source; then `output` holds the glow. **owns** targets, a sampler, 3 pipelines, 2 bind groups and a buffer per level: the chain of glow levels, the settings, a group for each pass, and the region each pass reads. **allocates** on resize: a new chain and the bind groups of its passes; so does a new source. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **GPU functions** `threshold`. **schemas** `Settings`. **constants** `defaults`. **options** `Options` (create) `source`, `region?`, `levels?`, `bright?`, `settings?`. `src/post/bloom.ts`; afterimage, benthos, blockfall, classroom, cloister, dominoes, ember-mirror, falling-sand, fireworks, fishtank, forest, hex-isle, jellies, kinetic, lattice, night-market, ocean, quiver-trees, robot-arm, skeletons, slime-mould, solar-system, spider, stampede, star-map, survey-model.
  - [`import { dof } from '@typegpu/kit'`](kit/dof.md): `dof.create(root, view, { source, depth, pull?, region?, … }) → Dof`. Creates depth of field. **records** `record` encoder: `record` after the TAA resolve or whatever wrote the source, before bloom and the final pass; then `output` holds the picture. **owns** targets, 2 buffers, a sampler, 5 pipelines, 6 bind groups: the half-resolution picture, the tiles, their reach, the blur and the output; the settings and the regions; a group for each pass and one for the depth. With `pull` or after `aim`, also the focus and its step, the kernel moving it and its groups. **allocates** on resize: targets for the new size and the bind groups of its passes; so does a new source or depth. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** hook: the half-resolution picture and regions `dof.circle` reads, from the part. **needs** `cameras`: as `view`; fills a hook in its pipelines. **GPU functions** `distanceAt`, `thinLens`, `focus`, `circle`. **schemas** `Settings`. **constants** `defaults`. **types** `Radius`. **options** `Options` (create) `source`, `depth`, `radius?`, `pull?`, `rings?`, `region?`, `settings?`; `RecordOptions` (Dof.record) `dt?`, `timestampWrites?`. `src/post/dof.ts`; hex-isle, night-market.
  - [`import { exposure } from '@typegpu/kit'`](kit/finish.md#adapting-exposure): `exposure.create(root, { source, region?, … }) → Exposure`. Creates an exposure that adapts to the picture on the GPU. **records** `record` encoder: `record` after whatever wrote the source, before the final pass that reads it. **owns** 3 buffers, a sampler, a pipeline and a bind group: the settings, the frame's region and time, the exposure, and a group for the source. **allocates** on resize: a bind group for a new source. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** member: `exposure.current`, for the final pass or shaders of your own. **accessors** `current`. **schemas** `Settings`. **constants** `defaults`. **options** `Options` (create) `source`, `region?`, `settings?`; `RecordOptions` (Exposure.record) `dt?`, `timestampWrites?`. `src/post/exposure.ts`; fireworks, kinetic, ocean.
  - [`import { fxaa } from '@typegpu/kit'`](kit/fxaa.md): `fxaa.create(root, { format, source, region?, … }) → Fxaa`. Creates an FXAA 3.11 pass at the default quality. **records** `draw` render, `record` encoder: `record` into a pass of its own on the view you give, usually the canvas's, or `draw` into the caller's pass, after the pass that drew the source. **owns** 2 buffers, a sampler, a pipeline, a bind group: the settings, the region it reads and the source's group. **allocates** on resize: a bind group for a new source. **lifecycle** `initAsync()`. **schemas** `Settings`. **constants** `defaults`. **options** `Options` (create) `format`, `source`, `region?`, `settings?`. `src/post/fxaa.ts`; raymarch, robot-arm, sph-sculpt.
  - [`import { finish } from '@typegpu/kit'`](kit/finish.md): `finish.create(root, { format, source, region?, glow?, exposure?, … }) → Finish`. Creates the final pass of a frame. **records** `draw` render, `record` encoder: `record` into a pass of its own on the view you give, usually the canvas's, or `draw` into the caller's pass, after the bloom's `record`. **owns** 2 buffers, a sampler, a pipeline, 2 bind groups: the settings, the regions it reads, a group for the glow and one for each texture the source returns. **allocates** on resize: a bind group for a new source or glow. **lifecycle** `initAsync()`. **needs** `exposure`: as `options.exposure`; fills accessors in its pipelines. **GPU functions** `glow`, `picture`. **schemas** `Settings`. **constants** `defaults`. **types** `Filter`, `Viewport`. **options** `Options` (create) `format`, `source`, `region?`, `glow?`, `exposure?`, `tone?`, `filter?`, `encode?`, `grade?`, `alpha?`, `settings?`; `RecordOptions` (Finish.record) `viewport?`, `timestampWrites?`. `src/post/finish.ts`; afterimage, benthos, blockfall, censer, classroom, cloister, dominoes, ember-mirror, falling-sand, fireworks, fishtank, forest, hex-isle, jellies, jelly-world, kinetic, lattice, night-market, ocean, platformer, quiver-trees, raymarch, robot-arm, skeletons, slime-mould, solar-system, sph-sculpt, spider, stampede, star-map, survey-model.
  - [`import { post } from '@typegpu/kit'`](kit/finish.md#an-effect-of-your-own): `post.textureOf(source)`, `post.regionOf(source, region)`, `post.fitRegion(size, texture, region)`. These types and functions read a picture another pass rendered, as every post-processing `source` does. **kind** cpu. **GPU functions** `within`. **types** `FloatTexture`, `Rendered`, `Source`. `src/post/post.ts`.
  - [`import { taa } from '@typegpu/kit'`](kit/taa.md): `taa.create(root, { source, motion?, depth, camera?, … }) → Taa`. Creates temporal antialiasing from subpixel-jittered frames. **records** `record` encoder: `record` after the passes that draw the source and the motion, before what reads `output`. **owns** targets, 4 buffers, a sampler, a pipeline, 2 to 4 bind groups: two histories, each frame written into one from the other, the settings, the region and whether to blend, the jitter and its sequence, a group each for the frames that read either history with the source and `motion`, one for `depth` and one for `reactive`. **allocates** on resize: targets for the new size and the bind groups of its passes; so does a new source, motion, depth or reactive texture. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **needs** `cameras`: as `options.camera`; fills a hook in its pipelines. **GPU functions** `written`. **outputs** `motion`. **schemas** `Settings`. **constants** `defaults`. **options** `Options` (create) `source`, `motion?`, `depth`, `camera?`, `reversed?`, `region?`, `size?`, `reactive?`, `settings?`. `src/post/taa.ts`; classroom, cloister, jelly-world, lattice, night-market, survey-model.
  - [`import { tone } from '@typegpu/kit'`](kit/finish.md#tone-curves): These `'use gpu'` functions apply tone curves and dither. **kind** shader. **GPU functions** `luminance`, `aces`, `neutral`, `reinhard`, `agx`, `dither`. **types** `Tone`. `src/post/tone.ts`; afterimage, benthos, censer, classroom, cloister, dominoes, ember-mirror, falling-sand, fireworks, jellies, lattice, night-market, ocean, raymarch, solar-system, sph-sculpt, stampede, star-map, survey-model.
  - [`import { particles } from '@typegpu/kit'`](kit/particles.md): `particles.create(root, camera, { capacity, particle, step, update?, … }) → Particles`, `particles.create(root, camera, { capacity, step, update?, … }) → Particles`, `particles.schema(name, own)`, `particles.collide(solid, options?)`. Creates a GPU particle pool. **records** `spawn` compute, `step` compute, `compact` compute, `drawing.draw` render, `clear` encoder: `spawn` once a submission before `compact`, `step` once per fixed step, `compact` once after the steps, then the draw a description added `drawing` as; `clear` whenever you like. **owns** 6 buffers, 2 pipelines, `liveLists`: the pool, its ring counter, the burst queue and three uniforms; the live lists list the live particles. Each description `drawing` is added to builds its pipeline. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** member: `emit` and the pool, which read its own buffers in any pipeline. **needs** `cameras`: as `camera`; fills a hook in its pipelines. **GPU functions** `softDisc`, `glowingDisc`, `facing`. **schemas** `Particle`, `Settings`, `Seen`, `Corner`. **constants** `defaults`. **types** `Schema`, `Burst`, `Stream`, `System`, `Solid`. **options** `Options` (create) `capacity`, `particle?`, `label?`, `step`, `blend?`, `dimensions?`, `bursts?`, `update?`, `born?`, `place?`, `shade?`, `died?`, `settings?`; `CollideOptions` (collide) `bounce?`, `friction?`. `src/particles/particles.ts`; benthos, blockfall, classroom, dominoes, ember-mirror, falling-sand, fireworks, fishtank, jellies, lattice, night-market, platformer, skeletons, stampede.
  - [`import { trails } from '@typegpu/kit'`](kit/trails.md): `trails.create(root, { capacity, length, width?, … }) → Trails`. Creates trails as rings of recent points, pushed by kernels or written on the CPU, and draws them as `lines`. **records** `drawing.draw` render, `clear` encoder: `drawing`, added to passes, after the passes that push; `clear` whenever you like. **owns** 3 buffers, a lines: the points, the rings and the settings, and the lines that draw them. **lifecycle** `destroy()`, `[Symbol.dispose]`. **injects** member: `push`, `reset`, `pointAt` and `held`, which read its own buffers in any pipeline. **schemas** `Sample`, `Ring`, `Settings`. **constants** `defaults`. **types** `Join`. **options** `Options` (create) `capacity`, `length`, `label?`, `blend?`, `width?`, `shade?`, `head?`, `join?`, `startCap?`, `endCap?`, `settings?`. `src/particles/trails.ts`; fireworks, solar-system.
  - [`import { environment } from '@typegpu/kit'`](kit/environment.md): `environment.create(root, { size?, … }?) → Environment`, `environment.stars(options?)`, `environment.background(lightFrom, options?) → Compound`, `environment.clip(image, ceiling?) → Clipped`. Lights surfaces with the light around them: an HDR panorama, a cube map or a sky you write. **records** `bake` encoder, `build().draw` render: `bake(frame, source)` when the source changes, before the passes that shade: one compute pass with a dispatch per mip level of both cubes and one for the harmonics. **owns** 2 textures, 2 buffers, a sampler, 5 pipelines and one per added function, bind groups: the radiance and reflection cubes, the settings and the harmonics; the kernels that read a panorama, read a cube, halve the radiance, blur the reflections and sum the harmonics; a group per mip level and per added texture. Both cubes hold the mirror level, since a dispatch can't sample a texture it writes. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** definition: the cube, the harmonics and the settings that `environment.reflection`, `irradiance`, `occluded`, `backdrop` and `ambient` read. **needs** `passes`: as `build(into)`; fills accessors in its pipelines. **GPU functions** `turn`, `reflection`, `irradiance`, `occluded`, `ambient`, `backdrop`, `gradient`, `sunColor`, `daylight`, `sunDisc`, `sunAt`. **schemas** `Settings`, `Star`. **constants** `defaults`. **types** `LightFrom`, `Source`, `Prepared`. **options** `Options` (create) `size?`, `samples?`, `settings?`; `StarsOptions` (stars) `cells?`, `chance?`, `size?`; `BackgroundOptions` (background, Environment.background) `label?`. `src/render/environment.ts`; afterimage, benthos, blockfall, classroom, cloister, fireworks, forest, hex-isle, jellies, kinetic, lattice, night-market, ocean, skeletons, solar-system, sph-sculpt, stampede.
  - [`import { impostors } from '@typegpu/kit'`](kit/impostors.md): `impostors.create(root, pool, subject, { card, poses?, … }) → Atlas`, `impostors.define(name, options?) → Kind`, `impostors.define(name, { transform, … }) → Kind`. This module captures meshes into an atlas and draws them as camera-facing cards. **stability** unstable: may change in any way in a minor release. **records** `record` encoder: `atlas.record(frame)` once while loading, after what moves the subject's poses and before the passes that draw the atlas. **owns** 5 textures, 3 buffers, 1 or 2 samplers, 5 to 8 pipelines, mipmaps: the atlas's colours and its normals with depth, the multisampled targets that draw them, the subject's sphere, the extents it is fitted from and its pieces; the atlas's sampler, and the pool's the first time a capture binds its textures; four kernels that fit the sphere, a pipeline for each look of the subject's meshes, one-sided or two-sided, masked or not, that capture it; the mipmaps of each atlas texture. **lifecycle** `destroy()`, `[Symbol.dispose]`. **injects** definition: the atlas that `Impostor` and kinds made by `define` read, for a renderer piped `atlas.inject(sampling)`. **needs** `meshPool`: as `pool`; fills accessors in its pipelines; `poses`: as `options.poses`; fills accessors in its pipelines. **helpers** `CARD`, `Impostor`. **types** `Piece`, `Sampling`. **options** `Options` (create) `card`, `poses?`, `views?`, `size?`, `hemisphere?`; `KindOptions` (define) `host?`, `device?`, `transform?`, `place?`, `visible?`. `src/render/impostors.ts`; quiver-trees, stampede.
  - [`import { instances } from '@typegpu/kit'`](kit/instances.md): `instances.create(root, pool, { kind?, capacity, history, … }) → HistoryInstances`, `instances.create(root, pool, { kind?, capacity, … }) → Instances`, `instances.create(root, pool, { kind, capacity, history, … }) → HistoryInstances`, `instances.create(root, pool, { kind, capacity, … }) → Instances`, `instances.define`. This module stores mesh instances and builds renderers for colour and depth passes. **records** `flush` encoder, `renderer().cull` compute: what each description built of a renderer, in its pass; `flush()` once a frame, before them, uploads what changed; a culling renderer's `cull` in a compute pass after the flush. **owns** a table, 2 buffers, culling buffers, culling pipelines, bind groups: the rows, the live ones per mesh and, once a render bundle draws them, their draws; with culling, a uniform of how many rows it lists from; without `indirect-first-instance`, a uniform and a bind group per mesh with instances; and a culling renderer's 3 buffers and 2 kernels for each description it is added to, which own its pipelines, colour, with a depth pipeline before it for a kind with a surface, or depth alone. **lifecycle** `destroy()`, `[Symbol.dispose]`. **injects** definition: its kind's table, which your kernels read and write. **needs** `cameras`: as `renderer(options.eye)`; fills a hook in its pipelines; `meshPool`: as `pool`; fills accessors in its pipelines. **requires** `indirect-first-instance` option: `cull: true`, and a render bundle, draw indirectly; without it, each indirect draw binds a group holding its mesh, or draws through a pipeline per mesh where the pipeline has no group left. A renderer drawn into a pass without `cull` draws directly and needs none. **GPU functions** `rotate`, `toward`. **schemas** `Placement`, `Sphere`, `Shaded`, `Corner`, `Lit`. **helpers** `Instance`. **types** `Moved`, `InstanceOf`, `Vertex`, `Pixel`, `AnyKind`, `Id`, `Values`, `Fields`, `Renderer`. **options** `Options` (create) `kind?`, `capacity`, `defaults?`, `history?`; `KindOptions` (define) `host?`, `device?`, `transform?`, `place?`, `visible?`, `pose?`, `deform?`, `deformShadow?`, `bounds?`, `carry?`, `material?`, `surface?`, `coverage?`; `RendererOptions` (HistoryInstances.renderer, Instances.renderer) `blend?`, `transmit?`, `shade?`, `textured?`, `specularAntialiasing?`, `cull?`, `from?`, `to?`, `fade?`, `eye?`, `prepass?`. `src/render/instances.ts`; afterimage, blockfall, classroom, cloister, dominoes, fireworks, fishtank, forest, hex-isle, kinetic, night-market, quiver-trees, robot-arm, skeletons, solar-system, spider, stampede, survey-model.
  - [`import { lighting } from '@typegpu/kit'`](kit/lighting.md): `lighting.create(root, { points?, shadow?, pointShadow?, … }?) → Lighting`, `lighting.fitSlices(input, places)`. Creates lighting with a sun, sky and fog. **records** `shadow.record` encoder, `pointShadow.record` encoder: `shadow.record` and `pointShadow.record` with what was added to them, before the passes that shade. **owns** 1 to 3 buffers, a sampler, targets, a cameras.layered, passes: the sun, sky and fog; with a shadow, its light space, the views of its cascades, a comparison sampler, the depth array and the passes that draw it; with `pointShadow`, the same for the lights' faces. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** hook: the shading hooks its options name: `reflect`, `ambient`, `fog`, `sunShadow` and `attenuation`; definition: the sun, sky and fog, the shadows and the point lights, which `shading` reads. **GPU functions** `cone`. **schemas** `Light`, `Spot`, `Settings`, `Span`. **constants** `defaults`, `WHITE`. **helpers** `PointLight`, `MovingPointLight`, `SpotLight`, `MovingSpotLight`, `WHITE_SPOT`. **types** `CascadeFit`, `CascadeFitInput`, `CascadePlace`, `Cascades`, `FittedShadowOptions`, `FixedShadowOptions`, `Shadow`, `ShadowMapOptions`, `ShadowPrepareOptions`, `SunShadow`, `Shading`, `LightTable`, `TablePoints`, `LightPoints`, `SpotPoints`, `PointLights`, `MovingPointLights`, `SpotLights`, `MovingSpotLights`, `LightingOf`, `Shadowed`, `PointShadowed`. **options** `Options` (create) `settings?`, `shading?`, `points?`, `shadow?`, `pointShadow?`; `PointsOptions` (points in create) `table?`, `candidates?`, `light?`, `spot?`, `count?`; `ShadowOptions` (shadow in create) `extent?`, `center?`, `eye?`, `cascades?`, `far?`, `splits?`, `fit?`, `size?`, `reach?`, `filter?`, `format?`, `bias?`, `lift?`, `enabled?`; `ShadowRecordOptions` (Lighting.shadow.record) `clear?`, `timestampWrites?`, `redraw?`. `src/render/lighting.ts`; afterimage, blockfall, censer, classroom, cloister, dominoes, fireworks, fishtank, forest, hex-isle, kinetic, night-market, quiver-trees, robot-arm, skeletons, sph-sculpt, spider, stampede, survey-model.
  - [`import { lines } from '@typegpu/kit'`](kit/lines.md): `lines.create(root, { capacity, length, point?, … }) → Lines`. Draws polylines as a drawing for pass descriptions, in one draw for a whole set. **records** `drawing.draw` render: `drawing`, added to passes, after the kernels that write the points. **owns** 1 to 3 buffers: the segment's indices, the points unless `point`, and the counts unless `point` or `count`. **lifecycle** `destroy()`, `[Symbol.dispose]`. **injects** member: `setPoint`, `setCount`, `pointAt` and `held`, which read its own buffers in any pipeline. **GPU functions** `dash`. **schemas** `ControlPoint`, `Fragment`, `Corner`, `Seen`. **helpers** `joins`, `caps`. **types** `Join`, `Blend`. **options** `Options` (create) `capacity`, `length`, `units?`, `closed?`, `point?`, `count?`, `join?`, `miterLimit?`, `startCap?`, `endCap?`, `shade?`, `blend?`, `minWidth?`, `label?`; `WriteOptions` (Lines.write) `width?`, `color?`. `src/render/lines.ts`; jellies, kinetic, solar-system, survey-model.
  - [`import { pointShadow } from '@typegpu/kit'`](kit/lighting.md#point-and-spot-shadows): `pointShadow.define(options?) → PointShadowDefinition`. Point and spot shadows for a lighting: `define` describes them, and `lighting.create` makes them for the lights of its table as `light.pointShadow`, compiles them in `initAsync`, fills their shading and destroys them. **kind** cpu. **types** `PointShadowPrepareOptions`, `PointShadowRecordOptions`, `PointShadow`, `PointShadowDefinition`. **options** `PointShadowOptions` (define) `count?`, `size?`, `filter?`, `format?`, `bias?`, `lift?`, `enabled?`. `src/render/pointShadow.ts`; blockfall, cloister, night-market, robot-arm.
  - [`import { materials } from '@typegpu/kit'`](kit/lighting.md#what-a-surface-is-made-of): These `'use gpu'` functions create materials for `shading.shade`, with colours or mesh textures. **kind** shader. **reads** `meshPool`: its `inject()` fills them in the calling pipeline. **GPU functions** `matte`, `glossy`, `metal`, `glow`, `uvOf`, `textured`, `antialiased`, `masked`, `mappedNormal`. `src/render/materials.ts`; afterimage, blockfall, censer, dominoes, fireworks, fishtank, forest, kinetic, night-market, quiver-trees, robot-arm, skeletons, solar-system, sph-sculpt, spider, stampede, survey-model.
  - [`import { meshPool } from '@typegpu/kit'`](kit/mesh-pool.md): `meshPool.create(root, { capacity, … }) → MeshPool`, `meshPool.roomFor(items) → Sized`. Creates shared vertex storage and an index buffer, with bounds and textures per mesh. **stability** unstable: may change in any way in a minor release. **submits** while setting up: a shape added without an encoder bakes in a compute pass of its own, submitted at once, and a model's images generate their mips as they decode. **owns** 5 to 7 buffers, a uniform per way of reading textures, a uniform per shape added, a pipeline per pair of shape functions, textures, samplers, bind groups, what `images` makes: positions, normals and uvs, indices and boxes, second uvs with `uvs1`, joints and weights once a skinned model comes, and the extras when `extra` names any; a bake per `vertexAt` and `indexAt` it bakes, and per shape added the uniform of its ranges and their group; each image decoded once per format it is read in, and a group per set of a mesh's textures. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** definition: the vertices `vertexAt`, `positionAt` and `uv1At` read, the joints and weights `influencesAt` reads, and the boxes `boundsOf` reads; member: the extras `pool.extra` reads. **GPU functions** `positionAt`, `vertexAt`, `uv1At`, `influencesAt`, `boundsOf`. **schemas** `Reading`, `TextureUvs`, `Box`, `Influences`. **helpers** `textureLayout`. **types** `SamplerData`, `TextureData`, `TexturesData`, `TextureTransformData`, `Shape`, `Factors`, `Mesh`, `Model`, `MaterialData`, `ExtraType`, `Extras`, `ExtraData`, `ExtraReaders`, `MeshData`, `ModelData`, `Room`. **options** `Options` (create) `capacity`, `extra?`, `vertices?`, `indices?`, `uvs1?`, `decode?`, `anisotropy?`, `shapes?`. `src/render/meshPool.ts`; afterimage, blockfall, classroom, cloister, dominoes, fireworks, fishtank, forest, hex-isle, kinetic, night-market, quiver-trees, robot-arm, skeletons, solar-system, spider, stampede, survey-model.
  - [`import { ao } from '@typegpu/kit'`](kit/ao.md): `ao.create(root, view, { depth, normal?, region?, … }) → Ao`. Creates ground-truth ambient occlusion (GTAO) from a depth texture drawn before shading. **records** `record` encoder: `record` after the pass that draws `depth`, before the passes that shade; with `temporal`, a copy advances the frame. **owns** targets, 2 or 3 buffers, 2 pipelines, 2 bind groups: the raw and the denoised occlusion; the settings, the region and frame, and with `temporal` the frame indices; the trace and the denoise, with a group each. **allocates** on resize: two textures for a new depth size and the bind groups of its passes; so does a new depth or normal texture. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** hook: the texture and region `ao.at` reads, from the part. **needs** `cameras`: as `view`; fills a hook in its pipelines. **GPU functions** `at`. **outputs** `normal`. **schemas** `Settings`. **constants** `defaults`. **types** `Normal`, `Occlusion`. **options** `Options` (create) `depth`, `normal?`, `temporal?`, `slices?`, `region?`, `settings?`, `enabled?`. `src/render/ao.ts`; blockfall, dominoes, robot-arm.
  - [`import { shading } from '@typegpu/kit'`](kit/lighting.md#your-own-shading): These `'use gpu'` functions shade surfaces with the lighting injected into their pipeline, and read its shadows. **kind** shader. **reads** `cameras`: its `inject()` fills them in the calling pipeline; `lighting`: its `inject()` fills them in the calling pipeline. **GPU functions** `pointAt`, `settings`, `towardsSun`, `falloff`, `beam`, `beamOf`, `pbr`, `lambert`, `reflectance`, `specularOcclusion`, `reflectionOf`, `surrounded`, `hemisphere`, `haze`, `heightFog`, `cascadeOf`, `cascadeShadowed`, `sunShadowed`, `lampShadowed`, `reaching`, `sunShare`, `sun`, `direct`, `unfogged`, `shade`, `shadeClear`, `incoming`. **accessors** `reflect`, `ambient`, `fog`, `sunShadow`, `attenuation`. **schemas** `Material`, `Point`, `Air`, `CascadeAt`. **types** `ReflectHook`, `AmbientHook`, `FogHook`, `SunShadowHook`, `AttenuationHook`. `src/render/shading.ts`; afterimage, blockfall, censer, classroom, cloister, dominoes, fireworks, fishtank, forest, hex-isle, kinetic, night-market, quiver-trees, robot-arm, skeletons, solar-system, sph-sculpt, spider, stampede, survey-model.
  - [`import { poses } from '@typegpu/kit'`](kit/poses.md): `poses.create(root, skin, clips, { capacity, … }) → Poses`, `poses.sample(channel, time, out?)`, `poses.shift(clip, by, options?) → ClipData`, `poses.mirror(clip, opposite, options?) → ClipData`, `poses.lean`, `poses.attach`, `poses.rebind`, `poses.clip`. This module animates skinned models by computing pose joints on the GPU each frame. **stability** unstable: may change in any way in a minor release. **records** `animate` compute: `animate(pass, time)` once a frame in a compute pass, after the kernels that call the verbs and before the passes that draw the poses: it uploads what changed and finds every pose's joints. **owns** a table, 4 buffers, a uniform, a pipeline: the plays, the clips' keys and spans, the joints' parents, inverse binds, bind origins and masks, every pose's joints in two halves, the clock, and the kernel that finds them. **lifecycle** `initAsync()`, `destroy()`, `[Symbol.dispose]`. **injects** definition: every pose's joints, which the vertices of a kind with a `pose` read, and the plays the verbs write, for a pipeline piped `figures.inject()`. **GPU functions** `skinned`, `skinnedPosition`, `play`, `once`, `stop`, `mix`, `weigh`, `seconds`, `jointPosition`. **schemas** `Placement`. **constants** `rest`. **types** `JointData`, `SkinData`, `ChannelData`, `Play`, `Stop`, `Id`, `Resample`, `Mirror`, `Lean`. **options** `Options` (create) `capacity`, `hz?`, `layers?`, `local?`; `LayerOptions` (layers in create) `joints?`, `add?`. `src/render/poses.ts`; night-market, skeletons, stampede.
  - [`import { font } from '@typegpu/kit'`](kit/text.md#loading-a-font): `font.create(root, baked) → Font`, `font.metrics(data) → Metrics`, `font.read(json, atlas) → Baked`. Uploads a baked font atlas and glyph quads for text sets. **owns** a texture, a buffer: the atlas, and each glyph's quad. **lifecycle** `destroy()`, `[Symbol.dispose]`. **schemas** `Glyph`. **types** `FontData`, `GlyphData`. `src/text/font.ts`; jelly-world, solar-system, stampede, star-map.
  - [`import { typeset } from '@typegpu/kit'`](kit/text.md#layout): `typeset.create(capacity) → Typesetter`. This module lays out strings on the CPU using baked font advances and kerning. **kind** cpu. **types** `Layout`. **options** `Options` (Typesetter.set) `em`, `align?`, `baseline?`, `tracking?`. `src/text/typeset.ts`; solar-system.
  - [`import { text } from '@typegpu/kit'`](kit/text.md): `text.create(root, font, { capacity, length, place?, camera?, … }) → TextSet`. Creates labels drawn from a baked MSDF font atlas. **records** `drawing.draw` render: `drawing`, added to passes, after the passes that move the labels. **owns** 2 buffers, a sampler: the quads and the labels. **lifecycle** `destroy()`, `[Symbol.dispose]`. **injects** member: `move`, `setLabel`, `setQuad`, `quadAt` and `erase`, which write its own buffers in any pipeline. **needs** `cameras`: as `options.camera`; fills a hook in its pipelines; `font`: as `font`. **GPU functions** `facing`, `ground`, `screen`, `pinned`. **schemas** `Label`, `Quad`, `Fragment`, `Placed`, `Seen`, `Corner`. **types** `Place`. **options** `Options` (create) `capacity`, `length`, `place?`, `camera?`, `shade?`, `blend?`, `label?`. `src/text/text.ts`; jelly-world, solar-system, stampede, star-map.
  - [`import { gltf } from '@typegpu/kit'`](kit/gltf.md): `gltf.read(source, { parts?, rotation?, placements, … }) → PlacedModelData`, `gltf.read(source, { parts?, rotation?, … }?) → ModelData`, `gltf.load(url, { fetch?, placements, … }) → Promise<PlacedModelData>`, `gltf.load(url, { fetch?, … }?) → Promise<ModelData>`, `gltf.draco(module) → Draco`. Reads a binary glTF 2.0 file into meshes, selected parts, a skin and animations. **kind** cpu. **types** `Draco`, `DracoArray`, `DracoAttribute`, `DracoMesh`, `DracoModule`, `Extra`, `PartData`, `PlacementData`, `Fetch`. **options** `ReadOptions` (read) `parts?`, `rotation?`, `placements?`, `maxBytes?`, `draco?`, `uvs1?`; `LoadOptions` (load) `fetch?`, `parts?`, `rotation?`, `placements?`, `maxBytes?`, `draco?`, `uvs1?`. `src/gltf/read.ts`; afterimage, classroom, cloister, fireworks, hex-isle, night-market, quiver-trees, skeletons, stampede.
  - `import { byStage, unfilled } from '@typegpu/kit'`: `byStage(buffer)`, `unfilled(what, instance, origin)`. Provides helpers for writing modules. **kind** cpu. **types** `Checked`, `Inject`, `Injectable`. `src/inject.ts`; falling-sand, jelly-world, platformer, quiver-trees, solar-system, stampede.
  - `import { owner } from '@typegpu/kit'`: `owner(message?) → Owner`. Collects what a scene or module makes as it makes it, to compile and free it all in one call each. **kind** cpu. **lifecycle** `destroy()`, `[Symbol.dispose]`. **types** `Cleanup`, `Freeable`, `Ownable`. `src/owner.ts`.
  - [`import { memo } from '@typegpu/kit'`](kit/targets.md#following-new-textures): `memo(fn)`. Caches the last two results of `fn`, comparing arguments by identity. **kind** cpu. `src/memo.ts`; afterimage, censer, classroom, fireworks, lattice, ocean, platformer.
  - [`import { census } from '@typegpu/kit/debug'`](kit/pipelines.md#census): `census.create(root, options?) → Census`. Counts pipelines, their bindings per stage, and late compiles. **stability** unstable: may change in any way in a minor release. **kind** tool. **lifecycle** `destroy()`, `[Symbol.dispose]`. **types** `CensusEntry`. **options** `Options` (create) `limits?`. `src/debug/census.ts`.
  - [`import { gpuDebug } from '@typegpu/kit/debug'`](kit/gpu-debug.md): `gpuDebug.install() → GpuDebug`, `gpuDebug.measureText(measurement)`. Installs WebGPU profiling patches without starting recording. **stability** unstable: may change in any way in a minor release. **kind** tool. **owns** up to 16 query sets, 32 buffers, a texture per canvas: per device, while it times passes: timestamps, a buffer they resolve into and one to map; while it measures, a texture each canvas's frames draw into. **lifecycle** `destroy()`, `[Symbol.dispose]`. **requires** `timestamp-query` optional: it asks for it on devices requested after it installs; without it, no timings. **platform** web only. **types** `Measurement`, `Spread`, `Detail`. **options** `MeasureOptions` (GpuDebug.measure) `seconds?`, `dt?`, `detail?`. `src/debug/gpuDebug.ts`.
  - [`import * as web from '@typegpu/kit/web'`](kit/web.md): `web.surface(root, canvas, options?) → Surface`, `web.paced(queue, options?) → Schedule`, `web.orbitControls(orbit, element, options?) → OrbitControls`, `web.pointer(element, options?) → Pointer`, `web.host`, `web.video`. Hosts scenes on web canvases and provides surfaces, GPU pacing, pointer input and orbit controls. **kind** platform. **owns** the canvas's configuration and a resize observer; a hosted scene also owns the surface, its root and the device unless it was given them, the scene's stage and what its `attach` returned. **allocates** each frame: a view of the canvas's texture, which is new every frame; under `paced`, a promise of the frame's work; for `video`, an imported texture per read of a frame. **lifecycle** `destroy()`, `[Symbol.dispose]`. **platform** web only. **types** `CreateScene`, `Scene`, `FixedSize`, `OrbitGoal`, `PointerHandler`, `Stage`. **options** `SurfaceOptions` (surface) `size?`, `maxPixelRatio?`, `format?`, `alphaMode?`, `usage?`, `colorSpace?`, `toneMapping?`; `PacedOptions` (paced) `inFlight?`; `OrbitControlsOptions` (orbitControls) `sensitivity?`, `zoomSpeed?`, `button?`, `pan?`, `page?`, `pointer?`, `onChange?`; `PointerOptions` (pointer) `move?`, `down?`, `up?`, `leave?`, `zoom?`, `page?`, `menu?`; `HostOptions` (host) `canvas`, `optionalFeatures?`, `device?`, `root?`, `schedule?`, `onFrame?`, `attach?`, `onError?`, `format?`, `alphaMode?`, `usage?`, `colorSpace?`, `toneMapping?`, `size?`, `maxPixelRatio?`; `VideoOptions` (video) `mirrored?`. `src/web.ts`.
  - [`import * as native from '@typegpu/kit/native'`](kit/web.md#react-native): `native.surface(root, canvas, { pixelRatio, … }) → Surface`, `native.checkDevice(device)`. Provides a react-native-webgpu canvas surface that pauses in the background, and a check that two threads can share a device. **kind** platform. **owns** the canvas's configuration. **allocates** each frame: a view of the canvas's texture, which is new every frame. **lifecycle** `destroy()`, `[Symbol.dispose]`. **requires** `implicit-device-synchronization` required: react-native-webgpu requests it for every device; `checkDevice` throws without it. Devices used from two threads require it to avoid crashes. **platform** native only. **types** `FixedSize`, `Canvas`. **options** `SurfaceOptions` (surface) `pixelRatio`, `maxPixelRatio?`, `size?`, `format?`, `alphaMode?`, `usage?`, `colorSpace?`, `toneMapping?`. `src/native.ts`.
  - [`import { recordingRoot, offscreenSurface, steppedSchedule } from '@typegpu/kit/testing'`](kit/testing.md): `recordingRoot(options?) → RecordingRoot`, `offscreenSurface(root, { width, height, format, … }) → OffscreenSurface`, `steppedSchedule() → SteppedSchedule`. Runs scene frames in tests without a GPU. **kind** tool. **owns** a texture: an offscreen surface's, replaced when it resizes. **lifecycle** `destroy()`, `[Symbol.dispose]`. **types** `RecordingLog`, `AliveOptions`, `RecordingCounts`. **options** `RecordingOptions` (recordingRoot) `features?`, `limits?`; `OffscreenSurfaceOptions` (offscreenSurface) `width`, `height`, `format`, `pixelRatio?`. `src/testing.ts`.
  - [`import * as hosting from '@typegpu/kit/hosting'`](kit/hosting.md): `hosting.local(create, options?) → Owned`, `hosting.stage(root, surface, createScene, options, hosting) → Promise<Staged>`, `hosting.watch(device, onError)`. Provides shared hosting code without importing React Native. **kind** platform. **owns** a stage's frames and their animation, what its `attach` returned, and the scene, which it destroys. **lifecycle** `destroy()`, `[Symbol.dispose]`. **types** `Callback`, `Scene`, `CreateScene`, `Stage`, `Hosted`, `Detach`, `Pausing`, `CanvasOptions`, `HostOptions`. **options** `OwnOptions` (local) `onError?`; `StageOptions` (stage) `schedule?`, `onError`, `watch?`, `onFrame?`, `attach?`, `release?`. `src/hosting.ts`.
  - [`import { host } from '@typegpu/kit/native/host'`](kit/hosting.md#on-react-native): `host(createScene, options, hosting) → Hosted`. Hosts a scene on a React Native canvas on a worker, the UI runtime or the JS thread. **kind** platform. **owns** a root on the device it is given unless it was given a root, the canvas's configuration, a worker runtime unless it is given one, the scene's stage and what its `attach` returned. **lifecycle** `destroy()`, `[Symbol.dispose]`. **platform** native only. **types** `CreateScene`, `Scene`, `SceneRuntime`, `Stage`. **options** `HostOptions` (host) `on?`, `context`, `width`, `height`, `pixelRatio`, `maxPixelRatio?`, `size?`, `device?`, `root?`, `schedule?`, `onFrame?`, `attach?`, `onError?`, `format?`, `alphaMode?`, `usage?`, `colorSpace?`, `toneMapping?`. `src/native/host.ts`.
  - [`import { useScene } from '@typegpu/kit/native/react'`](kit/hosting.md#on-react-native): `useScene(createScene, options, hosting?) → SceneHandle`. Hosts a scene on a react-native-webgpu `<Canvas>` through `useScene`. **kind** platform. **owns** what `host` owns, plus a requested device: releases them when the component unmounts. **platform** native only. **types** `CreateScene`, `Hosted`, `SceneRuntime`, `Scene`, `Stage`. **options** `UseSceneOptions` (useScene) `on?`, `paused?`, `device?`, `optionalFeatures?`, `onFrame?`, `maxPixelRatio?`, `alphaMode?`. `src/native/react.ts`.
  - [`import * as runtimes from '@typegpu/kit/native/runtimes'`](kit/hosting.md#the-runtime-pieces): `runtimes.worker(options?) → WorkerRuntime`, `runtimes.vsync(runtime) → Vsync`, `runtimes.own(runtime, create, options?) → Owned`, `runtimes.callable(fn) → Callback`, `runtimes.post`, `runtimes.cell`, `runtimes.camera`. Runs GPU work on React Native worklet runtimes. **stability** unstable: may change in any way in a minor release. **kind** platform. **lifecycle** `destroy()`, `[Symbol.dispose]`. **platform** native only. **types** `Callback`, `OwnOptions`, `Schedule`, `Runtime`, `Orientation`, `CameraFrame`. **options** `WorkerOptions` (worker) `name?`, `timerFloor?`. `src/native/runtimes.ts`.
  - [`import { bake, format, ASCII } from '@typegpu/kit/fontBaker'`](kit/text.md#baking-a-font): `bake({ input, … }) → Promise<Bake>`, `format(data)`. This Node build-time tool bakes fonts for `@typegpu/kit` with `@pmndrs/glyph`. **kind** tool. **constants** `ASCII`. **options** `BakeOptions` (bake) `input`, `characters?`, `emSize?`, `pixelRange?`, `fontFaceIndex?`. `src/text/bake.ts`.
  - [`import { watchFrames, instrument, createRecorder } from '@typegpu/kit/debug/recording'`](kit/gpu-debug.md#from-code): `watchFrames(next)`, `instrument(options?) → Instrumentation`, `createRecorder() → Recorder`. Exports the recorder, the WebGPU patches and the frame hook for reading frames without mounting the panel. **stability** unstable: may change in any way in a minor release. **kind** tool. **owns** up to 16 query sets, 32 buffers, a texture per canvas: per device, while it times passes: timestamps, a buffer they resolve into and one to map; while it drives frames, a texture each canvas's frames draw into. **lifecycle** `[Symbol.dispose]`. **requires** `timestamp-query` optional: it asks for it on devices requested after it patches; without it, no timings. **platform** web only. **types** `FrameWatch`, `GpuCommand`, `InstrumentHooks`, `Access`, `GpuResource`, `GpuResourceUse`, `Bar`, `CapturedCommand`, `Dependency`, `FrameCapture`, `Segment`, `Timings`. **options** `InstrumentOptions` (instrument) `frames?`; `DriveOptions` (Instrumentation.drive) `interval`, `warmup`, `duration`. `src/debug/recording.ts`.
  - [`import { GpuDebugPanel } from '@typegpu/kit/debug/gpuDebugPanel'`](kit/gpu-debug.md#react-native): `GpuDebugPanel(props)`. Shows the GPU debug panel over a React Native scene hosted with `useScene` or `host`. **stability** unstable: may change in any way in a minor release. **kind** tool. **owns** a device unless given or provided one, a root, 2 buffers, a bind group, a pipeline, a kit/frames and the graph canvas's configuration; on the scene's runtime, up to 16 query sets and 32 buffers per device while it records, and a texture per canvas while it measures. **requires** `timestamp-query` optional: the scene's device needs it for GPU times; without it, CPU times only. **platform** native only. **types** `Profile`, `GpuDebugPanelProps`. `src/debug/gpuDebugPanel.ts`.
  - [`import { meshes } from '@typegpu/kit/geometry'`](kit/meshes.md): `meshes.unindexed(g) → Geometry`, `meshes.bake(root, g, options?) → BakedIndexed`, `meshes.bakeAsync(root, g, options?) → Promise<BakedIndexed>`, `meshes.bakeIndices(root, g, options?) → BakedIndices`, `meshes.bakeIndicesAsync`, `meshes.sphere`, `meshes.plane`, `meshes.box`, `meshes.cylinder`, `meshes.torus`, `meshes.icosphere`, `meshes.capsule`, `meshes.roundedBox`. Shapes with a vertex count and `vertexAt(i)`, computed in a vertex shader or baked into buffers. **stability** unstable: may change in any way in a minor release. **submits** while setting up: a bake without an encoder or a pass submits a compute pass of its own. **owns** buffers, a pipeline per baked shape: a baked shape's vertices and indices, and the pass that fills them; a computed shape owns nothing. **lifecycle** `destroy()`. **injects** member: a baked shape's vertices and indices, for the pipeline that draws it. **GPU functions** `triangleBarycentrics`, `triangleIndexAt`. **schemas** `Vertex`. **helpers** `attach`, `concat`, `map`, `transform`, `isIndexed`, `parametric`, `patches`, `surfaces`, `triangleVertexCount`, `triangleIndexCount`, `triangleIndices`, `tessellate`. **types** `Attached`, `Placed`, `Topology`, `Parametric`, `ParametricOptions`, `VertexBuffer`, `IndexBuffer`, `PatchSurface`. **options** `BakeOptions` (bake, bakeAsync) `vertices?`, `indices?`, `with?`, `bindGroups?`, `encoder?`, `pass?`; `BakeIndicesOptions` (bakeIndices, bakeIndicesAsync) `indices?`, `with?`, `bindGroups?`, `encoder?`, `pass?`; `SphereOptions` (sphere) `radius?`, `segments?`, `rings?`; `PlaneOptions` (plane) `width?`, `depth?`, `widthSegments?`, `depthSegments?`; `BoxOptions` (box) `width?`, `height?`, `depth?`, `widthSegments?`, `heightSegments?`, `depthSegments?`; `CylinderOptions` (cylinder) `radius?`, `height?`, `radialSegments?`, `heightSegments?`, `caps?`; `TorusOptions` (torus) `radius?`, `tube?`, `ringSegments?`, `tubeSegments?`; `IcosphereOptions` (icosphere) `radius?`, `interpolate?`; `CapsuleOptions` (capsule) `radius?`, `height?`; `RoundedBoxOptions` (roundedBox) `width?`, `height?`, `depth?`, `radius?`; `UpdateOptions` (BakedIndexed.updateVertices, Baked.updateVertices) `bindGroups?`, `encoder?`, `pass?`. `src/geometry/mesh/index.ts`; blockfall, censer, dominoes, fireworks, fishtank, forest, kinetic, lattice, night-market, platformer, quiver-trees, robot-arm, skeletons, solar-system, spider, stampede, survey-model.
  - [`import { circle, lineVariableWidth, polylineVariableWidth, arrowCapParamsSlot, joinSlot, startCapSlot, endCapSlot, LineControlPoint, LineSegmentOutput, JoinInput, circleVertexCount, caps, joins, lineSegmentIndices, lineSegmentWireframeIndices, lineSegmentLeftIndices } from '@typegpu/kit/geometry'`](kit/lines.md#lines-in-your-own-shaders): `'use gpu'` functions that place the vertices of lines, joins, caps and circles on the screen. **stability** unstable: may change in any way in a minor release. **kind** shader. **GPU functions** `circle`, `lineVariableWidth`, `polylineVariableWidth`. **accessors** `arrowCapParamsSlot`, `joinSlot`, `startCapSlot`, `endCapSlot`. **schemas** `LineControlPoint`, `LineSegmentOutput`, `JoinInput`. **helpers** `circleVertexCount`, `caps`, `joins`, `lineSegmentIndices`, `lineSegmentWireframeIndices`, `lineSegmentLeftIndices`. `src/geometry/circle.ts`; survey-model.

## What modules bind

What a stage binds when its shaders read a module's accessors, from the contracts, for budgeting a stage's 8 storage and 12 uniform buffers, the minimum WebGPU guarantees. A buffer counts once however many accessors read it.

| Module        | Storage | Uniform | When a shader reads                                                                                                                |
| ------------- | ------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `bindings`    | 0       | 0       | parts declare entries without binding resources. Each entry uses one binding in the group that holds it.                           |
| `cameras`     | 0       | 1       | `cameras.current.$`, the camera's matrices.                                                                                        |
| `cameras`     | 0       | 1       | `cameras.current.$` reads the previous matrices in code compiled with `history.previously`.                                        |
| `cameras`     | 0       | 1       | `cameras.layered`, every layer's view, beside the layer its description binds.                                                     |
| `liveLists`   | 1       | 0       | `slot` or `instanceSlot`, the live slots.                                                                                          |
| `liveLists`   | 1       | 0       | `count`, the indirect draws.                                                                                                       |
| `liveLists`   | 2       | 0       | `list`, the live slots and their counts.                                                                                           |
| `counters`    | 1       | 0       | `add`, the counters.                                                                                                               |
| `machines`    | 1       | 0       | `state(i)`, the rows.                                                                                                              |
| `machines`    | 1       | 1       | `since(i)`, the rows and the step's length.                                                                                        |
| `machines`    | 1       | 0       | `send`, the events kernels send.                                                                                                   |
| `machines`    | 1       | 0       | `start`, the starts kernels make.                                                                                                  |
| `passes`      | 0       | 0       | what is piped in binds what its own `@binds` say.                                                                                  |
| `passes`      | 0       | 1       | `passes.layer`, the layer drawn, in a pipeline of a description drawn into layers that reads it.                                   |
| `passes`      | 0       | 1       | `passes.viewport`, the drawn region, in a pipeline that reads it.                                                                  |
| `picker`      | 1       | 0       | `found`, the pick's key.                                                                                                           |
| `picker`      | 0       | 1       | `ray`, the pick's point.                                                                                                           |
| `table`       | 1       | 0       | a field, per part, host or device, such as `Boid.position(i)`; `row(i)` binds both parts.                                          |
| `table`       | 1       | 1       | `alive(i)`, the live bits and the span; `span()` and `slotOf(id)` bind only the uniform.                                           |
| `grid`        | 0       | 1       | `walk` or `around`, the box.                                                                                                       |
| `grid`        | 2       | 0       | `range` and `neighbour` or `neighbourAt`, each cell's sorted range and each item's copy.                                           |
| `grid`        | 1       | 0       | `slot` or `slotAt`, the sorted slots.                                                                                              |
| `grid`        | 1       | 0       | `count`, the sorted count.                                                                                                         |
| `grid`        | 3       | 0       | `holds` and `block`, which blocks hold items, the sort count and their list.                                                       |
| `video`       | 0       | 1       | `video.sample`, the orientation, beside the frame and its sampler.                                                                 |
| `dof`         | 0       | 1       | `dof.circle`, the regions, beside the texture.                                                                                     |
| `exposure`    | 1       | 0       | `exposure.current`, read-only.                                                                                                     |
| `taa`         | 0       | 1       | `jitter`, this frame's offset.                                                                                                     |
| `particles`   | 2       | 0       | `emit`, the pool and its ring counter.                                                                                             |
| `particles`   | 1       | 0       | `alive` or `particle`, the pool.                                                                                                   |
| `particles`   | 1       | 1       | `drawnAt`, the pool and the last `compact`'s `ahead`.                                                                              |
| `trails`      | 2       | 0       | `push` or `pointAt`, the points and the rings.                                                                                     |
| `trails`      | 1       | 0       | `held` or `reset` alone, the rings.                                                                                                |
| `trails`      | 2       | 2       | `drawing`, the points and the rings, the settings and `passes.viewport`.                                                           |
| `environment` | 0       | 2       | `sky.ambient` and the environment's functions, the settings and the harmonics, beside the reflection cube and a filtering sampler. |
| `impostors`   | 1       | 0       | the subject's sphere, in the impostors' renderer's pipelines.                                                                      |
| `impostors`   | 1       | 0       | the kind's device rows, where its surface reads the captured `phase`, beside the host rows its transform reads.                    |
| `instances`   | 1       | 0       | a field of its kind's table, per half, as a table's getters bind.                                                                  |
| `instances`   | 0       | 1       | the mesh of an indirect draw, in the vertex stage, without `indirect-first-instance`.                                              |
| `instances`   | 1       | 0       | a renderer's vertex stage, the live rows per mesh or a culling renderer's visible rows.                                            |
| `instances`   | 2       | 1       | a culling renderer's marking kernel, where `place`, `visible` and `bounds` run: the listing, its scratch and the listing's length. |
| `lighting`    | 0       | 1       | `shading.shade`, the sun, sky and fog.                                                                                             |
| `lighting`    | 2       | 1       | `shading.shade` with a table of point lights.                                                                                      |
| `lighting`    | 3       | 1       | `shading.shade` with a table of lights whose positions are on the device, the table's two parts.                                   |
| `lighting`    | 0       | 1       | `shading.shade` with `points.light` or `points.spot`, plus what the function binds.                                                |
| `lighting`    | 0       | 0       | `shading.shade` with `points.candidates`, plus what their functions bind, 2 storage for a neighbour grid's `range` and `slot`.     |
| `lighting`    | 0       | 1       | `shading.shade` with a shadow, the sun's light space and cascades, beside the depth array and its comparison sampler.              |
| `lighting`    | 0       | 1       | `shading.shade` with `pointShadow`, each shadow's light, layers and views, beside their depth array and the comparison sampler.    |
| `lines`       | 2       | 1       | the drawing, the points and the counts, and `passes.viewport`.                                                                     |
| `lines`       | 2       | 0       | `setPoint`, `setCount`, `pointAt` or `held`, the points and the counts.                                                            |
| `meshPool`    | 1       | 0       | `positionAt`, the positions.                                                                                                       |
| `meshPool`    | 2       | 0       | `vertexAt`, the positions and the normals and uvs.                                                                                 |
| `meshPool`    | 1       | 0       | `uv1At`, the second uvs, in a pool made with `uvs1`.                                                                               |
| `meshPool`    | 1       | 0       | `influencesAt`, the joints and weights.                                                                                            |
| `meshPool`    | 1       | 0       | `boundsOf`, every mesh's box.                                                                                                      |
| `meshPool`    | 1       | 0       | `pool.extra`, every vertex's extras.                                                                                               |
| `meshPool`    | 0       | 1       | `pool.texturesOf(index)` for `materials`, beside its textures and sampler, in the fragment stage.                                  |
| `ao`          | 0       | 1       | `ao.at`, the region and frame, beside the texture.                                                                                 |
| `poses`       | 1       | 2       | a skinned vertex, every pose's joints, the poses' slots and the clock that says which half of the joints to read.                  |
| `poses`       | 2       | 2       | `jointPosition`, every pose's joints, the joints' bind origins, the poses' slots and the clock.                                    |
| `poses`       | 2       | 2       | a kernel calling `play`, `once`, `stop`, `mix`, `weigh` or `seconds`, the plays, the clips, the clock and the poses' slots.        |
| `text`        | 3       | 1       | the drawing, the quads, the labels and the font's glyphs, and `passes.viewport` with `text.screen` or `text.pinned`.               |
| `text`        | 1       | 0       | `move` or `setLabel`, the labels.                                                                                                  |
| `text`        | 1       | 0       | `setQuad`, `quadAt` or `erase`, the quads.                                                                                         |
| `meshes`      | 1       | 0       | a baked shape's `vertexAt` or `indexAt`; drawing through `inject()` uses vertex and index buffers without storage bindings.        |
