vec3 pal( in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d )
{
    return a + b*cos( 6.28318*(c*t+d) );
}

void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    float time_slow = 0.2;
    float time_fast = 10.0;
    
    float time = time_slow;
    
    // Normalized pixel coordinates (from 0 to 1)
    vec2 p = fragCoord/iResolution.xy;

    // Time varying pixel color
    vec3 col = pal( (p.x + p.y + sin(iTime * 10.0)) * 1.0, vec3(0.5,0.5,0.5),vec3(0.5,0.5,0.5),vec3(1.0,0.7,0.4),vec3(0.0,0.15,0.20) );

    // Output to screen
     fragColor = vec4(col * sin(150.0 * (p.x + (p.y * p.y * abs(sin(iTime * 0.15)))) * cos(iTime * time_slow)) * cos((p.y + (p.x * p.x + cos(iTime))) * 10.0 * sin(iTime)),1.0);
     
     fragColor = vec4(col * sin(30.0 * (p.x + (p.y * p.y * sin(iTime))) * cos(iTime * 10.0)) * cos((p.y + (p.x * p.x + cos(iTime))) * 10.0 * sin(iTime)),1.0);
}
