Arbitrary projection matrix from 6 arbitrary frustum planes

Posted by Doub on Game Development See other posts from Game Development or by Doub
Published on 2012-03-04T22:11:25Z Indexed on 2012/06/05 4:49 UTC
Read the original article Hit count: 313

Filed under:
|
|
|
|

A projection matrix represent a tranformation from the camera view space to the rendering system clip space. In other words, it defines the transormation between a 6-sided frustum to the clip cube.

The glOrtho and glFrustum use only 6 parameter to define such a projection, but impose several constraints on the frustum that will get projected to the clip cube: the near and far planes are parallel, the left and right planes intersect on a vertical line, and the top and bottom planes intersect on a horizontal lines, both lines being parallel to the near and far planes.

I'd like to lift these restrictions. So, from the definition of the 6 frustum side planes (in whatever representation you see fit), how can I compute a general projection matrix?

© Game Development or respective owner

Related posts about 3d

Related posts about math