/**
 * Simple Blend deinterlace filter.
 *
 * Copyright © 2010-2011 Kirill Gavrilov <kirill@sview.ru>
 *
 * Distributed under the Boost Software License, Version 1.0.
 * See accompanying file license-boost.txt or copy at
 * http://www.boost.org/LICENSE_1_0.txt
 */

uniform sampler2D uTexture;
uniform vec4 uTexData;
uniform vec2 uTexelSize;

vec4 getColor(in vec2 texCoord) {
    if(texCoord.y < (uTexData.y + uTexelSize.y)) {
        return texture2D(uTexture, texCoord);
    }
    return mix(texture2D(uTexture, texCoord - vec2(0.0, uTexelSize.y)),
               texture2D(uTexture, texCoord), 0.5);
}
