Advertisement Jump to content
Sign in to follow this  

effective solution to find 6 plane of frustum?

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

You can transform a plane by multiplying by a matrix like this.
inverse(transpose(M)) * |b|
Where ax + by + cz + d = 0 defines a plane

In normalized coordinates the 6 planes in opengl are
[1 0 0 1] [-1 0 0 1]
[0 1 0 1] [0 -1 0 1]
[0 0 1 1] [0 0 -1 1]
where [a b c d] defines a plane

For directx, the last two planes are
[0 0 0 1] [0 0 -1 1]
Since we want to transform a plane from normalized space to world space we simply take the transpose of the view projection matrix and
mutliply each of those six planes by that matrix
 transpose(view * projection) * p
You notice that we don't take the inverse of the matrix since it is already the inverse of the matrix we actually want to transform it by.
(view * projection goes from world to normalized space, we want to go from normalized space to world space)

The result of multiplying each plane will give a 4 dimensional vector. where x, y, z, w of the vector can be copied over directly to the
plane a, b, c, d respectively.

Notice that the 6 original planes have a lot of 1s and 0s. This means there is a lot of wasted work so when you simplify the multiply, just
end up with adding or subtracting two value from the matrix to get each plane. The simplified extraction can be found in this paper. Edited by HappyCoder

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!