uniform sampler2D sharp;
uniform sampler2D blured;
uniform float range;
uniform float focus;

varying vec2 Texcoord;

void main( void )
{
   vec4 sharp_col = texture2D(sharp, Texcoord);
   vec4 blured_col  = texture2D(blured, Texcoord);

   gl_FragColor = mix(sharp_col, blured_col, clamp(range * abs(focus - sharp_col.a), 0.0, 1.0));
}
