Can I get the plane describing the edge of my view frustum?

19 Views Asked by At

tldr: I have a view frustum I've made by performing several cross products between different matrices, now I'm struggling to clip objects since I can't find a way to describe the planes at the edge of my vision.

I'm making a view frustum. the method I'm following can be found here https://www.youtube.com/watch?v=M_Hx0g5vFko&t=103s

I'd kind of works but there's no explanation on how they do clipping (basically cutting down objects that aren't fully in the view frustum). I've been looking at other tutorials for clipping but they use a different method where they define the planes at the edge of their vision first, like here https://www.youtube.com/watch?v=IXMDMi09S3w&list=PLn3eTxaOtL2NLlk1rRb_hiZw9uWHxl-3Q&index=3

but my method doesnt start by defining those planes.

I don't seem to be able to define a plane at the edge of my vision, I only have 1 point on the plane, the position of the camera (its at one extreme edge of the plane but its still on the plane) so im not sure how to define the plane.

I'm making my camera matrix by cross producting a translation matrix with a rotation matrix.

an example of how I make my translation and rotation matrix

Is there a way to get the planes around the edge of my vision when I make my view frustum this way?... or am I screwed?

#########################

A full example of my script can be found here (use wasd to move, i advise you move backwards a bit first, (hold s for a few seconds) )

https://github.com/tgmjack/view-frustum-m-help/tree/main

Is there anything else you'd like me to add to help understand the problem?

Where else could I ask that may be helpful?