Unending quest for speed.

Today it’s time to refine ( implement slightly better ) the collision algorithm. I’m using 10,000 volumes against the terrain which I’m rebuilding per frame … this is a massive hit on the CPU …  the mission today is to remove/lessen that hit. But first, displaying the results of the collisions requires visualisation and that’s not being done efficiently which is obscuring the timing results ( psychologically ). At the start of the day, I’m getting roughly 28 ms to do the work, switching off rendering brings that down to 1.9ms … the solution is to render the collision meshes in one go and not individually ( obviously. )

And then he realised that each triangle mesh was stored in a different vertex buffer forming 10,000 disparate meshes having nothing to do with instancing … buffer accumulation it is then … he thought.


The white triangles represent the places where the collision volumes have intersected the terrain mesh triangles. There are 200k+ triangles used to represent the intersections and so many draw calls and buffer swaps that the renderer can barely function.

This entry was posted in Development Log. Bookmark the permalink.

Leave a Reply