News for hackers. Stuff that matters.
Re:Simulating Water over Terrain by pornel on Thursday February 06, 2025 @02:43PM (#42965790)
Storing values at the edges of cells makes the math simpler, but unfortunately makes a GPU implementation harder.

In this setup one edge update affects two cells, so the cells are no longer trivially independent. It's still possible to update cells in parallel, but it requires splitting the update into two checkerboard-like passes.

Re:Simulating Water over Terrain by lisyarus on Thursday February 06, 2025 @02:54PM (#42965881)
It's true that it makes it more complicated on the GPU side in general, but specifically in this scenario everything works out just fine, mostly because all updates effectively ping-pong between flow & water height buffers, and you never change both in the same kernel.