OpenGL Getting frustum planes from orthogonal projection

This topic is 2477 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hello,
I have read through most of this paper here that explains how to extract your camera's frustum planes. For my game I am using a orthogonal projection matrix which might explain why I am getting seemingly off plane normals.

My question is, does the equation on that paper for the opengl version of frustum plane extraction work also for orthogonal projection matrices? If not, then I suppose I could create a routine myself since orthogonal projection is a box anyways. I don't want to do that though unless I know that this routine will not work for orthogonal matrices.

I appreciate any help,
Thanks!

Share on other sites
If you have camera information of some sort that this frustum belongs to, you could use the forward, up, and right vectors to get 3 of the normals, negate them to get the other 3.
Then use these 6 normals with the view position and the l, r, t, b, n, f values to compute positions on the planes.

Share on other sites
Indeed, I appreciate your confirmation, that what I had in mind as how to calculate the frustums for an orthogonal projection matrix is correct. In terms of the routine as explained in the paper, does that only work for perspective matrices though?

Share on other sites
I suppose the paper's frustum extraction routine only works for perspective matrices. I just double checked my implementation of the paper's routine and the normal I am getting for top plane for example is [0.0, 0.3737926, 0.9275124] not [0.0, 1.0, 0.0] as I would suspect.

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 12
• 11
• 15
• 11
• 11
• Forum Statistics

• Total Topics
634149
• Total Posts
3015835
×