diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-11-30 12:01:45 -0600 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-11-30 12:01:45 -0600 |
commit | 68875523e09f9fe06fc4b3cd5225995bb13966c3 (patch) | |
tree | 75b5aaae7665360c152c399a8cf80cb6147902e2 /indra/newview/llsettingsvo.cpp | |
parent | 964f9e74d5e97fc46fc74d6afff97dad5c6381c3 (diff) |
SL-20611 Incorporate water haze into new post effect atmospherics goodness
Diffstat (limited to 'indra/newview/llsettingsvo.cpp')
-rw-r--r-- | indra/newview/llsettingsvo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 2f65f3dec3..7009fb98ab 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -63,6 +63,7 @@ #include <boost/algorithm/string/replace.hpp> #include "llinventoryobserver.h" #include "llinventorydefines.h" +#include "llworld.h" #include "lltrans.h" @@ -989,6 +990,15 @@ void LLSettingsVOWater::applySpecial(void *ptarget, bool force) { F32 water_height = env.getWaterHeight(); + if (LLViewerCamera::instance().cameraUnderWater()) + { // when the camera is under water, use the water height at the camera position + LLViewerRegion* region = LLWorld::instance().getRegionFromPosAgent(LLViewerCamera::instance().getOrigin()); + if (region) + { + water_height = region->getWaterHeight(); + } + } + //transform water plane to eye space glh::vec3f norm(0.f, 0.f, 1.f); glh::vec3f p(0.f, 0.f, water_height); |