From fd16357b6e1566cd7b97ed7d3166044aa35d6925 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 26 Apr 2018 11:03:15 +0200 Subject: [PATCH] Increase z buffer range to avoid clipping while panning/rotating the 3D view --- lib/Slic3r/GUI/3DScene.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm index 6cdf2a3e5e..88137185b7 100644 --- a/lib/Slic3r/GUI/3DScene.pm +++ b/lib/Slic3r/GUI/3DScene.pm @@ -1115,7 +1115,7 @@ sub Resize { # is only a workaround for an incorrectly set camera. # This workaround harms Z-buffer accuracy! # my $depth = 1.05 * $self->max_bounding_box->radius(); - my $depth = max(@{ $self->max_bounding_box->size }); + my $depth = 5.0 * max(@{ $self->max_bounding_box->size }); glOrtho( -$x/2, $x/2, -$y/2, $y/2, -$depth, $depth,