Ralith / hypermine

A hyperbolic voxel game
Apache License 2.0
160 stars 19 forks source link

Optimize chunk transform streaming #55

Open Ralith opened 4 years ago

Ralith commented 4 years ago

Currently, for each frame, for each chunk, we invoke vkCmdUpdateBuffer with the transform from that chunk to the local node. In a valley, this can add up to hundreds of kilobytes. This is a bit of an abuse of vkCmdUpdateBuffer and may explain the large CPU time spent preparing to render chunks. There are a number of improvements to be made:

Ralith commented 4 years ago

Partially fixed by #63. CPU use during graph traversal remains significant, but performance is much improved overall.

Ralith commented 4 years ago

The precomputed transform table could also potentially form a foundation for removing per-chunk draw calls, in favor of a multi-draw-indirect with compute frustum culling.