Thanks for tuning in to Google I/O. View all sessions on demand

# tfg.rendering.barycentrics.compute_triangle_matrices

Computes per-triangle matrices used in barycentric coordinate calculation.

The result corresponds to the inverse matrix from equation (4) in the paper "Triangle Scan Conversion using 2D Homogeneous Coordinates". Our matrix inverses are not divided by the determinant, only multiplied by its sign. The division happens in compute_barycentric_coordinates.

`clip_space_vertices` float32 tensor with shape [vertex_count, 4] containing vertex positions in clip space (x, y, z, w).
`triangles` 2-D int32 tensor with shape [triangle_count, 3]. Each triplet contains a triangle's vertex indices in counter-clockwise order.

3-D float32 tensor with shape [3, 3, triangle_count] containing per-triangle matrices.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]