Holofragment::overview();
A Hatsune Miku lyric visualizer for Magical Mirai 2026, an international programming contest, built with Eason Chou in TypeScript, three.js, and GLSL. Eason set up the songs and the initial TextAlive API connection; I built everything else: particles, glass sphere, water, aurora.
65,000 particles run on the GPU in ping-pong float textures, drifting through a curl noise field built from layered Perlin noise. When a lyric appears, target points are sampled from each letter's mesh surface using barycentric coordinates and the particles fly toward them, faster on the beat.
The glass sphere performs screen-space refraction, sampling an offscreen frame at each ray's exit point with a Fresnel blend against the environment reflection and Beer-Lambert tinting by glass thickness. A water surface reflects the aurora with layered noise distorting the reflection. On mobile, render resolution halves to maintain 60 fps.