This is my first time trying to implement position-based-fluids.
I think there is still something wrong.
But after 2 days of research i think it looks ok.
Finding the correct parameters is a real pain. To get surface tension you need to adjust the "tensile instablitiy"-parameters and the rest-densitiy. But as i said, its realy hard to get these right (at least for my implementation).
Here is the sourcecode:
[ Ссылка ]
Let me know if you find a bug or a wrong calculation :)
Ещё видео!