#version 300 es
precision highp float;

uniform sampler2D uPassTex;

in vec2 vUV;
in vec4 vUVs[2];

out vec4 fragColor;

vec4 getBlur(vec4 uvs[2]) {
    vec4 sum = texture(uPassTex, vUV) * 4.0;
    sum += texture(uPassTex, uvs[0].xy);
    sum += texture(uPassTex, uvs[0].zw);
    sum += texture(uPassTex, uvs[1].xy);
    sum += texture(uPassTex, uvs[1].zw);
    return sum * 0.125;
}

void main() {
    // 检查是否在矩形内
    fragColor = getBlur(vUVs);
}