mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Try to tune fog to work well on high-end machines also
This commit is contained in:
parent
28f2fdb6de
commit
9b907dd65a
4 changed files with 17 additions and 11 deletions
11
src/game.cpp
11
src/game.cpp
|
@ -952,6 +952,8 @@ void the_game(
|
|||
|
||||
bool show_profiler = false;
|
||||
|
||||
bool force_fog_off = false;
|
||||
|
||||
/*
|
||||
Main loop
|
||||
*/
|
||||
|
@ -1323,6 +1325,10 @@ void the_game(
|
|||
show_profiler = !show_profiler;
|
||||
guitext_profiler->setVisible(show_profiler);
|
||||
}
|
||||
else if(input->wasKeyDown(getKeySetting("keymap_toggle_force_fog_off")))
|
||||
{
|
||||
force_fog_off = !force_fog_off;
|
||||
}
|
||||
|
||||
// Item selection with mouse wheel
|
||||
{
|
||||
|
@ -1971,7 +1977,7 @@ void the_game(
|
|||
Fog
|
||||
*/
|
||||
|
||||
if(g_settings->getBool("enable_fog") == true)
|
||||
if(g_settings->getBool("enable_fog") == true && !force_fog_off)
|
||||
{
|
||||
f32 range;
|
||||
if(farmesh)
|
||||
|
@ -1981,12 +1987,11 @@ void the_game(
|
|||
else
|
||||
{
|
||||
range = draw_control.wanted_range*BS + MAP_BLOCKSIZE*BS*1.5;
|
||||
range *= 0.9;
|
||||
if(draw_control.range_all)
|
||||
range = 100000*BS;
|
||||
/*if(range < 50*BS)
|
||||
range = range * 0.5 + 25*BS;*/
|
||||
// Move the invisible limit a bit further
|
||||
//range *= 1.2;
|
||||
}
|
||||
|
||||
driver->setFog(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue