• Advertisement
Sign in to follow this  

Fitting view frustum into boundingbox

This topic is 2349 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