uniform float time;
uniform vec2 resolution;
 
void main( void ) 
{	
	vec2 p = ( gl_FragCoord.xy / resolution.xy )*2.0-vec2(1.0,1.0);
	vec2 m = (p);
	vec2 col = (p);
	
	m.x = sin(p.x*16.0*0.5)+sin(time)*0.9;
	m.y = sin(p.y*9.0*0.5)+sin(time)*0.9;
	col.y = length(m)*0.5+sin(m.x*24.)/10.0+sin(m.y*13.5)/10.0;
	
	

	
	//col.y = 1.-smoothstep(.5,.7, col.y);
	
	float red = 1.-smoothstep(0.6,0.99, col.y) + 0.2;
	//float red = 1.-smoothstep(0.1,0.7, col.y);
	float green = 1.-smoothstep(0.3,0.8, col.y);
	float blue = 1.-smoothstep(0.6,0.7, col.y);
	
	gl_FragColor = vec4(red-0.2,green-0.2,blue-0.2,1.0);
}