aresrpg / aresrpg-engine

Voxel rendering engine
1 stars 0 forks source link

Terrain: reduce number of draw calls #17

Closed piellardj closed 3 months ago

piellardj commented 3 months ago

This is an optimization that could potentially greatly reduce the number of draw calls made to draw the terrain.

Currently, for technical reasons each patch makes 6 draw calls: on for each voxel face (first draw is all faces facing up, second is all faces facing down, etc.). Some of these calls are useless since for neighbour/distant patches, we know for sure 3 of those draw calls are useless.

Other solution would be to draw the patch with a single draw call, but it poses other issues.