3 ms·
Or you can just draw cones into the screen centered on each vertex and let the z-buffer do the dirty work... http://blog.alexbeutel.com/332/interactive-voronoi
by varelse 12y ago
Or you can just draw cones into the screen centered on each vertex and let the z-buffer do the dirty work...
http://blog.alexbeutel.com/332/interactive-voronoi-diagrams-with-webgl/ http://blog.alexbeutel.com/332/interactive-voronoi-diagrams-...
- nkurz 12y agoIt's a nifty technique, but I think that's the same approach that is discussed in the article? That's when it hit me! Render each seed as cone pointed towards the camera in an orthographic projection, coloring each cone according to the seed's color. The Voronoi diagram would work itself out automatically in the depth buffer. That is, rather than do all this distance comparison in the shader, let OpenGL do its normal job of figuring out the scene geometry.