# Extracting frustum planes from orthographic projection

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

## Recommended Posts

I extract perspective-frustum planes by first extracting the corners, which are computed in this manner:
		viewFrustumCorners[0] = CVector3(-1.0f, 1.0f, 0.0f);
viewFrustumCorners[1] = CVector3(1.0f, 1.0f, 0.0f);
viewFrustumCorners[2] = CVector3(1.0f, -1.0f, 0.0f);
viewFrustumCorners[3] = CVector3(-1.0f, -1.0f, 0.0f);
viewFrustumCorners[4] = CVector3(-1.0f, 1.0f, 1.0f);
viewFrustumCorners[5] = CVector3(1.0f, 1.0f, 1.0f);
viewFrustumCorners[6] = CVector3(1.0f, -1.0f, 1.0f);
viewFrustumCorners[7] = CVector3(-1.0f, -1.0f, 1.0f);

for (int i = 0; i < 8; i++)
{
viewFrustumCorners = (CVector4)viewFrustumCorners * viewProjTransformInversed;
}

So I start with clip-space and go back to world-space. Now I need to do the same thing but for frustum that is not perpsective, but orthographic. So I tried do it in the same way. Unfortunately I don't get proper results. Could you give me some clues on how to extract the ortho-frustum corners?

##### Share on other sites
I guess I've just found the problem. My function which calculates the inverse of a matrix returned the same matrix. It didn't compute the inverse because determinant of ortho matrix is near 0, and I have an "if" which says that in this case the computations are to be skipped, because it is not possible to compute inverse matrix from a singular input matrix. Yet ortho isn't singular (althought it's determinant is very small)

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633661
• Total Posts
3013219
×