Skip to content
Snippets Groups Projects
Commit be9e4f18 authored by David Parks's avatar David Parks
Browse files

SL-18630 Nudge underground automatic reflection probes to 2m above ground.

parent 055883be
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "pipeline.h" #include "pipeline.h"
#include "llviewerwindow.h" #include "llviewerwindow.h"
#include "llviewerregion.h" #include "llviewerregion.h"
#include "llworld.h"
extern F32SecondsImplicit gFrameTimeSeconds; extern F32SecondsImplicit gFrameTimeSeconds;
...@@ -123,6 +124,12 @@ void LLReflectionMap::autoAdjustOrigin() ...@@ -123,6 +124,12 @@ void LLReflectionMap::autoAdjustOrigin()
mOrigin.mul(0.5f); mOrigin.mul(0.5f);
} }
// make sure origin isn't under ground
F32* fp = mOrigin.getF32ptr();
LLVector3 origin(fp);
F32 height = LLWorld::instance().resolveLandHeightAgent(origin) + 2.f;
fp[2] = llmax(fp[2], height);
// make sure radius encompasses all objects // make sure radius encompasses all objects
LLSimdScalar r2 = 0.0; LLSimdScalar r2 = 0.0;
for (int i = 0; i < 8; ++i) for (int i = 0; i < 8; ++i)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment