summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-06-05 15:31:39 -0700
committerGraham Linden <graham@lindenlab.com>2019-06-05 15:31:39 -0700
commite710dd257414ef006c633a93b26b24304aa4e04f (patch)
tree075bb1891f930b27cfc7676f45c3ccee7fc783e4
parent2408e8be5ee66d8860cd7a8275012af1fa5635a6 (diff)
SL-11368
Force update of water fog color shader uniform to fix low/low+ application of water fog.
-rw-r--r--indra/newview/lldrawpoolterrain.cpp5
-rw-r--r--indra/newview/llsettingsvo.h6
2 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 9428dedbd0..33a11631fe 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -49,6 +49,7 @@
#include "llviewershadermgr.h"
#include "llrender.h"
#include "llenvironment.h"
+#include "llsettingsvo.h"
const F32 DETAIL_SCALE = 1.f/16.f;
int DebugDetailMap = 0;
@@ -347,6 +348,10 @@ void LLDrawPoolTerrain::renderFullShader()
shader->uniform4fv(LLShaderMgr::OBJECT_PLANE_S, 1, tp0.mV);
shader->uniform4fv(LLShaderMgr::OBJECT_PLANE_T, 1, tp1.mV);
+ LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater();
+
+ ((LLSettingsVOWater*)pwater.get())->updateShader(shader);
+
//
// detail texture 1
//
diff --git a/indra/newview/llsettingsvo.h b/indra/newview/llsettingsvo.h
index 0f4b715e44..6f105c9d61 100644
--- a/indra/newview/llsettingsvo.h
+++ b/indra/newview/llsettingsvo.h
@@ -40,6 +40,7 @@
class LLVFS;
class LLInventoryItem;
+class LLGLSLShader;
//=========================================================================
class LLSettingsVOBase : public LLSettingsBase
@@ -101,6 +102,8 @@ public:
bool isAdvanced() const { return m_isAdvanced; }
+ virtual void updateShader(LLGLSLShader* shader) { applySpecial(shader); }
+
protected:
LLSettingsVOSky();
@@ -132,6 +135,9 @@ public:
static ptr_t buildFromLegacyPresetFile(const std::string &name, const std::string &path, LLSD &messages);
static LLSD convertToLegacy(const ptr_t &);
+
+ virtual void updateShader(LLGLSLShader* shader) { applySpecial(shader); }
+
protected:
LLSettingsVOWater();