varying vec2 UV;
uniform sampler2D textureSampler;
uniform vec2 screenSize;

void main() {
    vec2 pixel = (UV * screenSize);
    if (pixel.x > 0.5 * screenSize.x) {
        pixel = vec2(screenSize.x - pixel.x, pixel.y);
    }

    vec4 color = (texture2D(textureSampler, pixel / screenSize));

    // Invert colors
    gl_FragColor = color;
}