From: Mikko Rasa Date: Mon, 2 Feb 2015 17:51:42 +0000 (+0200) Subject: Make sure the shadow volume does not have zero size X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=eb6c78e5a38dcf4513915b72d2dbe2e35e2958a1;p=r2c2.git Make sure the shadow volume does not have zero size --- 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