@@ -65,8 +65,9 @@ void LLReflectionMap::update(U32 resolution, U32 face, bool force_dynamic, F32 n
65
65
}
66
66
67
67
F32 clip = (near_clip > 0 ) ? near_clip : getNearClip ();
68
+ bool dynamic = force_dynamic || getIsDynamic ();
68
69
69
- gViewerWindow ->cubeSnapshot (LLVector3 (mOrigin ), mCubeArray , mCubeIndex , face, clip, getIsDynamic () || force_dynamic , useClipPlane, clipPlane);
70
+ gViewerWindow ->cubeSnapshot (LLVector3 (mOrigin ), mCubeArray , mCubeIndex , face, clip, dynamic , useClipPlane, clipPlane);
70
71
}
71
72
72
73
void LLReflectionMap::autoAdjustOrigin ()
@@ -185,7 +186,7 @@ void LLReflectionMap::autoAdjustOrigin()
185
186
}
186
187
}
187
188
188
- bool LLReflectionMap::intersects (LLReflectionMap* other)
189
+ bool LLReflectionMap::intersects (LLReflectionMap* other) const
189
190
{
190
191
LLVector4a delta;
191
192
delta.setSub (other->mOrigin , mOrigin );
@@ -201,24 +202,24 @@ bool LLReflectionMap::intersects(LLReflectionMap* other)
201
202
202
203
extern LLControlGroup gSavedSettings ;
203
204
204
- F32 LLReflectionMap::getAmbiance ()
205
+ F32 LLReflectionMap::getAmbiance () const
205
206
{
206
207
F32 ret = 0 .f ;
207
- if (mViewerObject && mViewerObject ->getVolume ())
208
+ if (mViewerObject && mViewerObject ->getVolumeConst ())
208
209
{
209
- ret = ((LLVOVolume*) mViewerObject ) ->getReflectionProbeAmbiance ();
210
+ ret = mViewerObject ->getReflectionProbeAmbiance ();
210
211
}
211
212
212
213
return ret;
213
214
}
214
215
215
- F32 LLReflectionMap::getNearClip ()
216
+ F32 LLReflectionMap::getNearClip () const
216
217
{
217
218
const F32 MINIMUM_NEAR_CLIP = 0 .1f ;
218
219
219
220
F32 ret = 0 .f ;
220
221
221
- if (mViewerObject && mViewerObject ->getVolume ())
222
+ if (mViewerObject && mViewerObject ->getVolumeConst ())
222
223
{
223
224
ret = mViewerObject ->getReflectionProbeNearClip ();
224
225
}
@@ -234,11 +235,13 @@ F32 LLReflectionMap::getNearClip()
234
235
return llmax (ret, MINIMUM_NEAR_CLIP);
235
236
}
236
237
237
- bool LLReflectionMap::getIsDynamic ()
238
+ bool LLReflectionMap::getIsDynamic () const
238
239
{
239
- if (gSavedSettings .getS32 (" RenderReflectionProbeDetail" ) > (S32) LLReflectionMapManager::DetailLevel::STATIC_ONLY &&
240
+ static LLCachedControl<S32> detail (gSavedSettings , " RenderReflectionProbeDetail" , 1 );
241
+ if (detail () > (S32)LLReflectionMapManager::DetailLevel::STATIC_ONLY &&
240
242
mViewerObject &&
241
- mViewerObject ->getVolume ())
243
+ !mViewerObject ->isDead () &&
244
+ mViewerObject ->getVolumeConst ())
242
245
{
243
246
return mViewerObject ->getReflectionProbeIsDynamic ();
244
247
}
@@ -278,12 +281,12 @@ bool LLReflectionMap::getBox(LLMatrix4& box)
278
281
return false ;
279
282
}
280
283
281
- bool LLReflectionMap::isActive ()
284
+ bool LLReflectionMap::isActive () const
282
285
{
283
286
return mCubeIndex != -1 ;
284
287
}
285
288
286
- bool LLReflectionMap::isRelevant ()
289
+ bool LLReflectionMap::isRelevant () const
287
290
{
288
291
static LLCachedControl<S32> RenderReflectionProbeLevel (gSavedSettings , " RenderReflectionProbeLevel" , 3 );
289
292
0 commit comments