water ripper
1. First of all see the mathematic
: height = sin(x) / x; (x != 0)
To X your can treat it as offset from 0 grow with time.
2. 'gl_FragCoor' of GLSL
gl_FragCoor exist in the FragShader as built in variable. Store the
coordinate of current fragement coordinate of viewport. Value is from [0,0.5]
3. Combine 1 and 2, get the height.
4. switch height into texture offset.
Use offset fetch from texture, which will generate the water ripple effect.
上图