Jump to content
  • Advertisement
Sign in to follow this  
cebugdev

[dx9 HLSL] Projection matrix computation for shadow map

This topic is 2537 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!