Outdoor vs Indoor Lighting
Members - Reputation: 649
Posted 13 November 2012 - 02:24 PM
So, how do people generally handle this? I was going to add a bounding box around the house, if the player collides with it, I would switch the lighting to just an ambient color and not take the sun. Similarly if the player walks outside, I'd switch back to using the sunlight.
The sun is needed for the outside walls to show lit vs shaded side. The indoor doesn't need that (at least from the sun).
Is that how others do this?
Crossbones+ - Reputation: 2548
Posted 13 November 2012 - 02:30 PM
If you're using a deferred renderer you can store this value in your GBuffer.
I believe this technique is quite commonly used in some major engines and it's quite simple to implement.
Software Engineer - Skybox Labs
Senior Moderators - Reputation: 7262
Posted 13 November 2012 - 02:50 PM
Members - Reputation: 1243
Posted 13 November 2012 - 08:55 PM