I need to animate isometric(for one sprite) water-plain (similar to photoshop ripple effect), so I found one-similar shader, but I can't make it work, and I don't need light in this.
uniform sampler2D texture0;
varying vec2 uvVarying;
varying vec3 normalVarying;
varying vec3 posVarying;
uniform vec4 agk_PLightPos;
uniform vec4 agk_PLightColor;
uniform vec3 agk_DLightDir;
uniform vec4 agk_DLightColor;
uniform vec4 agk_ObjColor;
uniform float time;
void main()
{
vec2 tc = uvVarying.xy;
vec2 p = -1.0 + 2.0 * tc;
float len = length(p);
vec2 newUV = tc + (p/len)*cos(len*12.0-time*4.0)*0.03;
vec3 dir = agk_PLightPos.xyz - posVarying * vec3(newUV, 1);
vec3 norm = normalize(normalVarying);
float atten = dot(dir,dir);
atten = clamp(agk_PLightPos.w/atten,0.0,1.0);
float intensity = dot(normalize(dir),norm);
intensity = clamp(intensity,0.0,1.0);
vec3 color = agk_PLightColor.rgb * intensity * atten;
color = color + clamp(dot(-agk_DLightDir,norm)*agk_DLightColor.rgb,0.2,1.0);
gl_FragColor = texture2D(texture0, newUV) * vec4(color,1) * agk_ObjColor;
}
Link to this topic:
https://forum.thegamecreators.com/thread/201508?page=3
Example:
http://i.stack.imgur.com/0ane7.jpg