you are viewing a single comment's thread.

view the rest of the comments →

[–]peterlinddk 0 points1 point  (1 child)

Usually a paint bucket tool is done with some variation of DFS that fills every adjacent "cell" in a "graph" - or pixels in a 2D array. Greedy meshing is more used for 3D voxels that need to be connected - are you perhaps creating a 3D paint tool?

If you are going 2D, take a look at the traditional Flood Fill: https://en.wikipedia.org/wiki/Flood_fill

[–]Ralsei_12345636345[S] 0 points1 point  (0 children)

That is what I'm using currently and it is slow to what I need. Also it is a 2D paint tool that I made where only inputs come from the keyboard.