Depth fog in dark areas

Hey,

I’ve got a new question. I have created a custom compositor material which should create some depth-based “fog/noise”-effect. It actually works pretty well as you can see in the screenshot:

30733-fog_good.png

The problem is, that this fog can be misused to see in the dark, which shouldn’t be possible.

Is there a way to check if an area isn’t being lit so the fog doesn’t need to render?

I switched to fog planes now, which don’t look that well but they work a lot better in the corridor.