Radix sort in pure fragment shaders: 5B key/value pairs/sec with zero compute shaders
Michael_Moroz_ · x · 2026-09-03
- MichaelMoroz implemented a radix sort using only fragment shader blits in VRChat's Udon — no compute, no atomics, no scatter writes.
- Keys live in a float2 texture in Morton order; each pass handles 4 bits via three blits plus a mip generation: a histogram pass packs digits as exact integers in floats, the GPU mipmapper performs the prefix scan (exact up to 2^24 elements), and gathering is inverted since scatter is impossible.
- Optimized, it sorts 5 billion key/value pairs per second with zero compute shaders, making sorting a negligible cost and enabling an infinite unbounded SPH particle simulation.
Related event: Developer Implements Radix Sort Using Only Fragment Shaders in VRChat(2 posts)→
More from coding & agent
- ComfyUI plugin caches MiniMax H3 conditioning to disk: 1.12s cache hits, 14GB RAM saved — Any_Fee5299 · 2026-09-03
- Open-source coding agent Pi hits 100,000 GitHub stars, v2 teased — gklambauer · 2026-09-03
- Codebase-specific agent harnesses may beat general-purpose ones, argues secemp9 — secemp9 · 2026-09-03
- Teknium runs Hermes Agent for 15 hours with recursive subagents, shedding 375,000 lines of code — Teknium · 2026-09-03
- Building a local Gemma planner-executor-critic agent pipeline for web research — HlddenDreck · 2026-09-03
- Dev builds Arcon: a local AI assistant on Qwen3-4B with memory, mood and tools — Feathered-Beast · 2026-09-03