Reputation: 71
i am currently programming deffered rendering system for my XNA 4 project, mostly following The Cansin tutorial. however, he claims that creating directional light that cast dynamic shadow is impossible - it's not true as many games (like stalker) use dynamic directional lights with deferred shading for creating realistic sun shadows. do you have any idea how could i implement such system? it is crucial for me as most of action of my game will happen outdoor and do not want to use spotlight that follow the player as workaround.
best regards
Upvotes: 1
Views: 5634
Reputation: 48547
Check out the Cansins article on Deferred Rendering. It contains Spot and Point lights with Expotential Shadows, as well as SSAO with normals. A great tutorial.
Upvotes: 2
Reputation: 950
Yes you can use directional light shadow maps with a deferred renderer. I can't imagine what reason that tutorial gives for why it would be possible to use shadow maps for some types of lights and not for others.
There are certainly differences between how you might want to implement shadow maps for directional lights vs. spotlights but once you have that part figured out it shouldn't be any more difficult to adapt one to your deferred renderer than the other.
If you're interested in actual shadow map implementations I would post that as a separate question.
Upvotes: 0
Reputation: 6142
The shadow volume technique yields very realistic shadows and can be calculated in realtime. The wikipedia article should give you a good starting point:
http://en.wikipedia.org/wiki/Shadow_volume
DevMaster.net has also a very detailed article about that topic.
Upvotes: 0