Sign in to follow this  

[dx9 HLSL] Projection matrix computation for shadow map

This topic is 2323 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 all,



How can i dynamically set the near and far clipping plane for my projection matrix during shadow depth map generation?
by dynamic i want it to be computed in the code instead being hardcoded in the shader file.


I am using cube shadow mapping for my point light in dx8 HLSL.


thanks,

Share this post


Link to post
Share on other sites
The near and far clipping planes could be passed to your shader in constant registers. I'm not familiar with the sample you are talking about, but it could also be built into your projection matrix to automatically scale the scene accordingly.

Share this post


Link to post
Share on other sites

This topic is 2323 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.

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