Voxel Game – Graphics Engine

Posted by:

|

On:

|

Over the past few weeks I’ve been reworking the graphics portion of my game engine to improve performance. At the beginning of this process the engine could render 27 32-voxel chunks of terrain at about 2 fps. A bit of profiling revealed that the worst bottleneck was in the way I generated quads – iterating through the chunk data and making tons of little quad objects as intermediates between the model and the shader might be fine for getting an image on the screen, but it won’t cut it for a game. To shortcut the quad objects and make better use of the CPU, I decided to implement instanced rendering. With the instancing shader in place, I’m currently cutting out the now-obsolete quad intermediates.