/**
 * Shader process simple light on mouse position
 * and set opacity parameter to alpha channel.
 *
 * Copyright © 2009-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 vec3 uParams;
varying vec2 fTexCoord;
void main(void) {
    vec4 color = texture2D(uTexture, fTexCoord);
    float ups = 0.0;
        float upsx = (uParams.x - fTexCoord.x);
        upsx *= upsx;
        float upsy = (uParams.y - fTexCoord.y);
        upsy *= upsy;
        ups = upsx + upsy;
        ups = -ups * 0.2;
        if(ups < -0.1) {
            ups = -0.1;
        }
    color.rgb += 0.1 + ups;
    color.a *= uParams.z;
    gl_FragColor = color;
}
