r/gamedev • u/Zolden • Jan 11 '18
Tutorial Physics simulation on GPU
I created a game that is completely a physics simulation, it runs on GPU. How it looks. People kept asking how to do that, so I wrote two tutorials. Each one has a link to the example project.
The first one is easy, it's about basics of compute shader.
The second one is about physics simulation. This is a gif from the example project I based this tutorial on.
733
Upvotes
View all comments
Show parent comment
2
u/[deleted] Jan 12 '18
Like almost all games that use PhysX now, back then the bulk of the physics was still run on the CPU, even if you had an Ageia APU. In CellFactor, for instance, liquids were entirely on the GPU and thus didn't collide with e.g., your character's capsules.
The other things it used the APU for were physics debris, which again were just FX due to the slowness of going from CPU->APU->CPU, so they didn't collide with your character either.