Skip to content

Commit

Permalink
Merge pull request #557 from thatcomputerguy0101/planar_projection
Browse files Browse the repository at this point in the history
Fix planar projection focal calculation
  • Loading branch information
aloucks authored Dec 7, 2024
2 parents 53e3f91 + 0637f57 commit ff840cb
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 ff840cb

Please sign in to comment.