summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-05-17 14:32:07 -0500
committerDave Parks <davep@lindenlab.com>2022-05-17 14:32:07 -0500
commit53c692c9597551c9a1ba8eee346432de51d9d22d (patch)
tree556441b5d177bb2489e3794e753b4787e4f357e7 /indra/newview/llvovolume.cpp
parentb2141e94465998d13ab4b5d894b0edcdad0e8216 (diff)
SL-17416 Quick 'n dirty reflection probe override hack.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index ef6ee4b910..784c0350fc 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2157,7 +2157,7 @@ void LLVOVolume::setNumTEs(const U8 num_tes)
return ;
}
-//virtual
+//virtual
void LLVOVolume::changeTEImage(S32 index, LLViewerTexture* imagep)
{
BOOL changed = (mTEImages[index] != imagep);
@@ -5690,6 +5690,24 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
bool is_pbr = false;
#endif
+ // HACK - make this object a Reflection Probe if a certain UUID is detected
+ static LLCachedControl<std::string> reflection_probe_id(gSavedSettings, "RenderReflectionProbeTextureHackID", "");
+ if (facep->getTextureEntry()->getID() == LLUUID(reflection_probe_id))
+ {
+ if (!vobj->mIsReflectionProbe)
+ {
+ vobj->mIsReflectionProbe = true;
+ vobj->mReflectionProbe = gPipeline.mReflectionMapManager.registerViewerObject(vobj);
+ }
+ }
+ else
+ {
+ // not a refleciton probe any more
+ vobj->mIsReflectionProbe = false;
+ vobj->mReflectionProbe = nullptr;
+ }
+ // END HACK
+
//ALWAYS null out vertex buffer on rebuild -- if the face lands in a render
// batch, it will recover its vertex buffer reference from the spatial group
facep->setVertexBuffer(NULL);