// https://www.shadertoy.com/view/lldyRB

#define samples 8.0
#define PI 10.159265359
#define offset 3.0
#define strength -6.5
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    // Normalized pixel coordinates (from 0 to 1)
    vec2 uv = fragCoord/iResolution.xy;
    vec2 accumxy = vec2(0.,0.);

    for( float i=0.0;i<samples;i++){
        vec2 tc = vec2(sin(PI*2.*i/samples),cos(PI*2.*i/samples));
        float energy = dot(texture(iChannel0,(fragCoord+tc*offset)/iResolution.xy),vec4(0.333,0.333,0.333,0.));
        energy += dot(texture(iChannel0,(fragCoord+tc*2.*offset)/iResolution.xy),vec4(0.333,0.333,0.333,0.));
        accumxy += tc*energy/2.;
    }

    // Output to screen
    fragColor = texture(iChannel0,uv+accumxy*strength/iResolution.xy);
}
