Fixed meshlet verticies overflow in case degenerate triangle is passed (#60)
This commit is contained in:
Родитель
28cb9a1bb9
Коммит
553263b663
|
@ -172,6 +172,11 @@ namespace
|
|||
_In_reads_(3) const T* tri,
|
||||
InlineMeshlet<T>& meshlet)
|
||||
{
|
||||
// Cull degenerate triangle and return success
|
||||
// newCount calculation will break if such triangle is passed
|
||||
if (tri[0] == tri[1] || tri[1] == tri[2] || tri[0] == tri[2])
|
||||
return true;
|
||||
|
||||
// Are we already full of vertices?
|
||||
if (meshlet.UniqueVertexIndices.size() >= maxVerts)
|
||||
return false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче