diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2023-09-20 14:45:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-20 14:45:03 -0700 |
commit | e02dc20b9db4c6ec192b2c68c4c732a26296fc20 (patch) | |
tree | be25a3dff6011a3a8d07b7b29b53eb3aad17f253 /indra/newview/llreflectionmap.cpp | |
parent | 5b2de090c1ac44c415e8573e0d6b1136cd689f35 (diff) | |
parent | bb7f023aaaaa2aaa747a131486390f739cc32ed3 (diff) |
Merge pull request #379 from secondlife/davep/SL-19842
New GLTF protocol and lighting changes
Diffstat (limited to 'indra/newview/llreflectionmap.cpp')
-rw-r--r-- | indra/newview/llreflectionmap.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index a039c8072a..ec54fa1165 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -157,6 +157,10 @@ void LLReflectionMap::autoAdjustOrigin() } mRadius = llmax(sqrtf(r2.getF32()), 8.f); + + // make sure near clip doesn't poke through ground + fp[2] = llmax(fp[2], height+mRadius*0.5f); + } } else if (mViewerObject) @@ -204,6 +208,14 @@ F32 LLReflectionMap::getNearClip() { ret = ((LLVOVolume*)mViewerObject)->getReflectionProbeNearClip(); } + else if (mGroup) + { + ret = mRadius * 0.5f; // default to half radius for automatic object probes + } + else + { + ret = 1.f; // default to 1m for automatic terrain probes + } return llmax(ret, MINIMUM_NEAR_CLIP); } |