开发者

Implementing shadows with deferred ligtning

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 direction开发者_Python百科al 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


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜