Jump to content
  • Advertisement
Sign in to follow this  
MaartenDeNef

Fitting view frustum into boundingbox

This topic is 2530 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'm working a simple shadowmap depth map project. I'm having a hard time positioning the orthographic camera.
So i was wondering if i could make the camera fit the boundingbox of my terrain (because its big). So that my shadow map stays centered on my depth texture and uses optimal texture space.

I've looked on the internet but failed to find something helpfull.

Thanks in Advance

Share this post


Link to post
Share on other sites
Advertisement
This is a similar problem that is solved in cascaded shadow maps, in which different parts of the scene use different shadow maps based on distance from the camera - so you could start looking for implementations there.

The other pointer that I would give for the geometry / math side of the problem is to check out the GeometricTools (documents page) website. There are many examples, with source code, of how to do various geometry manipulations, and you should be able to find what you need there.

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!