#version 300 es
precision highp float;

uniform sampler2D uMainTex;

in vec4 uv01;
in vec4 uv23;
in vec2 vUV;

out vec4 fragColor;

void main() {
    vec4 sum = texture(uMainTex, vUV) * 4.0;
    sum += texture(uMainTex, uv01.xy);
    sum += texture(uMainTex, uv01.zw);
    sum += texture(uMainTex, uv23.xy);
    sum += texture(uMainTex, uv23.zw);

    fragColor = sum * 0.125;
    //fragColor = texture(uMainTex, vUV);
}