
//    First try making a compact shader

// thank to Fabrice -18 chars

void mainImage(out vec4 O, vec2 C)
{
    float t=iTime,
    l = length(C-=iResolution.xy*.5)/20. - t*5.,
    S = sin(l), s = (1.-abs(S)) * cos(t*.5);
    O = s*.7 -
        cos(
            ceil(l/3.1415 + step(.1+s, abs( fract(atan(C.y,C.x)/1.047 + sign(S)*t ) -.5))
        ) + vec4(0,1,2,0)/.53) *.5+.5;
}


//   Old - 247 Chars
/*
void mainImage(out vec4 O, vec2 C)
{
    float t=iTime, P=3.14159,
    l=length(C=C.xy-iResolution.xy*.5)/20.-t*5., L=l/P,
    s=(1.-abs(l=sin(l)))*cos(t*.5),
    b=step(abs(fract(atan(C.y,C.x)/P*3.+sign(l)*t)-.5)-s,.1);
    O=s*.7-cos(floor(L+b)+vec4(0,.3,.6,1)*P*2.)*.5+.5;
}
*/

