diff options
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl | 2 | ||||
-rw-r--r-- | indra/newview/llreflectionmap.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 21 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 5 |
4 files changed, 30 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl index 64e6bc9da2..3443785e1a 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl @@ -106,7 +106,7 @@ vec3 toneMap(vec3 color) color *= exposure * exp_scale; // mix ACES and Linear here as a compromise to avoid over-darkening legacy content - color = mix(toneMapACES_Hill(color), color, 0.333); + color = mix(toneMapACES_Hill(color), color, 0.3); #endif return color; diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index ec54fa1165..a26445b4bc 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -167,7 +167,16 @@ void LLReflectionMap::autoAdjustOrigin() { mPriority = 1; mOrigin.load3(mViewerObject->getPositionAgent().mV); - mRadius = mViewerObject->getScale().mV[0]*0.5f; + + if (mViewerObject->getVolume() && ((LLVOVolume*)mViewerObject)->getReflectionProbeIsBox()) + { + LLVector3 s = mViewerObject->getScale().scaledVec(LLVector3(0.5f, 0.5f, 0.5f)); + mRadius = s.magVec(); + } + else + { + mRadius = mViewerObject->getScale().mV[0] * 0.5f; + } } } diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 72f7e23b0c..69674417c1 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -252,14 +252,12 @@ void LLReflectionMapManager::update() continue; } - if (probe != mDefaultProbe && + if (probe != mDefaultProbe && (!probe->isRelevant() || mPaused)) { // skip irrelevant probes (or all non-default probes if paused) continue; } - - LLVector4a d; if (probe != mDefaultProbe) @@ -999,10 +997,21 @@ void LLReflectionMapManager::updateUniforms() llassert(refmap->mCubeIndex >= 0); // should always be true, if not, getReflectionMaps is bugged { - if (refmap->mViewerObject) + if (refmap->mViewerObject && refmap->mViewerObject->getVolume()) { // have active manual probes live-track the object they're associated with - refmap->mOrigin.load3(refmap->mViewerObject->getPositionAgent().mV); - refmap->mRadius = refmap->mViewerObject->getScale().mV[0] * 0.5f; + LLVOVolume* vobj = (LLVOVolume*)refmap->mViewerObject; + + refmap->mOrigin.load3(vobj->getPositionAgent().mV); + + if (vobj->getReflectionProbeIsBox()) + { + LLVector3 s = vobj->getScale().scaledVec(LLVector3(0.5f, 0.5f, 0.5f)); + refmap->mRadius = s.magVec(); + } + else + { + refmap->mRadius = refmap->mViewerObject->getScale().mV[0] * 0.5f; + } } modelview.affineTransform(refmap->mOrigin, oa); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 50cd4adb73..bf4f0083ff 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8303,7 +8303,10 @@ void LLPipeline::doWaterHaze() gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); - mWaterPool->pushFaceGeometry(); + if (mWaterPool) + { + mWaterPool->pushFaceGeometry(); + } } unbindDeferredShader(haze_shader); |