diff --git a/src/projection/lh_yup.rs b/src/projection/lh_yup.rs index 59ab17b..42b602d 100644 --- a/src/projection/lh_yup.rs +++ b/src/projection/lh_yup.rs @@ -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), ) } diff --git a/src/projection/rh_yup.rs b/src/projection/rh_yup.rs index ddee91b..9384ae5 100644 --- a/src/projection/rh_yup.rs +++ b/src/projection/rh_yup.rs @@ -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), ) }