Sheets

rasterize: draw a grid simulation's cells as a deforming sheet of triangles into an offscreen texture, so a body can read what the sheet shows at each pixel: which part of the sheet (sheet(uv).xy), how deep it is (.z), whether it covers the pixel (.w), and which way it faces (sheet.normal(uv).xyz). Cloth, folding paper, peeling layers.

The component's own output is still one full-screen quad: the triangles only ever land in this texture. No camera, models or scene.

import {rasterize} from 'shaders/std'

Types

TypeWhat it is
RasterizeInputinterface RasterizeInput extends InputNode { readonly kind: 'rasterize' readonly grid: GridSim | InputNode readonly scale: number readonly holes: string | null }

Words