[vulkan] Correct another sign error in QFV_PerspectiveTanFar

It turns out it was completely tangled up when I first wrote it. The
previous correction got things mostly right, but the overall sign was
wrong (ie, it gave -1..0 instead of 1..0)
This commit is contained in:
Bill Currie 2025-02-08 11:09:58 +09:00
parent f10abf4a18
commit 81349ced5d

View file

@ -146,8 +146,8 @@ QFV_PerspectiveTanFar (mat4f_t proj, float fov_x, float fov_y,
proj[0] = (vec4f_t) { 1/fx, 0, 0, 0 };
proj[1] = (vec4f_t) { 0, 1/fy, 0, 0 };
proj[2] = (vec4f_t) { 0, 0, -n/(n-f), 1 };
proj[3] = (vec4f_t) { 0, 0, n*f/(n-f), 0 };
proj[2] = (vec4f_t) { 0, 0, -n/(f-n), 1 };
proj[3] = (vec4f_t) { 0, 0, n*f/(f-n), 0 };
}
void