Most of the market on the mobile game, the surface is relatively rough, but also basically did not find who did the treatment of water depth.
The treatment of water depth is easy on the PC platform because it is easy to get the depth of each pixel, such as g-buffer, with the depth of the pixel, it can calculate the distance from each pixel to the surface, and achieve the depth alpha gradient.
But in the mobile platform, is also the evil floating point texture ... Cause this scenario to not work.
But the plan is people think out, I think two kinds of solutions for mobile platform
Scenario 1: Use the water surface vertex color to preserve the alpha value to make the depth gradient.
This scheme requires that the model patches of the water surface be lattice, like the topography grid, the more dense the lattice, the higher the accuracy of alpha.
Scenario 2: Pixel-level alpha depth is achieved with a map.
This scheme, suitable for 2 triangular patches of water surface, on the surface mapping requirements, the general hand tour of the scene is relatively small, 512*512 should be enough.
I chose Scenario 2. Because I have to deal with the flow direction.
The process of flow direction and water depth are combined with a single flowmap to store.
R, G-Channel as x, Z direction, a as alpha value. This allows for pixel-level flow direction and depth gradients. You can make beautiful rivers. Only static graphs:
Unity3d hand-Tour Development Diary (6)-Water depth treatment for mobile platforms