New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Reference HLSL shaders for the Slug vector font algorithm that render glyphs on the GPU without textures.

skills.sh installs
1.2K
GitHub stars
98
last updated
Jul 14, 2026
View on GitHub

What it does

  • Covers slug.hlsl for core coverage, curve.hlsl for Bézier and line evaluation, and band.hlsl for band-based optimization
  • Provides a vertex and fragment shader pattern plus winding-number and anti-aliasing helper functions
  • Requires preprocessing TrueType or OpenType outlines on the CPU into quadratic curve and line records in a GPU buffer
  • Designed for engines that need resolution-independent text rendering on D3D11, D3D12, or Vulkan

Install

$ npx -y skills add reason-machines/trending-skills --skill slug-font-rendering -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Slug Font Rendering Algorithm

Skill by ara.so — Daily 2026 Skills collection.

Slug is a reference implementation of the Slug font rendering algorithm — a GPU-accelerated technique for rendering vector fonts and glyphs at arbitrary scales with high quality anti-aliasing. It works by encoding glyph outlines as lists of quadratic Bézier curves and line segments, then resolving coverage directly in fragment shaders without pre-rasterized textures.

Paper: JCGT 2017 — Slug Algorithm
Blog (updates): A Decade of Slug
License: MIT — Patent dedicated to public domain. Credit required if distributed.


What Slug Does

  • Renders TrueType/OpenType glyphs entirely on the GPU
  • No texture atlases or pre-rasterization needed
  • Scales to any resolution without quality loss
  • Anti-aliased coverage computed per-fragment using Bézier math
  • Works with any rendering API that supports programmable shaders (D3D11/12, Vulkan, Metal via translation)

Repository Structure

Details

Repository
github.com/reason-machines/trending-skills
Category
Game Development
First seen
Apr 16, 2026

More from reason-machines/trending-skills

All 163

Similar to Slug Font Rendering

More Game Development