I am developing a game for android with opengl2 es i i want a effect like this:
https://lh6.ggpht.com/RF0R32tKjDhQcjNTtW51xd-giuXp-FlsDJaqscilDetI7cMpNQwUDjCryT2qyyBzT6PZ
I supposse that the light is done with normal mapping(am i right?)
but I suposse to that there is some type of distorsion on the behing texture, to simulate de waves.
Which math function could I use to simulate the noise that appears in the image?
thanks
Yes, use a normal map. To make the effect more convincing use multiple normal maps (two or three) that translate in different directions at different speeds. Use Google to find some normal maps that simulate water.
You don’t need a mathematical function to simulate the distortion. The refractive and reflective distortion is computed very simply from the normal maps.
Below PowerVR’s description and implementation of a water effect.
http://www.imgtec.com/powervr/insider/docs/POWERVR.Shader%20Based%20Water%20Effects.1.0.14.OGLES2External.pdf
Below is an NVIDIA article about achieving refraction. This is geared towards DirectX, but the high level explanation is very good. Read the section about water.
http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter19.html