Surfaces & materialsNewGPU meadow grass
Hundreds of thousands of curved blades decided on the GPU every frame.

Procedural materials baked on the GPU and drawn in a raw WebGPU app, with no engine and no three.js.
A material is a recipe in the material designer’s format (a base and a stack of layers: noise, cells, tiles, wood, marble, scratches, weave, dents, flakes, scatter, panels with rivets, tread plates and grilles, scales, strata, ripples, drips, derived curvature, painting kernels such as bricks and bolted panels, and whole materials laid over each other). A material set shows every material at once as a stand-in in its mean colour, compiles one layer pipeline for every kind the set uses, bakes one material a frame (one compute pass a layer, then normals, curvature, cavity, horizon occlusion and mips on the GPU) into three compact 8-bit maps, and fades each in. Drawing is one WGSL include: triplanar in each shape’s own space, parallax up close, hex tiling for large surfaces, wear worked out from the shape (bare edges, grime in hollows, dust on top), a palette colour applied as drawn, finishes per object and a style switch (stylized, painterly, flat, toon), all without a bake. A cache keyed by the recipe’s hash keeps the maps for the next start. 39 presets at their real-world sizes, and a small host for a page with no engine: a device, shapes that carry edge data, a lit draw with a shadow and a gallery of material balls.
Measured 25 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 158, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 1.31–2.45, CPU 0.20–0.37 ms). What ran: Alone: the rounded block wearing worn painted metal, baked once at the tier’s map size before the measured frames, then drawn each frame with its shadow (triplanar reads, wear from the shape, multisampled at 4×) over the studio backdrop. The number is the draw; the bake is reported on the stage. Phones: tiers are being measured next.
Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.
install("material-bake")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it upfirst).From HaTac. Fully custom code.
Hannes Andersson: The HaTac engine’s material kernels, material build, material set, presets and decisions; the library’s host and demo.
Michael Toksvig, “Mipmapping Normal Maps” (2005): The mips widen roughness by how short the averaged normal gets.
Ben Golus, “Normal Mapping for a Triplanar Shader” (2017): The whiteout blend of the three projections’ normals (draw-wgsl.ts).
Natalya Tatarchuk, parallax occlusion mapping (2006): The parallax march with a secant step between its last two samples (draw-wgsl.ts).
Morten S. Mikkelsen, “Practical Real-Time Hex-Tiling” (JCGT 2022), after Eric Heitz and Fabrice Neyret (HPG 2018): The hex tiling: a triangle grid, an offset and a turn per hexagon, the higher relief on top (draw-wgsl.ts).
Ken Perlin (gradient noise) and Steven Worley (cellular noise): The periodic noise and cells behind most layer kinds, as in material-designer.