u/matigekunstin r/GraphicsProgramming • Recommends
XPBD on the GPU
I'm trying to write a soft-body simulation using XPBD on the GPU using shaders. I came across this video: [video by one of the authors. So far I've only implemented the edge constraint/spring forces and no volumetric constraints. I'm running into an issue with substepping on the GPU. In the video they loop over all vertices within a substep in a sequential fashion updating the position of a vertex and the position of its connected neighbours. Here-in lies the issue for me: multiple threads are accessing the same position buffer. Does anyone know how to solve this?
Here is my code. Anything prefaced by i, e.g. iP\id\, is an incoming buffer and anything without an i, e.…