Jump to content
  • Advertisement
Sign in to follow this  
Aqua Costa

Screen-space shadow map pass

This topic is 2664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Should I create a screen space shadow map using the cascaded shadow map and sample it in the lighting pass or my deferred lighting system? Or simply check if each pixel is in the shadow using the cascaded shadow map in the lighting pass?

Share this post


Link to post
Share on other sites
Advertisement

Should I create a screen space shadow map using the cascaded shadow map and sample it in the lighting pass or my deferred lighting system? Or simply check if each pixel is in the shadow using the cascaded shadow map in the lighting pass?


Unless you want to blur the result of your shadow map pass or something like that, there's no reason to put them in separate passes.

Share this post


Link to post
Share on other sites

[quote name='TiagoCosta' timestamp='1299359755' post='4782212']
Should I create a screen space shadow map using the cascaded shadow map and sample it in the lighting pass or my deferred lighting system? Or simply check if each pixel is in the shadow using the cascaded shadow map in the lighting pass?


Unless you want to blur the result of your shadow map pass or something like that, there's no reason to put them in separate passes.
[/quote]

Hi MPJ,
i'm following your article (deffered shadow maps) and there you said that separate shadow map pass is quite good :)

Share this post


Link to post
Share on other sites
If you happen to have a rendered z-buffer already (as in z-pre-pass or deferred lighting/shading), and you want to minimize memory usage, then a [color="#1C2837"]screen space shadow buffer can be used to accumulate several successively-rendered shadow maps, which allows the shadow maps to occupy the same render-target (only one is needed at a time). If you don't have lots of different shadow-maps though, then the RAM usage of a full-screen buffer might outweigh this benefit...
[color="#1C2837"]
[color="#1C2837"]With a [color="#1C2837"]screen space shadow buffer, when lighting,[color="#1C2837"] you can take one sample from the shadow[color="#1C2837"] buffer, instead of many samples (one from each shadow map).
[color="#1C2837"]This would be more efficient for some uses and less efficient for others.

[color="#1C2837"]With the cascaded shadow map, if you render all the cascades into a single texture/render-target, then you don't need this [color="#1C2837"]accumulation feature.
[color="#1C2837"]Alternatively, if your cascades are all on different textures, it might (guessing) be beneficial to accumulate those separate shadow textures all into a single [color="#1C2837"]screen space shadow buffer...

[color="#1C2837"]Also, a [color="#1C2837"]screen space shadow buffer is limited by the number of channels in the buffer -- if you want lots of individual shadow-casting light-sources, then it's not very suitable.

Share this post


Link to post
Share on other sites
The says (or should say) that doing a full-screen shadow map can be a nice approach if you're not doing deferred rendering. If you're doing deferred rendering then you've already decoupled your lighting/shadowing into a separate full-screen pass so there's not as much benefit to splitting it up again.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!