I'm working on 3D exercise, and I have implemented Backface Removal technique that only works for Orthographic Projection and need to change it to support other projections as well.
What I did so far is :
- for each polygon I loop all vertices
- perform transitions and projections calculations
- calculate surface Normal by Newell's Method
- draw the polygon only if the vector direction is < 0
as I said this works only for orthographic projection and I'm struggling with other projections.
Please any help would be great
by the way I have seen this explanation here somewhere but didn't understand it :
"..The usual approach, used in actual 3D hardware, is to first do all of the transformation (including projection), then check whether the resulting 2D triangle is counterclockwise or clockwise wound, and keep or discard based on that condition".
maybe someone how does can explain what is the resulting 2D triangle ?
I'm using html5 canvas and js.