forked from Mirrors/openclonk
Fix assertion failure when rendering mesh with degenerate transform
It isn't enough to check the top-level mesh, because attached meshes also get a transformation from script. At least cotton branches sometimes do that. So check the matrix directly before using it and skip rendering.epoxy
parent
6e251832b8
commit
a6b1ee79e9
|
@ -655,6 +655,9 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
// Don't render with degenerate matrix
|
||||
if (fabs(modelviewMatrix.Determinant()) < 1e-6)
|
||||
return;
|
||||
// Modelview matrix does not change between passes, so cache it here
|
||||
const StdMeshMatrix normalMatrixTranspose = StdMeshMatrix::Inverse(modelviewMatrix);
|
||||
|
||||
|
|
Loading…
Reference in New Issue