mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[util] Return unchanged matrix if matrix cannot be inverted
This commit is contained in:
parent
9e422a2b63
commit
df9bdfc6ea
@ -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…
x
Reference in New Issue
Block a user