summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawpoolmaterials.cpp17
-rw-r--r--indra/newview/llheroprobemanager.cpp2
-rw-r--r--indra/newview/llsettingsvo.cpp9
3 files changed, 10 insertions, 18 deletions
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp
index 15033160d5..c0e4ed38c1 100644
--- a/indra/newview/lldrawpoolmaterials.cpp
+++ b/indra/newview/lldrawpoolmaterials.cpp
@@ -183,23 +183,6 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass)
glUniform4fv(specular, 1, lastSpecular.mV);
}
- if (gPipeline.mHeroProbeManager.isMirrorPass())
- {
- mShader->uniform1f(LLShaderMgr::MIRROR_FLAG, 1);
- }
- else
- {
- mShader->uniform1f(LLShaderMgr::MIRROR_FLAG, 0);
- }
-
- LLVector4 clipPlane = LLVector4(gPipeline.mHeroProbeManager.mMirrorPosition[0],
- gPipeline.mHeroProbeManager.mMirrorPosition[1],
- gPipeline.mHeroProbeManager.mMirrorPosition[2],
- 1);
-
- mShader->uniform4fv(LLShaderMgr::CLIP_PLANE,
- 1, clipPlane.mV);
-
LLVOAvatar* lastAvatar = nullptr;
for (LLCullResult::drawinfo_iterator i = begin; i != end; )
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index bbe493f6a9..ed37a67c85 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -166,7 +166,7 @@ void LLHeroProbeManager::update()
LLVector3 point = (reject - project) + hero_pos;
mCurrentClipPlane.setVec(hero_pos, face_normal);
- mMirrorPosition = hero_pos;
+ mMirrorPosition = mNearestHero->getPositionAgent();
mMirrorNormal = LLVector3(0, 0, 1);
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 9cfb774a90..da5504f83f 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -1033,6 +1033,15 @@ void LLSettingsVOWater::applySpecial(void *ptarget, bool force)
shader->uniform4fv(LLShaderMgr::CLIP_PLANE, mirrorPlane.mV);
LLVector4 light_direction = env.getClampedLightNorm();
+ if (gPipeline.mHeroProbeManager.isMirrorPass())
+ {
+ shader->uniform1f(LLShaderMgr::MIRROR_FLAG, 1);
+ }
+ else
+ {
+ shader->uniform1f(LLShaderMgr::MIRROR_FLAG, 0);
+ }
+
F32 waterFogKS = 1.f / llmax(light_direction.mV[2], WATER_FOG_LIGHT_CLAMP);
shader->uniform1f(LLShaderMgr::WATER_FOGKS, waterFogKS);