From 4ae5a8965f605ad36b4884a8475176666d84b840 Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 30 Apr 2023 11:52:22 +0100 Subject: [PATCH 1/3] BUG-233797/BUG-233798 -ve underwater fog density causes blackout. --- indra/llinventory/llsettingswater.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp index 90f99e8198..ce6b4a6430 100644 --- a/indra/llinventory/llsettingswater.cpp +++ b/indra/llinventory/llsettingswater.cpp @@ -290,6 +290,19 @@ F32 LLSettingsWater::getModifiedWaterFogDensity(bool underwater) const if (underwater && underwater_fog_mod > 0.0f) { underwater_fog_mod = llclamp(underwater_fog_mod, 0.0f, 10.0f); + // BUG-233797/BUG-233798 -ve underwater fog density can cause (unrecoverable) blackout. + // raising a negative number to a non-integral power results in a non-real result (which is NaN for our purposes) + // Two methods were tested, number 2 is being used: + // 1) Force the fog_mod to be integral. The effect is unlikely to be nice, but it is better than blackness. + // In this method a few of the combinations are "usable" but the water colour is effectively inverted (blue becomes yellow) + // this seems to be unlikely to be a desirable use case for the majority. + // 2) Force density to be an arbitrary non-negative (i.e. 1) when underwater and modifier is not an integer (1 was aribtrarily chosen as it gives at least some notion of fog in the transition) + // This is more restrictive, effectively forcing a density under certain conditions, but allowing the range of #1 and avoiding blackness in other cases + // at the cost of overriding the fog density. + if(fog_density < 0.0f && underwater_fog_mod != (F32)llround(underwater_fog_mod) ) + { + fog_density = 1.0f; + } fog_density = pow(fog_density, underwater_fog_mod); } return fog_density; From 250228af253e208be1f7adb3ea6a9f99c6c36865 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 9 May 2023 17:58:13 +0300 Subject: [PATCH 2/3] SL-19660 Updated contributions doc --- doc/contributions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/contributions.txt b/doc/contributions.txt index 2df71dad59..7509245ac3 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -288,6 +288,7 @@ Beq Janus SL-18592 SL-18637 SL-19317 + SL-19660 Beth Walcher Bezilon Kasei Biancaluce Robbiani From 5a70639b7992842a9f74ec81b11bac56608b8f2e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 17 May 2023 09:54:46 -0400 Subject: [PATCH 3/3] Increment viewer version to 6.6.13 following promotion of DRTVWR-577 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 5ea36a044a..97154f804c 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.6.12 +6.6.13