# How to get a camera's frustum information?

I have a local coordinate system with three camera normalised directions, D, U and R.

I also have the following information:

camera_location
lookat_point
up_direction
distance_near_plane
distance_back_plane
fov
aspect_ratio


With this I'm trying to get the information regarding the camera's frustum, the coordinates of it's 8 vertices and the 6 planes that make it up. How do I do it?

One way would be to construct the projection matrix from your info, invert it, and send the 8 device-normalized coordinates of the corners through it. In OpenGL (and I assume Vulkan), those would be:

(-1, -1, -1),
(-1, -1, 1),
(-1, 1, -1),
(-1, 1, 1),
(1, -1, -1),
(1, -1, 1),
(1, 1, -1),
(1, 1, 1)


In DirectX or Metal, the Z values should be 0 and 1 rather than -1 and 1.