From eb6c78e5a38dcf4513915b72d2dbe2e35e2958a1 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 2 Feb 2015 19:51:42 +0200 Subject: [PATCH] Make sure the shadow volume does not have zero size --- source/3d/view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/3d/view.cpp b/source/3d/view.cpp index 2050f58..9fd5684 100644 --- a/source/3d/view.cpp +++ b/source/3d/view.cpp @@ -99,7 +99,7 @@ void View3D::update_shadow_area() { Vector minp, maxp; compute_bounds(minp, maxp); - shadow.set_target((minp+maxp)/2.0f, (maxp-minp).norm()/2.0f); + shadow.set_target((minp+maxp)/2.0f, max((maxp-minp).norm()/2.0f, 0.1f)); } } // namespace R2C2 -- 2.45.2