Public
Remixed
Live gallery of Paper's open-source shaders
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

Paper Shaders — live on Val Town

A live gallery of every shader in Paper's open-source library, which they released free under Apache 2.0.

Each tile is a single React component from @paper-design/shaders-react, imported straight from esm.sh — no build step. Three kinds:

  • generative — render from color params alone
  • image filters — apply an effect to an image (fluted glass, halftone, water, image dithering, paper texture)
  • logo animations — shape a material/effect to a silhouette (liquid metal, heatmap, gem smoke)

The image/logo shaders run on original SVG artwork (frontend/components/images.ts), so the val is fully self-contained and there's no third-party image to license.

Each shader is a live WebGL canvas, and Chrome caps a page at ~16 GL contexts — so App.tsx only mounts the ~12 nearest the viewport at a time (see CAP), tearing others down as you scroll. Un-mounted tiles show a CSS "poster" of the shader's colors that comes alive when scrolled into view.

Structure

FilePurpose
index.tsHono server — serves the frontend + /source redirect
frontend/index.htmlHTML shell (Twind CDN, dark theme)
frontend/index.tsxMounts the React app
frontend/components/App.tsxHeader + grid + the viewport/GL-context-budget logic
frontend/components/ShaderTile.tsxOne tile: poster + live shader overlay + error boundary
frontend/components/shaders.tsThe shader catalog (component + props + poster colors)
frontend/components/images.tsOriginal SVG artwork used by the image/logo shaders