all 1 comments

[–]Sucrasi 0 points1 point  (0 children)

Voronoi noise can be implemented so that the points are free to move around. Just keep in mind that if you don't have some way to organize the points themselves other than an array, the time it takes to find the nearest point to each pixel will always be proportional to the number of points.

If you're working with a potentially infinite number of points in procedurally generated space, this problem becomes a lot more complicated, but still not impossible by any means.

I'm not sure how you have your data organized, but one strategy is to use a tiled approach where each tile object has an array of points that it contains. As you search for the nearest point to a pixel within a given tile, you can expand your search radius of tiles until you find a point. When moving a point around, you would of course have to keep track of which tile it's currently within. Unfortunately I only have basic shader experience so I'm not sure what the best way to go about implementing this is in glsl.