tags:

views:

67

answers:

0

Given the 8 corners of a camera's view frustum and the desired view direction of a light source (defined as a vector), what is a good way to calculate the view projection matrix of a light so that it encloses the camera's entire frustum? The purpose of this is to have a light that dynamically updates position so that the shadow map it projects will always cover the whole area viewed by the camera.

I am using DirectX 9 if that helps. I know that I also need to consider putting shadow casters into view, but I want to figure out this problem before continuing.