- Home /
How is a polygon determined to be front facing or back facing?
I originally thought that the mesh normals were used to determine whether a face is facing towards or away from the camera. However, this doesn't seem to be the case.
In this image, there are 2 quads. The one on the left is the original, and the one on the right has normals flipped. When viewed from the other side, both quads are culled.
How does Unity determine whether a polygon is back facing or not?
So reading through this article, it seems that the other common method of backface culling is checking whether the vertices of the polygon are clockwise or counterclockwise in screen space. I'm guessing that this is what Unity does, though I cannot find any documentation about this.
Answer by insominx · Feb 19, 2018 at 01:02 AM
It is based on the order that a triangle's vertices are presented in.
For a left-handed system like Unity, the vertices are expected to form triangles in a clockwise fashion. Although you can specify normals any way you like, graphics APIs implicitly define sides for you in the same way that normals can be auto-generated.
Your answer
Follow this Question
Related Questions
Unity shader vertex displace doesn't work 0 Answers
Seam on Procedural Mesh 1 Answer
Hiding or deleting specific faces of a mesh with a texture or LUT? 2 Answers
What are normals? 1 Answer
Shader wants normal , but the mesh does not have them 2 Answers