r/GraphicsProgramming • u/nathan82 • Oct 10 '26
Mobile GPU Realtime Fluid Sim
The sim came out great but what about the lighting!! All just cubemaps, with fluid depth affecting the roughness mip level. So happy with this.
9
u/VictoryMotel Oct 10 '26
Can you talk about some of the optimizations you did, libraries you used or papers you studied?
13
u/nathan82 Oct 10 '26
Mostly based on this paper as a starting point: https://yzhu.io/publication/mpmmls2018siggraph/paper.pdf
The optimisations were mainly around scaling the cell size intelligently, for the right performance/resolution balance. And some bit packing in the particles. Also dynamically adjusting the number of sim steps depending on frame budget. I'll try to answer if you have specific questions but this is a commercial app so I don't want to give too much away.
94
4
4
2
2
2
2
u/MasqueradeOfSilence Oct 10 '26
This reminds me of that Hershey's app back in like 2010 where you could pretend to drink chocolate milk. But better, because of the dimensionality. Awesome!
1
67
u/mars_santa Oct 10 '26
Great effect. It might be interesting to tie the lighting to the phone's light sensor. That way the water would match the ambient environment?