From 0637f575941d99ea102d0b14786a83b3f02c65e5 Mon Sep 17 00:00:00 2001 From: thatcomputerguy0101 Date: Thu, 28 Nov 2024 00:13:36 -0500 Subject: [PATCH] Fix planar projection focal calculation --- src/projection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/projection.rs b/src/projection.rs index 5e8f67bd..c7bf0f39 100644 --- a/src/projection.rs +++ b/src/projection.rs @@ -336,7 +336,7 @@ impl From> for Matrix4 { } let two: S = cast(2).unwrap(); - let inv_f = Rad::tan(persp.fovy / two); + let inv_f = Rad::tan(persp.fovy / two) * two / persp.height; let focal_point = -inv_f.recip();