Nikhila Ravi 4bf30593ff back face culling in rasterization
Summary:
Added backface culling as an option to the `raster_settings`. This is needed for the full forward rendering of shapenet meshes with texture (some meshes contain
multiple overlapping segments which have different textures).

For a triangle (v0, v1, v2) define the vectors A = (v1 - v0) and B = (v2 − v0) and use this to calculate the area of the triangle as:
```
area = 0.5 * A  x B
area = 0.5 * ((x1 − x0)(y2 − y0) − (x2 − x0)(y1 − y0))
```
The area will be positive if (v0, v1, v2) are oriented counterclockwise (a front face), and negative if (v0, v1, v2) are oriented clockwise (a back face).

We can reuse the `edge_function` as it already calculates the triangle area.

Reviewed By: jcjohnson

Differential Revision: D20960115

fbshipit-source-id: 2d8a4b9ccfb653df18e79aed8d05c7ec0f057ab1
2020-04-22 08:22:46 -07:00
..
2020-04-20 14:54:16 -07:00
2020-01-23 11:53:46 -08:00
2020-04-15 14:10:45 -07:00
2020-04-14 17:22:56 -07:00
2020-04-17 07:44:16 -07:00
2020-04-11 00:21:24 -07:00
2020-04-17 07:44:16 -07:00
2020-04-20 14:54:16 -07:00
2020-04-16 14:02:16 -07:00
2020-04-20 12:19:45 -07:00
2020-04-15 14:10:45 -07:00
2020-04-17 07:44:16 -07:00
2020-04-14 17:22:56 -07:00
2020-04-11 00:21:24 -07:00
2020-03-30 11:27:41 -07:00
2020-04-06 06:41:00 -07:00
2020-04-17 07:44:16 -07:00
2020-04-16 18:36:19 -07:00
2020-04-15 21:58:59 -07:00
2020-04-11 00:21:24 -07:00
2020-04-17 10:50:22 -07:00
2020-01-23 11:53:46 -08:00