look at canvas modulate as if it where to do this:
COLOR.rgba *= vec4("your canvas modulate color")
after all of the fragment shader calculations, if it's pitch black then it'll do a multiplication by 0 and you know how that goes, i don't know if you already fed the texture(TEXTURE,UV) content to COLOR but i'll mention it just in case.
I don't know exactly how the AT_LIGHT_PASS boolean but i wouldn't suggest using it. what i would suggest is that you do the full calculation inside the shader by feeding the distance from the light to the shader with material_set_param() on your main process and changing the eye color, maybe even gradually, after a threshold, something like this:
shader_type canvas_item;
uniform float distance_from_light;
uniform float threshold;
void fragment(){
COLOR = texture(TEXTURE,UV);
if (COLOR.rgba == vec4(0.0,0.0,0.0,1.0) && distance_from_light < threshold){
COLOR.rgb = vec3(1.0,1.0,1.0) / distance_from_light;
}
}
idk if you're using godot 2 or 3 though so you'll have to interpret it accordingly, good luck.