X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FTime%2Flight.cxx;h=b7c4a6b819f91e90b0336a923777c43041f7f3d3;hb=818a462a02be1b5301502aa803dd7e3c6edcec26;hp=d8a23e1eaff87d736f850c19b1e4e8583524051c;hpb=cc26bb7fe73be1fa23b5e1c3b88f71e0d361a4c2;p=flightgear.git diff --git a/src/Time/light.cxx b/src/Time/light.cxx index d8a23e1ea..b7c4a6b81 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -117,7 +117,7 @@ void fgLIGHT::Update( void ) { // calculate lighting parameters based on sun's relative angle to // local up - deg = sun_angle * 180.0 / FG_PI; + deg = sun_angle * RAD_TO_DEG; FG_LOG( FG_EVENT, FG_INFO, " Sun angle = " << deg ); ambient = ambient_tbl->interpolate( deg ); @@ -137,10 +137,12 @@ void fgLIGHT::Update( void ) { scene_ambient[0] = white[0] * ambient; scene_ambient[1] = white[1] * ambient; scene_ambient[2] = white[2] * ambient; + scene_ambient[3] = 1.0; scene_diffuse[0] = white[0] * diffuse; scene_diffuse[1] = white[1] * diffuse; scene_diffuse[2] = white[2] * diffuse; + scene_diffuse[3] = 1.0; // set sky color sky_color[0] = base_sky_color[0] * sky_brightness;