TechniquesNewPhysical sky
A sky worked out from the air itself on WebGPU (the same passes on WebGL2 where it is missing).

The HaTac engine’s two text parts, lifted whole and engine-free.
Surface text bakes a sign, a livery, a stencil or a machine label into a colour tile and a separate letter-coverage tile in one shared atlas, painted once with Canvas 2D (in a worker too) and lit, scratched and roughened by the receiving surface like any paint: lines in metres with their own family, weight, colour, alignment and tracking, shrink-to-fit or wrap with a fit report, plates with borders, stencil bridges cut from every enclosed counter, seeded overspray, three isolated mips per tile, identical wordings sharing one tile by content hash, leases that repaint in place when sole and detach when shared, and font loads that repaint without moving the UVs. MSDF text reads TrueType and CFF fonts from their bytes (kerning from kern and GPOS), lays out lines with wrapping and basic right-to-left runs, builds an edge-coloured multi-channel distance atlas with a true-distance channel, and draws labels in one instanced pass per page, on the screen, as billboards or on a surface, depth-tested, with outline, glow and shadow, sharp at any zoom. A small host gives a plain WebGPU page the shared frame group, a reverse-Z camera and the paint snippet. No three.js, no dependencies.
Measured 29 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 3.16–3.27, CPU 0.39–0.43 ms). What ran: Alone: one painted plate (a 1.2 × 0.48 m surface-text panel at 420 px/m, its colour and letter mask from one 2048² atlas page with three mips) on a steel backing, lit by the sun with distance-field soft shadows; MSDF text in the three placements (a surface display, a billboard and a screen caption, about 60 glyphs from one 512² page of Bitstream Vera), depth-tested, 4× multisampling at high. 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("world-lettering")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it upFrom HaTac. Adapted from published work, named below.
Hannes Andersson: The HaTac engine’s surface-text and msdf-text modules, their recipe kind, decisions, tests and measurements; the library’s host and demo.
Viktor Chlumský, msdfgen and Shape Decomposition for Multi-channel Distance Fields (2015): The multi-channel distance field the atlas builds (edge colouring, the median reconstruction); the engine’s README cites it as the reference.
Bitstream, Inc., Bitstream Vera Sans: The font the demo’s MSDF labels and the ported tests read; free to redistribute under the Bitstream Vera licence (demo-fonts/bitstream-vera-license.txt).
The Inter Project Authors, Inter: The demo’s painted sans (SIL OFL 1.1, demo-fonts/inter-OFL.txt).
The JetBrains Mono Project Authors, JetBrains Mono: The demo’s stencil and plate mono (SIL OFL 1.1, demo-fonts/jetbrains-mono-OFL.txt).
Third-party terms ship with it in NOTICE.md.