From 4c1f92115682da8200af1afed3d4f43697416004 Mon Sep 17 00:00:00 2001 From: Eatdirt Date: Thu, 7 Jan 2021 23:28:51 +0100 Subject: [PATCH] Remove the Moon and Sun illusion effects --- src/Viewer/renderer.cxx | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/Viewer/renderer.cxx b/src/Viewer/renderer.cxx index 0dc0cc4e4..e89d31e4a 100644 --- a/src/Viewer/renderer.cxx +++ b/src/Viewer/renderer.cxx @@ -863,31 +863,15 @@ FGRenderer::updateSky() // The sun and moon distances are scaled down versions of the // actual distance. See FGRenderer::setupView() for more details. - double sun_horiz_eff, moon_horiz_eff; - if (_horizon_effect->getBoolValue()) { - sun_horiz_eff - = 0.67 + pow(osg::clampAbove(0.5 + cos(l->get_sun_angle()), - 0.0), - 0.33) / 3.0; - moon_horiz_eff - = 0.67 + pow(osg::clampAbove(0.5 + cos(l->get_moon_angle()), - 0.0), - 0.33)/3.0; - } else { - sun_horiz_eff = moon_horiz_eff = 1.0; - } - - - SGSkyState sstate; sstate.pos = globals->get_current_view()->getViewPosition(); sstate.pos_geod = globals->get_current_view()->getPosition(); sstate.ori = globals->get_current_view()->getViewOrientation(); sstate.spin = l->get_sun_rotation(); sstate.gst = globals->get_time_params()->getGst(); - sstate.sun_dist = 50000.0 * sun_horiz_eff; + sstate.sun_dist = 50000.0; sstate.moon_dist_bare = 40000.0; - sstate.moon_dist_factor = moon_horiz_eff; + sstate.moon_dist_factor = 1.0; sstate.sun_angle = l->get_sun_angle(); SGSkyColor scolor;