summaryrefslogtreecommitdiff
path: root/indra/newview/llwlparamset.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-09-05 21:58:11 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-09-05 21:58:11 +0300
commitf636b48109e3234ce8a5c36502c7f2615c253bb1 (patch)
tree61622d080dc39c065013c0fe076737f70db99cff /indra/newview/llwlparamset.cpp
parent2325dca257a2c98816b6fcfc790060b06f223cdd (diff)
parentcd895d6e583f42349ca3bc330d82c66740ce08ab (diff)
Merged in lindenlab/viewer-manul
Diffstat (limited to 'indra/newview/llwlparamset.cpp')
-rw-r--r--indra/newview/llwlparamset.cpp39
1 files changed, 13 insertions, 26 deletions
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index cd7a32abdd..986f167d8d 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -284,11 +284,6 @@ void LLWLParamSet::setEastAngle(float val)
mParamValues["east_angle"] = val;
}
-void LLWLParamSet::setAmbient(const LLVector4& val)
-{
- set("ambient", val);
-}
-
void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
{
// set up the iterators
@@ -342,14 +337,19 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
setStarBrightness((1 - weight) * (F32) src.getStarBrightness()
+ weight * (F32) dest.getStarBrightness());
- llassert(src.getSunAngle() >= - F_PI &&
- src.getSunAngle() <= 3 * F_PI);
- llassert(dest.getSunAngle() >= - F_PI &&
- dest.getSunAngle() <= 3 * F_PI);
- llassert(src.getEastAngle() >= 0 &&
- src.getEastAngle() <= 4 * F_PI);
- llassert(dest.getEastAngle() >= 0 &&
- dest.getEastAngle() <= 4 * F_PI);
+ // FIXME: we have established that this assert fails
+ // frequently. Someone who understands the code needs to figure
+ // out if it matters. In the meantime, disabling the checks so we
+ // can stop interfering with other development.
+
+ //llassert(src.getSunAngle() >= - F_PI &&
+ // src.getSunAngle() <= 3 * F_PI);
+ //llassert(dest.getSunAngle() >= - F_PI &&
+ // dest.getSunAngle() <= 3 * F_PI);
+ //llassert(src.getEastAngle() >= 0 &&
+ // src.getEastAngle() <= 4 * F_PI);
+ //llassert(dest.getEastAngle() >= 0 &&
+ // dest.getEastAngle() <= 4 * F_PI);
// sun angle and east angle require some handling to make sure
// they go in circles. Yes quaternions would work better.
@@ -384,19 +384,6 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
setSunAngle((1 - weight) * srcSunAngle + weight * destSunAngle);
setEastAngle((1 - weight) * srcEastAngle + weight * destEastAngle);
-
- // ambient
-
- LLVector4 srcAmbient = src.getAmbient();
- LLVector4 destAmbient = dest.getAmbient();
- LLVector4 rsltAmbient;
-
- for (int i = 0; i < LENGTHOFVECTOR4; ++i)
- {
- rsltAmbient.mV[i] = srcAmbient.mV[i] + ((destAmbient.mV[i] - srcAmbient.mV[i]) * weight);
- }
-
- setAmbient(rsltAmbient);
// now setup the sun properly