1
0
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:
Robin Kertels 2024-03-11 19:12:20 +01:00 committed by Joshie
parent 9e422a2b63
commit df9bdfc6ea

View File

@ -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);
}