浏览代码

Fixed faceted normals in SIB importer.

rmitton 8 年之前
父节点
当前提交
209e972762
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      code/SIBImporter.cpp

+ 2 - 2
code/SIBImporter.cpp

@@ -437,9 +437,9 @@ static aiVector3D CalculateVertexNormal(SIBMesh* mesh, uint32_t faceIdx, uint32_
 
 
                     // Move to whichever side we didn't just come from.
                     // Move to whichever side we didn't just come from.
                     if (!edge.creased) {
                     if (!edge.creased) {
-                        if (edge.faceA != prevFaceIdx && edge.faceA != faceIdx)
+                        if (edge.faceA != prevFaceIdx && edge.faceA != faceIdx && edge.faceA != 0xffffffff)
                             nextFaceIdx = edge.faceA;
                             nextFaceIdx = edge.faceA;
-                        else if (edge.faceB != prevFaceIdx && edge.faceB != faceIdx)
+                        else if (edge.faceB != prevFaceIdx && edge.faceB != faceIdx && edge.faceB != 0xffffffff)
                             nextFaceIdx = edge.faceB;
                             nextFaceIdx = edge.faceB;
                     }
                     }
                 }
                 }