Outdoor vs Indoor Lighting
Members - Reputation: 736
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: 2770
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.
Senior Moderators - Reputation: 9582
Posted 13 November 2012 - 02:50 PM
Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]
Members - Reputation: 1564
Posted 13 November 2012 - 08:55 PM