summaryrefslogtreecommitdiff
path: root/indra/newview/lllegacyatmospherics.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-02-13 23:58:44 +0000
committerRider Linden <rider@lindenlab.com>2019-02-13 23:58:44 +0000
commit07d509bce6dc06a7ef8b3a640d622d1ed44ae3cc (patch)
tree1d3f6df6406cd8b4a0472ccd24224e3d6dc12325 /indra/newview/lllegacyatmospherics.cpp
parent5d9915243ba1a93934969e7e203a25c6f4c9f9d1 (diff)
parent65927e0a76aaf8ff4dc268acdb12007265ff3a14 (diff)
Merged in graham_linden/viewer-eep-fixes (pull request #276)
SL-10181, SL-10546
Diffstat (limited to 'indra/newview/lllegacyatmospherics.cpp')
-rw-r--r--indra/newview/lllegacyatmospherics.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp
index b631e5498d..017c21df39 100644
--- a/indra/newview/lllegacyatmospherics.cpp
+++ b/indra/newview/lllegacyatmospherics.cpp
@@ -585,9 +585,10 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in)
F32 depth = water_height - camera_height;
// get the water param manager variables
- float water_fog_density = pwater->getWaterFogDensity();
+ float water_fog_density = pwater->getModifiedWaterFogDensity(depth <= 0.0f);
+
LLColor4 water_fog_color(pwater->getWaterFogColor());
-
+
// adjust the color based on depth. We're doing linear approximations
float depth_scale = gSavedSettings.getF32("WaterGLFogDepthScale");
float depth_modifier = 1.0f - llmin(llmax(depth / depth_scale, 0.01f),