Urgent.News

What's breaking now, across thousands of outlets.

Tech

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.

Read the original at crocidb.com →

More in Tech

The EU Bans Social Media For Under-13s

The bloc wants to curb Big Tech’s grip on children with its new EU KIDS ACTS, but age checks, parental oversight, and privacy concerns could make its plan difficult to implement.

More from Wednesday 16 September →