mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Smooth day-night transitions
This commit is contained in:
parent
041585a78e
commit
804a7875a2
7 changed files with 87 additions and 23 deletions
|
@ -2505,8 +2505,7 @@ void the_game(
|
|||
Calculate general brightness
|
||||
*/
|
||||
u32 daynight_ratio = client.getEnv().getDayNightRatio();
|
||||
float time_brightness = (float)decode_light(
|
||||
(daynight_ratio * LIGHT_SUN) / 1000) / 255.0;
|
||||
float time_brightness = decode_light_f((float)daynight_ratio/1000.0);
|
||||
float direct_brightness = 0;
|
||||
bool sunlight_seen = false;
|
||||
if(g_settings->getBool("free_move")){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue