Thanks for the comments. Yeah I think I’ll give the unity free version a try. I’m just scared of using Get and SetPixels since it is pretty slow but I might be able to compute it per vertex rather than per pixel. Glad you guys enjoyed it I thought it might be useful in games. I’ll be coming out with some more iOS friendly shader stuff next week.
Thanks ZJP, it works on Safari for me but for some reason my Chrome wasn’t. I guess I need to go check some of my user preferences… It was just opening up a tab with the link but nothing was being downloaded… First time I had that issue on these forums.
Thanks for sharing brianasu! This is going to be helpful.
-Dane
It’s interesting that the author of that article you mentioned claims that the water ripples need to lose energy. In a force based simulation, the waves eventually cancel each other out automatically anyway. It’s probably losing some energy automatically, due to precision errors, but there’s no need to actually apply an extra dampening force, because that happens automatically due to pressure. The waves get shallower over distance anyway, due to the force being applied to more and more pixels, resulting in less displacement per pixel.
Anyway, still a nice demo. What kind of precision textures does it require? If it only requires standard ARGB32 RenderTextures, that would definitely be an advantage over a more complex simulation.
Yeah you are correct RC-1290. You lose a lot of precision. I’m using just the red channel so 8-bit precision since I can’t seem to get depth or any floating point textures working on iOS. I haven’t tried it yet but it’s possible to pack float into the 32-bit argb but it requires like something like 4-5 multiplications * 4 texture samples to get the surrounding energy