Menu

Building a Multi-Pass Phosphor Rendering Pipeline in WebGL
πŸ–ΌοΈ

Building a Multi-Pass Phosphor Rendering Pipeline in WebGL

DEV CommunityΒ·The L? ManΒ·6 months ago
#8PUnq6nT
#pass#webgl#javascript#creativecoding#phosphor
Reading 0:00
15s threshold

Vintage oscilloscopes have a look that's hard to fake. The phosphor coating on the CRT glows where the electron beam hits, fades slowly over time, and bleeds light into surrounding pixels. That persistence and bloom is what gives oscilloscope traces their characteristic warmth.

I wanted to recreate that look in the browser. Not as a post-processing filter on top of a line, but as a physically-inspired rendering pipeline where each frame's energy accumulates, decays, and blooms the way real phosphor does.

The result is Phosphor , a web-based oscilloscope simulator with 5 signal modes, real-time audio visualization, and a 4-pass GLSL shader pipeline.

β†’ Try the Live Demo | Source Code (MIT)

This post walks through how the rendering works.

The Pipeline

Each frame goes through four shader passes:

Signal Data ↓ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Pass 1: BEAM β”‚ Soft gaussian dots, additive blending (HDR) β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ↓ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Pass 2: PHOSPHORβ”‚ Exponential decay persistence (linear HDR)…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.