BLI: Math: Fix perspective matrix function

The port missed this one component that should have been left to 0.0.
This commit is contained in:
2023-01-17 21:02:28 +01:00
parent d42d4e339f
commit 17768b3df1
2 changed files with 2 additions and 0 deletions

View File

@@ -1136,6 +1136,7 @@ MatBase<T, 4, 4> perspective(T left, T right, T bottom, T top, T near_clip, T fa
mat[2][2] = -(far_clip + near_clip) / z_delta;
mat[2][3] = -1.0f;
mat[3][2] = (-2.0f * near_clip * far_clip) / z_delta;
mat[3][3] = 0.0f;
}
return mat;
}

View File

@@ -1343,6 +1343,7 @@ mat4x4 projection_perspective(
mat[2][2] = -(far_clip + near_clip) / z_delta;
mat[2][3] = -1.0;
mat[3][2] = (-2.0 * near_clip * far_clip) / z_delta;
mat[3][3] = 0.0;
}
return mat;
}