Skip to content

Commit 0637f57

Browse files
Fix planar projection focal calculation
1 parent 8c29a7e commit 0637f57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/projection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ impl<S: BaseFloat> From<PlanarFov<S>> for Matrix4<S> {
336336
}
337337

338338
let two: S = cast(2).unwrap();
339-
let inv_f = Rad::tan(persp.fovy / two);
339+
let inv_f = Rad::tan(persp.fovy / two) * two / persp.height;
340340

341341
let focal_point = -inv_f.recip();
342342

0 commit comments

Comments
 (0)