
uniform float time;
uniform vec2 resolution;

void main( void ) {

   // vec2 resolution = ( 400.0, 400.0);
   vec2 position = ( gl_FragCoord.xy / resolution.xy ) ;
   //vec2 position = ( gl_FragCoord.x / 400.0, gl_FragCoord.y / 400.0) ;

   float color = 0.5;
   float lcontr= 0.5;
   float lcontr2= 0.5;
   float lcontr3= 0.5;
   float lcontr4= 0.5;
   float lcontr5= 0.5;
   
   vec2 _lpos = vec2(sin(time)*(cos(time/2.0)), (cos(time))*sin(time)) + vec2(0.5, 0.5);
   vec2 _lpos2 = vec2(sin(time)*(cos(time/2.0)), (cos(time))*sin(time)) + vec2(0.5, 0.5);
   vec2 _lpos3 = vec2(sin(time)*(cos(time/2.0)), (cos(time))*sin(time)) + vec2(0.5, 0.5);
   vec2 _lpos4 = vec2(sin(time)*(cos(time/2.0)), (cos(time))*sin(time)) + vec2(0.5, 0.5);
   vec2 _lpos5 = vec2(sin(time)*(cos(time/2.0)), (cos(time))*sin(time)) + vec2(0.5, 0.5);
   
   lcontr = 0.3 / distance(_lpos,position)*0.3;
   lcontr2 = 0.3 / distance(_lpos2,position + vec2(0.3, 0.3))*0.3;
   lcontr3 = 0.3 / distance(_lpos3,position + vec2(-0.7, -0.1))*0.3;
   lcontr4 = 0.3 / distance(_lpos4,position)*0.4;
   lcontr5 = 0.3 / distance(_lpos5,position)*0.3;
   
   
   vec4 comet1 = vec4(0.2 + 1.5*tan(sin(4.0*time)),0.1 + 0.1*cos(time),0.1 + 0.5*sin(time),1.0);
   vec4 comet2 = vec4(0.0 - 1.5*sin(sin(0.1+1.0*time)),0.1 - 0.1*sin(0.1+time),0.1 + 0.5*sin(0.1+time),1.0);
   vec4 comet3 = vec4(0.5 + 1.5*tan(cos(4.0*time)),0.5 + 0.1*tan(sin(time)),0.1 + 0.5*cos(time),1.0);
   vec4 comet4 = vec4(0.0 + 0.5*cos(time),0.3 + 0.6*cos(time),0.3 + 9.5*sin(cos(time)),1.0);
   vec4 comet5 = vec4(0.3 + 1.5*sin(cos(4.0*time)),0.1 + 0.1*sin(-sin(time)),0.1 + -0.5*sin(time),1.0);
   

   //gl_FragColor = lcontr * vec4(0.1 + 1.5*tan(sin(4.0*time)),0.1 + 0.1*cos(time),0.1 + 0.5*sin(time),1.0);
   gl_FragColor = (lcontr * comet1) + (lcontr2 * comet2) + (lcontr3 * comet3) + (lcontr4 * comet4) + (lcontr5 * comet5);

}