Skip to content

Commit

Permalink
[util] Return unchanged matrix if matrix cannot be inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
K0bin committed Mar 11, 2024
1 parent eba31cf commit 90eb194
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/util/util_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ namespace dxvk {
Vector4 dot0 = { m[0] * row0 };
float dot1 = (dot0.x + dot0.y) + (dot0.z + dot0.w);

if (dot1 == 0.0f) {
return m;
}

return inverse * (1.0f / dot1);
}

Expand Down

0 comments on commit 90eb194

Please sign in to comment.