Sign in to follow this  
carew

Shadow Mapping and wrapping problem

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this