forked from Mirrorlandia_minetest/minetest
Tune brightness stuff and fog color
This commit is contained in:
parent
ad5ac22442
commit
993821a924
29
src/game.cpp
29
src/game.cpp
@ -574,7 +574,7 @@ void update_skybox(video::IVideoDriver* driver, ITextureSource *tsrc,
|
|||||||
if(g_settings->getBool("enable_farmesh"))
|
if(g_settings->getBool("enable_farmesh"))
|
||||||
return;*/
|
return;*/
|
||||||
|
|
||||||
if(brightness >= 0.5)
|
if(brightness >= 0.7)
|
||||||
{
|
{
|
||||||
skybox = smgr->addSkyBoxSceneNode(
|
skybox = smgr->addSkyBoxSceneNode(
|
||||||
tsrc->getTextureRaw("skybox2.png"),
|
tsrc->getTextureRaw("skybox2.png"),
|
||||||
@ -2117,14 +2117,21 @@ void the_game(
|
|||||||
u32 daynight_ratio = client.getDayNightRatio();
|
u32 daynight_ratio = client.getDayNightRatio();
|
||||||
u8 light8 = decode_light((daynight_ratio * LIGHT_SUN) / 1000);
|
u8 light8 = decode_light((daynight_ratio * LIGHT_SUN) / 1000);
|
||||||
brightness = (float)light8/255.0;
|
brightness = (float)light8/255.0;
|
||||||
video::SColor bgcolor = video::SColor(
|
// Make night look good
|
||||||
255,
|
brightness = brightness * 1.15 - 0.15;
|
||||||
bgcolor_bright.getRed() * brightness,
|
video::SColor bgcolor;
|
||||||
bgcolor_bright.getGreen() * brightness,
|
if(brightness >= 0.2 && brightness < 0.7)
|
||||||
bgcolor_bright.getBlue() * brightness);
|
bgcolor = video::SColor(
|
||||||
/*skycolor.getRed() * brightness,
|
255,
|
||||||
skycolor.getGreen() * brightness,
|
bgcolor_bright.getRed() * brightness,
|
||||||
skycolor.getBlue() * brightness);*/
|
bgcolor_bright.getGreen() * brightness*0.7,
|
||||||
|
bgcolor_bright.getBlue() * brightness*0.5);
|
||||||
|
else
|
||||||
|
bgcolor = video::SColor(
|
||||||
|
255,
|
||||||
|
bgcolor_bright.getRed() * brightness,
|
||||||
|
bgcolor_bright.getGreen() * brightness,
|
||||||
|
bgcolor_bright.getBlue() * brightness);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Update skybox
|
Update skybox
|
||||||
@ -2139,7 +2146,7 @@ void the_game(
|
|||||||
{
|
{
|
||||||
clouds->step(dtime);
|
clouds->step(dtime);
|
||||||
clouds->update(v2f(player_position.X, player_position.Z),
|
clouds->update(v2f(player_position.X, player_position.Z),
|
||||||
0.05+brightness*0.95);
|
brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2155,7 +2162,7 @@ void the_game(
|
|||||||
|
|
||||||
farmesh->step(dtime);
|
farmesh->step(dtime);
|
||||||
farmesh->update(v2f(player_position.X, player_position.Z),
|
farmesh->update(v2f(player_position.X, player_position.Z),
|
||||||
0.05+brightness*0.95, farmesh_range);
|
brightness, farmesh_range);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store brightness value
|
// Store brightness value
|
||||||
|
Loading…
Reference in New Issue
Block a user