mirror of
https://github.com/microsoft/UVAtlas
synced 2024-11-09 22:00:06 +00:00
guard against a potential divide-by-zero with degenerate faces
This commit is contained in:
parent
f489e12d7e
commit
0fbcfb3a99
@ -323,6 +323,7 @@ HRESULT CBaseMeshInfo::ComputeInputFaceAttributes(
|
||||
|
||||
pfFaceAreaArray[i] = area * 0.5f;
|
||||
fMeshArea += pfFaceAreaArray[i];
|
||||
if ( area > 0.f )
|
||||
vFaceNormal /= area;
|
||||
XMStoreFloat3(pFaceNormal, vFaceNormal);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user