// #include //ly.img.cesdk/shader/common/ubq_noise uniform shader image; uniform float2 imageSize; uniform float time; uniform float distortion; uniform float distortion2; uniform float speed; uniform float rollSpeed; half4 main(float2 coord) { float2 uv = coord / imageSize; uv.y = 1.0 - uv.y; float ty = time * speed * 17.346; float yt = uv.y - ty; // thick distortion float offset = noise2d(float2(yt * 3.0, 0.0)) * 0.2; offset = offset * distortion * offset * distortion * offset; // fine distortion offset += noise2d(float2(yt * 50.0, 0.0)) * distortion2 * 0.002; uv = float2(fract(uv.x + offset), fract(uv.y - time * rollSpeed)); uv.y = 1.0 - uv.y; return image.eval(uv * imageSize); }