4 ms·
It's not particularly efficient, but probably the easiest way to draw Voronoi diagrams on the GPU doesn't require a shader at all. Instead, use an orthographic
by ewencp 10y ago
It's not particularly efficient, but probably the easiest way to draw Voronoi diagrams on the GPU doesn't require a shader at all. Instead, use an orthographic projection and draw cones for each vertex with the cone's apex at the vertex and its axis oriented into the screen. Then the GPU's z-buffer takes care of choosing which vertex is closes to the given pixel.
- rjkaplan 10y agoYeah! It's a pretty big omission in my post that I don't talk about other methods of generating Voronoi diagrams, but I wanted to keep it relatively short. Chris Wellons has a great article on the method that you mention: http://nullprogram.com/blog/2014/06/01/ http://nullprogram.com/blog/2014/06/01/ It's also mentioned in the OpenGL red book: http://www.glprogramming.com/red/chapter14.html#name19 http://www.glprogramming.com/red/chapter14.html#name19
- lmeyerov 10y agoYes, this is similar to what I and others described! Underneath, similar stuff going on in the HW :)