Skip to content

Pieces

A piece is a folder of a manifest and WGSL files with a derive half and a draw half, identified by a SHA-256 hash that a program pins with its name and version, and read from the library, the workspace or the open spec.

Field Value
ID SPC-50
Status Shipped
Scope Core
Pillar Builder and Specs
Sprint None
Depends On Custom WGSL Views (SPC-14)
Unblocks Programmable Graphics (REN-77)
Piece Commands (SPC-51)
Provenance Review State (SPC-52)
Docs Pieces, Piece Folder
Branches None
Design None

Coverage Ledger

  • Pieces. A piece is a reusable module of graphics with a derive half in the script and a draw half in the viewer.
  • Pieces, Piece Folder. A piece is a folder of piece.toml and up to three WGSL files, inside the workspace's pieces folder.
  • Pieces, Piece Manifest. The manifest names the piece, its version, inputs, params, resources, imports, dependencies, halves, sample and hash.
  • Pieces, Inputs and Parameters. Inputs bind tensors or other programs' buffers, and params become controls.
  • Pieces, Shader Imports. Imports resolve before the compiler with a rewrite that keeps every line and column.
  • Pieces, Hashes and Pins. The hash covers the canonical manifest and the resolved WGSL, the same on every platform.
  • Pieces, Piece Sources. Library, workspace and inline pieces share one format.
  • Pieces, Hashes and Pins. A program pins a piece by name, version and hash, and a missing or changed piece refuses the program.
  • Pieces, Program Instances. A program of a spec is an instance of a piece with bindings, params and a panel.
  • Pieces, Program Instances. A buffer input that binds another program's resource makes the programs a graph.

Roadmap Graph Feature in Graph