#version 300 es
precision highp float;
uniform vec2 uResolution;
out vec4 outColor;
float grid(vec2 xy, float zoom) {
vec2 cells = fract(xy * zoom);
return step(zoom, cells.x) * step(zoom, cells.y);
}
void main() {
vec2 pos = gl_FragCoord.xy / uResolution.xy;
pos.x *= uResolution.x / uResolution.y;
vec2 gridSpace = pos * 400.0;
vec3 color = vec3(0.0);
color += vec3(0.0, 0.5, 0.5) * vec3(1.0 - grid(gridSpace, 0.01));
color += vec3(0.5, 0.0 ,0.5) * vec3(1.0 - grid(gridSpace, 0.02));
color += vec3(0.0, 0.2, 0.3) * vec3(1.0 - grid(gridSpace, 0.1));
outColor.rgb = color;
outColor.a = 1.0;
}