All work

pixi-silk

Crisp vector graphics for PixiJS v8

A Graphics-like API where every shape is a distance field, anti-aliased per pixel in the shader. Squircles, dashes, OKLab gradients and glows in one draw call per object, verified pixel-by-pixel on WebGL1, WebGL2, WebGPU and Direct3D.

Docs & Studio Source npm
  • UI shapes stay sharp at any scale

    Buttons, frames and win lines are drawn as distance fields, so they do not go lumpy when a game scales to a tablet.

  • Verified on every backend

    Rendering is compared pixel by pixel on WebGL1, WebGL2, WebGPU and Direct3D, where shader bugs usually hide.

Why

Pixi's Graphics tessellates shapes into triangles. That's fast, but rounded rectangles go lumpy when scaled, thin strokes shimmer, and anything soft (glows, gradients) turns into a texture you have to manage. Slot UIs are full of exactly those shapes: pill buttons, squircle frames, dashed win lines.

pixi-silk draws each shape as a signed distance field and resolves coverage per pixel in the fragment shader. The edges stay sharp at any scale, and gradients are interpolated in OKLab so they don't go muddy in the middle.

What it covers

  • Rectangles, squircles, circles, arcs, polylines and dashes, with strokes and fills.
  • OKLab gradients and glows.
  • Device-pixel-exact canvases.
  • SilkText with RTL, full bidi and colour emoji (November 2026).
  • A Studio for designing shapes interactively.
  • Opt-in WebGL1 via pixi-silk/webgl1.

Verified in pixels

scripts/check-render.mjs renders the hard cases in headless Chrome and checks the output: no double blending at overlapping edges, full interior coverage, and parity between WebGL2, WebGPU and WebGL1. A separate workflow runs the same checks on Windows through Direct3D 11 (WARP), because ANGLE on D3D is where shader edge cases go to hide.

pixi-silk also draws the debug overlays for pixi-reels and pixi-marrow.