File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -509,10 +509,10 @@ impl Camera {
509
509
. ok_or ( ViewportConversionError :: InvalidData ) ?;
510
510
// NDC z-values outside of 0 < z < 1 are outside the (implicit) camera frustum and are thus not in viewport-space
511
511
if ndc_space_coords. z < 0.0 {
512
- return Err ( ViewportConversionError :: PastNearPlane ) ;
512
+ return Err ( ViewportConversionError :: PastFarPlane ) ;
513
513
}
514
514
if ndc_space_coords. z > 1.0 {
515
- return Err ( ViewportConversionError :: PastFarPlane ) ;
515
+ return Err ( ViewportConversionError :: PastNearPlane ) ;
516
516
}
517
517
518
518
// Flip the Y co-ordinate origin from the bottom to the top.
@@ -547,10 +547,10 @@ impl Camera {
547
547
. ok_or ( ViewportConversionError :: InvalidData ) ?;
548
548
// NDC z-values outside of 0 < z < 1 are outside the (implicit) camera frustum and are thus not in viewport-space
549
549
if ndc_space_coords. z < 0.0 {
550
- return Err ( ViewportConversionError :: PastNearPlane ) ;
550
+ return Err ( ViewportConversionError :: PastFarPlane ) ;
551
551
}
552
552
if ndc_space_coords. z > 1.0 {
553
- return Err ( ViewportConversionError :: PastFarPlane ) ;
553
+ return Err ( ViewportConversionError :: PastNearPlane ) ;
554
554
}
555
555
556
556
// Stretching ndc depth to value via near plane and negating result to be in positive room again.
You can’t perform that action at this time.
0 commit comments