# Shading a 2D visibility mesh to act like a light?

I have a visibility mesh made by raycasting:

https://my.mixtape.moe/omjlgr.webm

Right now, I'm using a shader to color the mesh white and fall off with distance and radius (the texCoord in this case is the same as the current vertex position):

uniform vec2 lightPosition;
uniform vec4 lightColor;

void main()
{
float distance = gl_TexCoord[0].xy - lightPosition;

float lightPower = 1 - length(distance) / lightRadius;

gl_FragColor = lightColor * lightPower;
}


However, as you can see, this light is all white. What I want to happen, is to shade the sprites themselves fullbright. Right now, to apply an ambient light color, I set the color of every tile to the color.

So if I have an ambient color of (70, 70, 70), and a light of (255, 255, 255), I want the center of the light to have a fullbright sprite (as if you set the color if it to white), and the tiles at the very edge of the light and further to be the ambient color. To explain further, if my map is fullbright (e.g. ambient color pure white), white lights wouldn't be visible.

Why not just add ambient into your equation?
uniform vec3 ambient;