Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

jwin

1
Posts
1
Topics
A member registered Sep 03, 2015 · View creator page →

Creator of

Recent community posts

While testing out Clayxels, I noticed the majority of the time was being spent in Gfx.GetComputeBufferData_Request.  This seems to be caused by getting the buffer count in Clayxel.cs ln 622.  I also tried caching the buffer count between frames, and noticed that it greatly increased my framerate with several Clayxel objects.

I've changed Clayxel.cs in my local copy to add ClayxelChunk.cachedCount, which simply stores the value from getBufferCount until the chunk is modified:

-   int numpoints = this.getBufferCount(chunk.chunkOutPointsBuffer) * 3;
+   if (chunk.cachedCount <= 0) {
+       chunk.cachedCount = this.getBufferCount(chunk.chunkOutPointsBuffer) * 3;
+   }

The best solution is probably keeping the buffer count on the GPU using Graphics.DrawProceduralIndirect instead of Graphics.DrawProdedural, since that will avoid the Gfx.GetComputeData_Request even on frames where the Clayxel is modified, but I have no idea how much work that would be.