I think I've discovered a bug in CMeshManipulator.cpp (Irrlicht Release 1.7.2)
Function: void CMeshManipulator::recalculateNormals(IMeshBuffer* buffer, bool smooth, bool angleWeighted) const
Line: 102-107
old code:
Code: Select all
if (angleWeighted)
normal *= getAngleWeight(v1,v2,v3);
buffer->getNormal(idx[i+0]) += normal;
buffer->getNormal(idx[i+1]) += normal;
buffer->getNormal(idx[i+2]) += normal;
Code: Select all
core::vector3df angleWeight(1.f,1.f,1.f);
if (angleWeighted)
angleWeight = getAngleWeight(v1,v2,v3);
buffer->getNormal(idx[i+0]) += angleWeight.X * normal;
buffer->getNormal(idx[i+1]) += angleWeight.Y * normal;
buffer->getNormal(idx[i+2]) += angleWeight.Z * normal;
Squarefox