I am working on a small software renderer, and I want to discard invisible triangles from the drawing process. Let's say I have a screen with resolution of 200x100 pixels. The triangle is defined with three 2-dimensional coordinates {x, y}
in the screen space.
What is the fastest possible way to get a yes/no answer for the question "Should my triangle be drawn?", I don't need to retrieve intersection coordinates, just a boolean answer.
Note: on the image below all four red triangles need to be drawn even though some of their vertices aren't on the screen.