Saturday, December 22, 2012

Display Lists and Combination Shaders

Things are looking up. Thanks to some great advice from Gavan Woolery (If you haven't checked out his voxel engine yet, get out from under that rock!) I redid my entire voxel engine to use Display Lists rather than VBOs.

The engine can now render a 1000x1000 map using about 300MB whereas previously it took over 1GB to render a 400x400 map. Great success!

I also redid the shader to take into accout not only ambient occlusion but also establish whether a vertex can actually 'see' the light source. These two values are then combined and allows the engine to create much more realistic looking shadows.

I'll be looking at getting the shader much faster and also at threading chunk creation. Here are some screenshots with corresponding chunk creation stats. All renderings were done with 64 rays.

Best case scenario is where there are no overhangs. In this case the engine can create around 90 chunks per second.

Worst case scenario is when there are lots of overhangs. In this case the engine can create around 135 chunks per second.

No comments:

Post a Comment