From 00ff35cdb738d1cac1a02d09822fafb634a4fc51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Garc=C3=ADa=20Li=C3=B1=C3=A1n?= Date: Sun, 6 Dec 2020 14:40:53 +0100 Subject: [PATCH] Better shadow map depth ranges --- simgear/scene/viewer/CompositorPass.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/scene/viewer/CompositorPass.cxx b/simgear/scene/viewer/CompositorPass.cxx index 80be061a..704757f6 100644 --- a/simgear/scene/viewer/CompositorPass.cxx +++ b/simgear/scene/viewer/CompositorPass.cxx @@ -518,7 +518,7 @@ public: osg::Matrixd &light_view_matrix = camera->getViewMatrix(); light_view_matrix.makeLookAt( - aim + light_dir * (bs.radius() + 10.0f), + aim + light_dir * (bs.radius() + 100.f), aim, osg::Vec3(0.0f, 0.0f, 1.0f)); @@ -526,7 +526,7 @@ public: light_proj_matrix.makeOrtho( -bs.radius(), bs.radius(), -bs.radius(), bs.radius(), - 1.0, bs.radius() * 10.0); + 1.f, bs.radius() * 6.f + 100.f); // Do texel snapping to prevent flickering or shimmering. // We are using double precision vectors and matrices because in FG