diff --git a/Util/Environment.gd b/Util/Environment.gd index 85b70e4..2e9d38e 100644 --- a/Util/Environment.gd +++ b/Util/Environment.gd @@ -43,7 +43,7 @@ func _ready(): func _process(_delta): _currentTime = Daytime.get_time() - _degree = (_currentTime/_max) * 180 + _degree = 20 + (_currentTime/_max) * 140 _sun_position() _light_rotation() _sky_light() @@ -58,21 +58,21 @@ func _light_rotation(): #set light color depending on daytime func _sky_light(): - var new_light_energy = 0.0 + var new_light_energy = 0.2 if _degree <= SUNRISE_DEGREE: #_worldEnvironment.environment.background_sky.sky_curve = 1 _setSkyColor = SUNRISE elif _degree > SUNRISE_DEGREE and _degree < RISE_INTERPOL: #interpolate colors from sunrise sky to daytime sky _setSkyColor = SUNRISE.linear_interpolate(STANDARD_SKY_TOP, ((_degree-SUNRISE_DEGREE)/(RISE_INTERPOL-SUNRISE_DEGREE))) - new_light_energy = inverse_lerp(SUNRISE_DEGREE, RISE_INTERPOL, _degree) + new_light_energy = 0.2 + inverse_lerp(SUNRISE_DEGREE, RISE_INTERPOL, _degree) * 0.8 elif _degree >= RISE_INTERPOL and _degree <= SET_INTERPOL: #_worldEnvironment.environment.background_sky.sky_curve = 0.09 _setSkyColor = STANDARD_SKY_TOP new_light_energy = 1.0 elif _degree > SET_INTERPOL and _degree < SUNSET_DEGREE: #interpolate colors from daytime sky to sunset sky _setSkyColor = STANDARD_SKY_TOP.linear_interpolate(SUNSET, ((_degree-SET_INTERPOL)/(SUNSET_DEGREE-SET_INTERPOL))) - new_light_energy = 1.0 - inverse_lerp(SET_INTERPOL, SUNSET_DEGREE, _degree) + new_light_energy = 0.2 + (1.0 - inverse_lerp(SET_INTERPOL, SUNSET_DEGREE, _degree)) * 0.8 elif _degree >= SUNSET_DEGREE: _setSkyColor = SUNSET