Automatic quad resizer


Water2D performs a Clip() shader function to achieve pixels can be render in the scene. This function is very expensive in Mobile devices because break the optimization in the GPU for opaque geometry.

How do I optimize? Currently Water2D PRO do has a simple resizing bounding mesh to help render pixels less as possible and avoid dead time calculation on every empty pixel:





Force to just one style per scene
You can optimize even more avoiding Multiples styles of fluids spawners (i.e: try to use Regular water in all spawners in same scene)



Refracting style will kill your mobile GPU
Try avoid refracting style in mobile platform because contains too many calculations per pixel in each frame, specially if your device is old.



Amount of particles

Remember that Water2D is a tool for representing small-scale fluids simulations. Use only the amount of particles you think necessary. Also you can take help from live-particles bar from the inspector to set the precise amount for your simulation.


i.e.: In this example is convenient reducing to 119 because with180 you're wasting memory and useless math calculation with 61 unused particles.




Quality of the final texture

You can reduce (or increase if you prefer quality instead performance) the sample size of the texture in the final effect. By default is set to 128x128 pixels and it is balanced between quality and speed of process. In mobile devices you should not pass the 128 or 256 pixels. 

You will notice that in refracting style the sample size affect directly the background texture in then final result.



Sample texture in 128x128 pixels:


Sample texture in 1024x1024 pixels:



Deactivate "Blending Colors"

Try to disable blending colors if is not mandatory for your project. 




Deactivate "Background Camera" when is not using

Background camera is responsible to grab the background texture and then put it in the renderer queue to achieve refracting effects and also all objects of the back. You can relieve the render process a little more when deactivate it. 




I hope this article has been helpful.