The following proposal was inspired by this thread, where you can see my original post:
http://forums.secondlife.com/showthread.php?t=223486
Many of you may know about occlusion culling, it is a feature whereby objects that are hidden by other objects are "culled", meaning that they are no longer rendered because you can't see them.
You will also notice that ambient-light from the sun/moon is currently able to penetrate buildings and thus render inside houses. This is a bit weird, as a completely closed box can be bright and sunny inside!
Well, the basic idea behind this proposal is to take occlusion culling and apply it to the ambient light sources (sun and moon). What this will mean is that when you are underneath a roof or some other object which blocks out the sun/moon, then they will simply stop being rendered, resulting in a nice dark room.
So what about over-hangs, doors and windows? Well, these can be approximated. When occlusion culling is performed it should mark areas where there are gaps, the idea then is to simply place light sources in these gaps that mimic the ambient lights, but for the smaller area. The result is that a closed room with a window would still have light coming in from the window, but would now be darker overall than were it to have no roof.
This would essentially give us a more realistic lighting system, without requiring tons of processing, by leveraging an existing feature (occlusion culling).
An alternative implementation for handling gaps could use an additional shader pass. Basically, if the sun and moon are picked up for occlusion, and gaps are found, then the area within the occluding primitives (the indoor area) is rendered using a darker shader with less contrast, which renders light/dark based on proximity to the detected gaps, creating an indoor effect.
If the sun and moon are picked up for occlusion and no gaps are found, then the a fully indoor shader is used, which basically adds a small amount of ambient light so that the scene isn't completely black, but is otherwise intended only to work with local-lights to render the indoor area.
This is not intended to create super-realistic shadows or anything like that, but simply to decrease the level of light in indoor or otherwise "sun-blocked" areas.
If the cases including gaps seem overly complex, then simply allowing for ambient lights to be optionally excluded in the event that you are in a self-contained box would be a good step toward having realistic indoor and outdoor environments where you can open a door and suddenly the room is flooded with light.
VWR-3189. Linking as related.