When adding a fractional part to a number fixes your shader
On a particular night, the author decided to create a Voronoi-diagram shader for a music video background. Voronoi Noise, a relatively new algorithm for the author, produced mesmerizing geometric and organic patterns. The author implemented the algorithm and was pleased with the result. However, the next morning, the animation on one of the author's computers started stuttering.
Intrigued, the author began investigating the issue. After a week of debugging and disassembling shaders, the author discovered the problem lay within the code generating Voronoi centers. The specific lines causing the stutter were related to the fract function call, which seemed to have a continuity issue in Nvidia 40xx drivers.
The author sought help from graphics programmer friends but received no assistance. Ultimately, the author resolved the issue and shared the final shader on Shadertoy.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.