#version 410

layout (location = 0) out vec4 FragColor;
in vec2 pos;
uniform float time;
uniform vec3 basecolor;

const vec3 brown = vec3(0.93, 0.7, 0.35);
const vec3 white = vec3(1.0);
const vec3 blue  = vec3(0.08, 0.41, 0.41);

void main(void){
   vec3 color;
   float factor;

   factor = abs(cos(pos.x * 30.0)) / 2.0;
   if(time < 113.186){
      color = mix(white, brown, factor);
   }
   else{
      color = mix(blue, white, factor);
   }

   FragColor = vec4(color, 1.0);
}
