Organization of the Course
Seminar 4 - Culling
You can find all you need in the code.
Chyba: Odkazovaný objekt neexistuje nebo nemáte právo jej číst.
https://is.muni.cz/el/fi/jaro2021/PB009/um/seminars/
Your task is to implement 2 culling methods. One for culling triangles facing away from the camera and the second one for culling triangles outside of the view frustum.
1) Backface culling
Here your task is to use the triangle normal and a view matrix (defining the camera orientation and location) to determine if a triangle faces towards the camera or not.
2) Frustum culling
To cull a triangle outside of the frustum, you need to compute the triangle's bounding box (in practice you would do that for the whole object consisting of multiple triangles), convert the bounding box to NDC space and check if it is inside the frustum. In the NDC space, the frustum is a box ranging from -1 to 1 on all axes.