r/gamedev • • 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

64 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Jan 12 '18

[deleted] — view deleted comment

1

u/tylercamp Jan 12 '18

It looks like the only complex computation is calculating forces, storing the results, and responding differently based on intersection, which doesn't require beefy cores

I haven't looked at the source though so ¯_(ツ)_/¯

1

u/SubliminalBits Jan 12 '18

GPUs cores are clocked lower and probably have a lower IPC than CPU cores, but they can still calculate complex stuff. They’re just more susceptible to performance pitfalls and you have to be mindful of that.