Is there a way I can find the indices of the faces that are currently visible to the camera?
For instance, if I have a cube (6 sides; 12 faces) like below
I would like to end up with a set of size 6, each element being the index of a visible face.
Edit:
Maybe the following example would better illustrate why I need this.
If I have a model like the spiral model below
Depending on what angle I am viewing the model from, I may end up with faces being “stacked on top of each other”.
For instance, If I view the spiral model from above, it would look something like this:
If I project the vertices of each face to the camera, I end up with multiple faces with the same projected coordinates because they are overlapping from this view.
I would like to get only the faces that are immediately visible, and ignore the rest that are “behind” them.