• Advertisement
Sign in to follow this  

Shadow Mapping and wrapping problem

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

Hi, I have problem with my shadow mapping. All work ok, but I have one problem. I use shadow only for player (good quality). How can I disable shadow texture wrapping on area which are not visible by light? How can I manualy control range of shadow on X and Y axis - UV for texture projection? Thanks for help. [Edited by - carew on May 30, 2009 5:59:12 PM]

Share this post


Link to post
Share on other sites
Advertisement
If you use shadow maps, than look for sampler adressing mode.
In hlsl you can set adressing mode of your shadow sampler like this:
AddressU = clamp;
AddressV = clamp;
or like this:
AddressU = border;
AddressV = border;
BorderColor = float4(5000.f, 5000.f, 5000.f, 5000.f);
The last one will return a 5000 if you try to sample texture outside 0..1 range.

Share this post


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

  • Advertisement