Skip to content

Commit

Permalink
Fix perspective_reversed_z_vk for lh_yup and rh_yup (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
YouSafe authored Feb 26, 2024
1 parent d6ff5ba commit 377b001
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/projection/lh_yup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ pub fn perspective_reversed_z_vk(
Mat4::new(
Vec4::new(sx, 0.0, 0.0, 0.0),
Vec4::new(0.0, -sy, 0.0, 0.0),
Vec4::new(0.0, 0.0, z_far / nmf, 1.0),
Vec4::new(0.0, 0.0, z_near / nmf, 1.0),
Vec4::new(0.0, 0.0, -z_near * z_far / nmf, 0.0),
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/projection/rh_yup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ pub fn perspective_reversed_z_vk(
Mat4::new(
Vec4::new(sx, 0.0, 0.0, 0.0),
Vec4::new(0.0, -sy, 0.0, 0.0),
Vec4::new(0.0, 0.0, z_far / nmf, -1.0),
Vec4::new(0.0, 0.0, -z_near / nmf, -1.0),
Vec4::new(0.0, 0.0, -z_near * z_far / nmf, 0.0),
)
}
Expand Down

0 comments on commit 377b001

Please sign in to comment.