From d1a130488e5a5f3837479ad7f929beb4c43e81fb Mon Sep 17 00:00:00 2001 From: Lars Hofhansl Date: Sat, 22 Jul 2017 12:44:15 -0700 Subject: [PATCH] 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. --- src/clientmap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;