// Flower Matrix
// By: Brandon Fogerty
// xdpixel.com
// Forked guud
// ass
// http://glslsandbox.com/e#60752.0

#ifdef GL_ES
precision mediump float;
#endif

//uniform float iTime;
//uniform vec4 iMouse;
//uniform vec2 iResolution;


void mainImage( out vec4 fragColor, in vec2 fragCoord ) 
{

	vec2 uv = ( fragCoord.xy / iResolution.xy ) * 2.0 - 1.0;
	uv.x *= iResolution.x/iResolution.y;
	
	vec2 px = fragCoord.xy;
	px.x+=sin(iTime+px.y*0.01)*0.07;
	///px *= 4.;
	
	
	vec3 finalColor = vec3( 0.1, 0.2, 0.3 );

	float a = 0.;//atan( uv.y / uv.x );
	float r = -1.5 + length( uv );
	

	float iTimeT = .1;//sin(iTime) * 0.5 + 0.5;
	float move = .6 + iTime;
	
     	float t = .7 + .1 * sin(move * 1.);
    
     	finalColor += vec3( 8.0 * t, 4.0 * t, 2.0 * t );
    
     	finalColor *= .5 * (1.-r);
	
	float g = -mod( px.y + iTime, cos( px.x ) + 0.004 ) * .5;
	finalColor *= vec3( (g/2.)*(iResolution.y-fragCoord.y)/iResolution.y, g/2., g );
	
	fragColor = vec4( finalColor, 1.0 );

}