summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-08-06 23:33:29 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-08-06 23:33:29 -0700
commitb861832102abf469963bd3c56f7b009ba4432d6a (patch)
tree6f46fbf8eb185a1883c3dda0d896a1de3254f439 /indra/newview/llvovolume.cpp
parentf4a6a434fab9bbce34e5c11408323967c5b5e22e (diff)
Making more progress, need to add the heroprobe manager.
DRTVWR-583
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 556ec083a7..254e945243 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1044,7 +1044,9 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline)
{
updateReflectionProbePtr();
}
-
+
+ gPipeline.setMirror(mDrawable, isMirror());
+
updateRadius();
bool force_update = true; // avoid non-alpha mDistance update being optimized away
mDrawable->updateDistance(*LLViewerCamera::getInstance(), force_update);
@@ -3377,6 +3379,30 @@ F32 LLVOVolume::getLightCutoff() const
}
}
+BOOL LLVOVolume::isMirror() const
+{
+ S32 faceCount = getNumFaces();
+
+ // Temporary hack to set the object to mirror.
+ for (int i = 0; i < faceCount; i++)
+ {
+ const LLTextureEntry* te = getTE(i);
+
+ if (te->getMaterialParams().notNull())
+ {
+ LLViewerTexture* specularp = getTESpecularMap(0);
+
+ if (specularp && specularp->getID() == "da7ecda1-e780-423f-ce27-26df7dc69cb6")
+ {
+ LL_INFOS() << "BELLADONNA OF SADNESS" << LL_ENDL;
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
BOOL LLVOVolume::isReflectionProbe() const
{
return getParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE);
@@ -4427,6 +4453,8 @@ void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_u
}
updateReflectionProbePtr();
+
+ gPipeline.setMirror(mDrawable, isMirror());
}
void LLVOVolume::updateReflectionProbePtr()