Skip to content

Commit ff840cb

Browse files
authored
Merge pull request #557 from thatcomputerguy0101/planar_projection
Fix planar projection focal calculation
2 parents 53e3f91 + 0637f57 commit ff840cb

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)