Jump to content
  • Advertisement
Sign in to follow this  
matt77hias

Shadow factor

This topic is 468 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

Does one normally apply the shadow factor calculated from a shadow map to all direct light contributions or only the direct light contribution of the shadow map light?

In order to support a variable number of shadow maps, does one accumulate the shadow factors in an RTV which is then used as an RSV for the actual lighting?

Share this post


Link to post
Share on other sites
Advertisement

Only the shadow map from the light casting that shadow should be used when drawing the light - its used for removing the light contribution.

 

It depends on how you do your drawing when dealing with shadow maps.

For a forward render, you would loop over the lights affecting a pixel/region, so it would require you to gather all the shadowmaps in some way (atlas, array etc..)

For a deferred render, the lighting/result is accumulated into a rendertarget, so normally you would only draw one light source at a time in this case.

 

Henning

Share this post


Link to post
Share on other sites
58 minutes ago, semler said:

For a deferred render, the lighting/result is accumulated into a rendertarget, so normally you would only draw one light source at a time in this case.

Why is forward different from deferred? It seems to me that both accumulation and texture array work for forward and deferred.

Share this post


Link to post
Share on other sites

Yes you are correct, both methods are viable for both methods.

But normally you would like to bunch the lights together in the forward renderer to avoid having to render the geometry multiple times (ie loop over lights per object). This is not nearly as important for the deferred renderer, where you render the lights (the area on screen they affect) instead of objects.

 

Share this post


Link to post
Share on other sites

Modern deferred usually also loop over light to get a single gbuffer read and single lighting write to save bandwidth, so the packing of shadow maps is as important as in a forward+.

So far, shadowmap packing had to deal with texture array and sub rectangle but bindless on dx12 offer a third solution that simplify the problem ( + support variable size cube map / formats )

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!