Lightmap with threshold

I’m fairly new to shaders but I’ve been trying to do some experimenting on my own when I have the time. However one question has been pestering me for the last few days and I’ve been wondering if anyone here could give me any tips.

I’m trying to do something which I assume is fairly simple: unity offers lightmapped diffuse shaders. I just want it to only engage the lightmap (ie use emission on certain parts of the texture) once lighting has reached a certain threshold. I want to create a sort of glow that will be dull during the day but get stronger as the environment gets darker.

It’s fairly confusing for me as surface shaders run before lighting yet doing an entirely new lighting system just for this seems overkill. Likewise, doing texture mapping on Lighting just feels dirty.

Any ideas on how to solve this? :face_with_spiral_eyes:

I might as well add that I’ve looked into finalcolor:ColorFunction but it doesn’t seem any more intuitive.

Do you want everything to become emissive as the sun goes down, or do you want specific shadows and occluded places to have a minimum brightness?

The former should be done by adjusting materials, and the latter definitely with a custom lighting function.

I’m looking for specific places in a texture (indicated by a lightmap) to become emissive as the sun goes down.

Maybe a better way to explain it would be this: imagine mushrooms which have spots that glow in the dark but look normal during daylight.