Here is the shader.
uniform vec2 lightPos;
uniform vec3 lightColor;
uniform float screenHeight;
uniform sampler2D texture;
void main()
{
lightPos.y = screenHeight - lightPos.y;
float length = length(lightPos - gl_FragCoord.xy);
float attenuation = 1.0 / (length/10) + .2;
vec4 color2 = vec4(lightColor, 1) * attenuation;
vec4 color = texture2D(texture,gl_TexCoord[0].st);
if(color == vec4(0,0,0,1))
gl_FragColor = color;
else
gl_FragColor = color2;
}