1
0
鏡像自 https://github.com/luanti-org/luanti.git 已同步 2025-11-01 15:55:26 +01:00

Use correct indexes when checking mesh normals

此提交包含在:
Dmitry Kostenko
2022-01-01 02:06:48 +01:00
提交者 x2048
父節點 a684a91bf5
當前提交 e4583cb9b7

查看文件

@@ -356,7 +356,7 @@ bool checkMeshNormals(scene::IMesh *mesh)
buffer->getPosition(buffer->getIndices()[i+2]));
for (u16 j = 0; j < 3; j++)
if (plane.Normal.dotProduct(buffer->getNormal(buffer->getIndices()[j])) < 0)
if (plane.Normal.dotProduct(buffer->getNormal(buffer->getIndices()[i+j])) <= 0)
return false;
}