Sign in to follow this  
cebugdev

[dx9 HLSL] Projection matrix computation for shadow map

Recommended Posts

cebugdev    635
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
Jason Z    6434
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

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