Avoid Mesh Readback with this one simple trick they don't want you to know about!
Closed this issue · 0 comments
Hey, so I'm looking around this project and the code, and for the most part, it's pretty good.
I saw that you wrote "...I'm sure my implementation can be improved, too. That being said, my whole GPU-based approach might be suboptimal in the first place since I have to read back the mesh to the CPU."
If you have some free time, look into my solution for this: rendering the meshes with Graphics.DrawProceduralIndirect, and to do collision entirely using the volumetric data that I generate and keep on the CPU. That way there is no communication between the two units other than sending my dense & packed volumetric data to the GPU.
Now I did make some mistakes while implementing my system (and I might change that in the following day). I tried to batch my chunks using Graphics.DrawProcerualIndirect and all of that but it didn't quite work as expected and it can be actually slower sometimes.
I know that Nel's Meor has a radically different approach, where the physics is also done on the GPU itself, but that requires running the whole game on the GPU and I'm not really a big fan of that.