precision mediump float;

void main() {
  gl_FragColor = vec4(0.0196, 0.4706, 0.2471, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}

void main() {
  vec2 xy = gl_FragCoord.xy / u_resolution;
  float y = xy.y;
  vec3 color = vec3(0.0039, 0.5765, 0.3333) * flip(0.666, 1.0, y) +
               vec3(0.9882, 0.7922, 0.0902) * flip(0.333, 0.666, y) +
               vec3(0.1961, 0.4157, 0.7373) * flip(0.000, 0.333, y);
  gl_FragColor = vec4(color, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}

void main() {
  vec2 xy = gl_FragCoord.xy / u_resolution;
  float x = xy.x;
  vec3 color = vec3(0.0000, 0.1255, 0.5412) * flip(0.000, 0.333, x) +
               vec3(1.0, 1.0, 1.0) * flip(0.333, 0.666, x) +
               vec3(0.9176, 0.1412, 0.1961) * flip(0.666, 1.0, x);
  gl_FragColor = vec4(color, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}

void main() {
  vec2 xy = gl_FragCoord.xy / u_resolution;
  vec3 color = vec3(0.0039, 0.4863, 0.2784) * flip(0.000, 0.4, xy.x) +
               vec3(0.8980, 0.0627, 0.1569) *
                   flip(0.00001, 0.5, flip(0.4, 1.0, xy.x) * xy.y) +
               vec3(0.9882, 0.7922, 0.0902) *
                   flip(0.5, 1.0, flip(0.4, 1.0, xy.x) * xy.y);
  gl_FragColor = vec4(color, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}

void main() {
  vec2 xy = gl_FragCoord.xy / u_resolution;
  vec3 color =
      vec3(0.8353, 0.0980, 0.1412) * flip(0.0001, min(0.5, xy.x), xy.y) +
      vec3(1.0, 1.0, 1.0) * flip(max(0.5, 1.0 - xy.x), 1.0, xy.y) +
      vec3(0.0824, 0.2745, 0.4863) *
          flip(xy.x, 1.0 - xy.x, xy.y * flip(0.0, 0.5, xy.x));
  gl_FragColor = vec4(color, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}

void main() {
  vec2 xy = gl_FragCoord.xy / u_resolution;
  vec3 color =
      vec3(1.0, 1.0, 1.0) *
          flip(0.001, 2.0 / 5.0, flip(0.0, 2.0 / 8.0, xy.x) * xy.y) +
      vec3(1.0, 1.0, 1.0) *
          flip(0.001, 2.0 / 5.0, flip(3.0 / 8.0, 1.0, xy.x) * xy.y) +
      vec3(1.0, 1.0, 1.0) *
          flip(3.0 / 5.0, 1.0, flip(0.0, 2.0 / 8.0, xy.x) * xy.y) +
      vec3(1.0, 1.0, 1.0) *
          flip(3.0 / 5.0, 1.0, flip(3.0 / 8.0, 1.0, xy.x) * xy.y) +
      vec3(0.0196, 0.2157, 0.4941) * flip(2.0 / 5.0, 3.0 / 5.0, xy.y) +
      vec3(0.0196, 0.2157, 0.4941) * flip(2.0 / 8.0, 3.0 / 8.0, xy.x) -
      vec3(0.0196, 0.2157, 0.4941) *
          flip(2.0 / 8.0, 3.0 / 8.0, xy.x * flip(2.0 / 5.0, 3.0 / 5.0, xy.y));
  gl_FragColor = vec4(color, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}

vec3 overlay(vec3 background, float t, vec3 foreground, float u) {
  return background * t + foreground * u - background * u;
}

void main() {
  vec2 xy = gl_FragCoord.xy / u_resolution;
  vec3 blue = vec3(0.0235, 0.2314, 0.5843);
  vec3 white = vec3(1.0, 1.0, 10);
  vec3 red = vec3(0.8353, 0.1686, 0.1843);
  vec3 color =
      overlay(overlay(overlay(overlay(blue, 1.0, white,
                                      flip(2.0 / 5.0, 3.0 / 5.0, xy.y)),
                              1.0, white, flip(2.0 / 8.0, 3.0 / 8.0, xy.x)),
                      1.0, red, flip(2.25 / 5.0, 2.75 / 5.0, xy.y)),
              1.0, red, flip(2.25 / 8.0, 2.75 / 8.0, xy.x));
  gl_FragColor = vec4(color, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}
void main() {
  vec2 xy = gl_FragCoord.xy / u_resolution;
  vec3 green = vec3(0.0784, 0.5804, 0.2784);
  vec3 yellow = vec3(0.9804, 0.8667, 0.3451);
  vec3 red = vec3(0.8549, 0.1529, 0.1569);
  vec3 color =
      green * flip(xy.x * 3.0 / 2.0, 1.0, xy.y * flip(0.0, 2.0 / 3.0, xy.x)) +
      red * flip(0.0001, max((xy.x - 1.0 / 3.0) * 3.0 / 2.0, 0.0001),
                 xy.y * flip(1.0 / 3.0, 1.0, xy.x)) +
      yellow * flip(max((xy.x - 1.0 / 3.0) * 3.0 / 2.0, 0.0001),
                    min(1.0, xy.x * 3.0 / 2.0), xy.y);

  gl_FragColor = vec4(color, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}

vec3 overlay(vec3 background, vec3 foreground, float u) {
  return background * 1.0 + foreground * u - background * u;
}

void main() {
  vec2 xy = gl_FragCoord.xy / u_resolution;
  vec3 blue = vec3(0.0000, 0.2157, 0.4863);
  vec3 green = vec3(0.0039, 0.4353, 0.2078);
  vec3 yellow = vec3(0.9882, 0.8235, 0.2980);
  vec3 red = vec3(0.8157, 0.1373, 0.1412);
  vec3 white = vec3(1.0, 1.0, 1.0);

  vec3 color = overlay(
      overlay(overlay(overlay(blue, yellow, flip(0.0, 2.5 * xy.x, xy.y)), red,
                      flip(0.0, 1.2 * xy.x, xy.y)),
              white, flip(0.0, 0.7 * xy.x, xy.y)),
      green, flip(0.0, 0.3 * xy.x, xy.y));

  gl_FragColor = vec4(color, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}

float flip(vec2 from, vec2 to, vec2 x) {
  vec2 result = step(from, x) - step(to, x);
  return result.x * result.y;
}

vec3 overlay(vec3 background, vec3 foreground, float u) {
  return background * 1.0 + foreground * u - background * u;
}

void main() {
  vec2 xy = gl_FragCoord.xy / u_resolution;
  vec3 green = vec3(0.0078, 0.5647, 0.2000);
  vec3 yellow = vec3(0.9961, 0.7922, 0.0118);
  vec3 black = vec3(0.0, 0.0, 0.0);
  float width = 1.0 / 10.0;
  vec3 color = overlay(
      overlay(
          overlay(overlay(green, black,
                          flip(vec2(0.0, xy.x), vec2(0.5, (1.0 - xy.x)), xy)),
                  black, flip(vec2(0.5, (1.0 - xy.x)), vec2(1.0, xy.x), xy)),
          yellow, flip(xy.x - width, xy.x + width, xy.y)),
      yellow, flip(1.0 - xy.x - width, 1.0 - xy.x + width, xy.y));

  gl_FragColor = vec4(color, 1.0);
}

precision mediump float;
uniform vec2 u_resolution;

float flip(float from, float to, float x) {
  return step(from, x) - step(to, x);
}

vec3 overlay(vec3 background, vec3 foreground, float u) {
  return background * 1.0 + foreground * u - background * u;
}

void main() {
  vec2 st = gl_FragCoord.xy - (u_resolution * 0.5);
  st = st / u_resolution.y;
  vec3 red = vec3(0.7059, 0.0000, 0.1569);

  vec3 color =
      overlay(vec3(1.0), red, flip(0.0, 0.25, distance(vec2(0.0, 0.0), st)));

  gl_FragColor = vec4(color, 1.0);
}