Here is the before picture. I calculate the color of each polygon face using the face normals (the line perpendicular to the face of the polygon).

With Gouraud Shading, I use the normals at each vertex, not the face. The normal for a vertex is the average of the normals of all the faces that use that vertex. With this normal I calculate the shading value for each vertex and create a gradient in each triangle.

I'll post the answer to the problem in the future if someone wants me to.
No comments:
Post a Comment