From b082300ab11d435124c7bff58e6c48f9326446b4 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 15 Jun 2003 12:23:55 +0000 Subject: [PATCH] Model the effect where the sun and moon look 1.5 times larger when close to the horizon --- src/Main/main.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index c1d2ab2b7..79fe01a9a 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -624,6 +624,8 @@ void fgRenderFrame() { // within the range of the far clip plane. // Moon distance: 384,467 kilometers // Sun distance: 150,000,000 kilometers + double sun_eye_eff = 0.67+pow(0.5+cos(cur_light_params.sun_angle*2)/2,0.33)/3; + double moon_eye_eff = 0.67+pow(0.5+cos(cur_light_params.moon_angle*2)/2,0.33)/3; thesky->reposition( current__view->get_view_pos(), current__view->get_zero_elev(), current__view->get_world_up(), @@ -637,10 +639,10 @@ void fgRenderFrame() { globals->get_time_params()->getGst(), globals->get_ephem()->getSunRightAscension(), globals->get_ephem()->getSunDeclination(), - 50000.0, + 50000.0 * sun_eye_eff, globals->get_ephem()->getMoonRightAscension(), globals->get_ephem()->getMoonDeclination(), - 40000.0 ); + 40000.0 * moon_eye_eff ); } glEnable( GL_DEPTH_TEST ); -- 2.39.5