From: Lars Hofhansl Date: Sat, 22 Jul 2017 19:44:15 +0000 (-0700) Subject: Darkness detection: Reduce chance of false positives darkening the skybox X-Git-Tag: 5.0.0~986 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d1a130488e5a5f3837479ad7f929beb4c43e81fb;p=oweals%2Fminetest.git Darkness detection: Reduce chance of false positives darkening the skybox The getBackgroundBrightness() function detects darkness in the view direction to decide when to make the skybox dark. The volume checked was too narrow and missed the left and right edges of the view, too easily causing a dark skybox. Widen the checked volume to match a FOV of 72 degrees and a 16:9 aspect ratio game window. --- diff --git a/src/clientmap.cpp b/src/clientmap.cpp index 7027d07e4..c443773b6 100644 --- a/src/clientmap.cpp +++ b/src/clientmap.cpp @@ -596,11 +596,12 @@ int ClientMap::getBackgroundBrightness(float max_d, u32 daylight_factor, }; if(z_directions[0].X < -99){ for(u32 i=0; i values; for(u32 i=0; i a; a.buildRotateFromTo(v3f(0,1,0), z_dir); v3f dir = m_camera_direction;