mirror of https://github.com/doitsujin/dxvk
[util] Return unchanged matrix if matrix cannot be inverted
This commit is contained in:
parent
a7cce7c785
commit
f984dd4df2
|
@ -205,6 +205,10 @@ namespace dxvk {
|
|||
Vector4 dot0 = { m[0] * row0 };
|
||||
float dot1 = (dot0.x + dot0.y) + (dot0.z + dot0.w);
|
||||
|
||||
if (unlikely(std::abs(dot1) <= 0.000001f)) {
|
||||
return m;
|
||||
}
|
||||
|
||||
return inverse * (1.0f / dot1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue