Skin on the GPU - 40206111/CreatureGenerator2.0 GitHub Wiki
Description
The marching cubes mesh generation can be done in parallel so I reckon I should be able to do it with compute shaders on the GPU.
Goals
- Speed up the time it takes to generate the skin mesh so I make larger more complex creatures
- Learn how to use compute shaders in Unity
Process
I am using this tutorial as reference for how to use compute shaders in Unity:
I think I want the compute shader to generate the grid of points used to make the cubes for marching cubes and then use that to return the correct mesh data. ( this is out of the scope of this task but I think I could also calculate the skeleton shape on the GPU )
The Shader should take in the Skeleton points and generate the grid, it should then use this grid to define the mesh.
Notes
My brain does not think in the way this works naturally. What I currently have is overriding the marching cubes grid for each skeleton point. I think I need to try to think about how this should work from scratch maybe using instancing and trying to be less dynamic with the data. I should look at what we did in the graphics playground at work and see if that can help me understand what I should be doing.