Whether that's WebGL or the programming is something I don't know.
Whether that's WebGL or the programming is something I don't know.
Well. There are a couple of reasons for this. First of all: yes, it should keep 4 CPUs busy. I spawn of four background workers so it pretty much hogs everything.
That said, not only the world generation is slow right now, also the VBO generation is because I do some very conservative invalidation which causes some VBOs to be generated multiple times.
I have a lot of stuff that I can do to make this faster and my local version already performs better but I caused some bugs in the coordinate system conversion and my frustum culling. I have to iron this out first before I update the live demo.
This version (rendering wise) on my Mac does actually render faster than Minecraft at equal rendering distances.
Everyone, and their dog, have been writing Minecraft-style world rendering demos for a few years now and there are also quite a few blog posts that describe the world generation algorithm. They're always an interesting read, but I would be more interested in how you get that stuff to the GPU and how do you render it.
Also some insights about WebGL limitations would be welcome. Would your task have been easier if you could memory map your vertex buffers or use instanced draw calls? This is the kind of stuff I'd love to hear about as a graphics programmer.