← All resources

Slug Algorithm (WebGPU)

Auto-discovered

Library / Codebase Intermediate

diffusionstudio

Visit resource ↗

Description

Slug Algorithm (WebGPU) is an open-source diffusionstudio GitHub repository that ports Eric Lengyel's Slug vector text algorithm to WebGPU with WGSL shaders.

It covers CPU text shaping via text-shaper, quadratic Bezier outline extraction, band organization, and GPU Slug rasterization. The tree includes WGSL shaders, a minimal WebGPU setup, TypeScript shaping, and an Inter font example.

It is for intermediate WebGPU developers who want resolution-independent browser text without glyph atlases and can run Bun plus a WebGPU browser such as Chrome or Edge.

Access is free under MIT: clone, bun install, and follow the README. The project credits Lengyel's public-domain algorithm release.

It is useful as a concrete WGSL reference for studying or adopting Slug-style GPU text on the web.