diff options
Diffstat (limited to 'indra/newview/llreflectionmapmanager.cpp')
-rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 846f8a895a..69ade8d796 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -80,6 +80,9 @@ void load_exr(const std::string& filename) gGL.getTexUnit(0)->bind(gEXRImage); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGBA, GL_FLOAT, out); + + LLImageGLMemory::alloc_tex_image(width, height, GL_RGB16F, 1); + free(out); // release memory of image data glGenerateMipmap(GL_TEXTURE_2D); @@ -401,6 +404,13 @@ void LLReflectionMapManager::update() { closestDynamic = probe; } + + if (sLevel == 0) + { + // only update default probe when coverage is set to none + llassert(probe == mDefaultProbe); + break; + } } if (realtime && closestDynamic != nullptr) @@ -460,6 +470,11 @@ void LLReflectionMapManager::update() LLReflectionMap* LLReflectionMapManager::addProbe(LLSpatialGroup* group) { + if (gGLManager.mGLVersion < 4.05f || !LLPipeline::sReflectionProbesEnabled) + { + return nullptr; + } + LLReflectionMap* probe = new LLReflectionMap(); probe->mGroup = group; @@ -571,6 +586,11 @@ LLReflectionMap* LLReflectionMapManager::registerSpatialGroup(LLSpatialGroup* gr LLReflectionMap* LLReflectionMapManager::registerViewerObject(LLViewerObject* vobj) { + if (!LLPipeline::sReflectionProbesEnabled) + { + return nullptr; + } + llassert(vobj != nullptr); LLReflectionMap* probe = new LLReflectionMap(); @@ -700,6 +720,7 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) } else { + llassert(gSavedSettings.getS32("RenderReflectionProbeLevel") > 0); // should never update a probe that's not the default probe if reflection coverage is none probe->update(mRenderTarget.getWidth(), face); } @@ -1067,7 +1088,7 @@ void LLReflectionMapManager::updateUniforms() LLEnvironment& environment = LLEnvironment::instance(); LLSettingsSky::ptr_t psky = environment.getCurrentSky(); - static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true); + static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", false); F32 minimum_ambiance = psky->getReflectionProbeAmbiance(should_auto_adjust); bool is_ambiance_pass = gCubeSnapshot && !isRadiancePass(); |