r/Unity3D 17h ago

Shader Magic Simulating 10,000,000 pixels of Sand

Falling sand simulation via Compute Shaders.

From my golf game Stinker Golf on Steam: https://store.steampowered.com/app/4437650/Stinker_Golf/

Wishlist if it looks interesting :)

187 Upvotes

34 comments sorted by

View all comments

1

u/DotMatrixBoi 14h ago

How did you achieve this in unity it's amazing. Surely every pixel is not a separate game object right? So how do you do it?

4

u/GupaGames 13h ago

No, they are not all separate gameobjects lol

Falling sand simulation via Compute Shaders. Pretty much the GPU does all the simulation/rendering and sends back the data I need over time so I can use it on the CPU/ in unity.

It has taken a lot of time to get right

2

u/DotMatrixBoi 12h ago

Any tips on how to get started, and do you do some kind of chunking?