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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user