Tag Info

New answers tagged


There is nothing inherently wrong with your original code when it comes to normalization. The only problem can be with meshes that do not properly share vertices, meaning your normalization code will always normalize the vertices that belong to a single Triangle. If you wish to fix such a mesh, you should either: Weld all vertices during import stage ...


The problem is that you need to actually average the normals. I see that you are accumulating a sum of each face normal that a vertice is apart of but I don't see where you actually divide it by the number of normals that you summed. What you would probably need to do is have another int array of the same size as your normal array and increment them after ...

Top 50 recent answers are included