Most efficient algorithm to calculate vertex normals from set of triangles for Gouraud shading

后端 未结 2 1257
清酒与你
清酒与你 2020-12-19 14:44

We are given a set of triangles. Each triangle is a triplet of points. Each point is a triplet of real numbers. We can calculate surface normal for each triangle. For Gourau

2条回答
  •  太阳男子
    2020-12-19 15:39

    Visit each triangle, calculate the normal for each triangle, ADD those to the vertex normal for each corner vertex.
    Then at the end, normalise the normals for each vertex.

    Then at least you only have to traverse the triangles once and you only store one normal/vertex.

提交回复
热议问题