Skip to content

Commit

Permalink
Fix planar projection focal calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcomputerguy0101 committed Nov 28, 2024
1 parent 8c29a7e commit 0637f57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/projection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl<S: BaseFloat> From<PlanarFov<S>> for Matrix4<S> {
}

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();

Expand Down

0 comments on commit 0637f57

Please sign in to comment.