diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6a84f640307c924ea0cb0c8b75e31d2617a505d2..e707e1eb5e57824b698f9c86657735b425fbb5d4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10399,7 +10399,18 @@ <key>Type</key> <string>S32</string> <key>Value</key> - <real>1</real> + <integer>2</integer> + </map> + <key>RenderHeroProbeConservativeUpdateMultiplier</key> + <map> + <key>Comment</key> + <string>How many probe updates to wait until it's time to update faces that are not directly facing the camera. Acts as a multiplier. E.g., frames to the periphery of the camera updating once every 3 updates, vs ones directly facing the camera updating every update.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>16</integer> </map> <key>RenderReflectionProbeVolumes</key> <map> diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp index 3adf4604326846bf3bc8f9d9578c806e439ff8bb..a00b6d6b5d96c311fb6f351a5a1ea4bf94f19acf 100644 --- a/indra/newview/llheroprobemanager.cpp +++ b/indra/newview/llheroprobemanager.cpp @@ -165,7 +165,12 @@ void LLHeroProbeManager::update() { float shouldUpdate = cam_direction * cubeFaces[i] * 0.5 + 0.5; - int updateRate = fmaxf(1, (1 - shouldUpdate) * 8); + int updateRate = ceilf((1 - shouldUpdate) * gPipeline.RenderHeroProbeConservativeUpdateMultiplier); + + // Chances are this is a face that's non-visible to the camera when it's being reflected. + // Set it to 0. It will be skipped below. + if (updateRate == gPipeline.RenderHeroProbeConservativeUpdateMultiplier) + updateRate = 0; mFaceUpdateList[i] = updateRate; } diff --git a/indra/newview/llheroprobemanager.h b/indra/newview/llheroprobemanager.h index 038a8fd45a99833712c0c6ca322741dbe3eac901..e430cae2032b64a23df18b09d7b8a05d66d3b48c 100644 --- a/indra/newview/llheroprobemanager.h +++ b/indra/newview/llheroprobemanager.h @@ -138,7 +138,6 @@ class alignas(16) LLHeroProbeManager std::map<int, int> mFaceUpdateList; U32 mCurrentProbeUpdateFrame = 0; - U32 mLowPriorityFaceThrottle = 2; std::vector<LLVOVolume*> mHeroVOList; LLVOVolume* mNearestHero; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e3e2da3b30a50d1c3e99e7fc49b75bafc0d7b3f2..94ec5c0817bda33a5bd33986f1c84dfaa661f660 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -200,6 +200,7 @@ S32 LLPipeline::RenderScreenSpaceReflectionGlossySamples; S32 LLPipeline::RenderBufferVisualization; bool LLPipeline::RenderMirrors; S32 LLPipeline::RenderHeroProbeUpdateRate; +S32 LLPipeline::RenderHeroProbeConservativeUpdateMultiplier; LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize"); const U32 LLPipeline::MAX_BAKE_WIDTH = 512; @@ -561,6 +562,7 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderBufferVisualization"); connectRefreshCachedSettingsSafe("RenderMirrors"); connectRefreshCachedSettingsSafe("RenderHeroProbeUpdateRate"); + connectRefreshCachedSettingsSafe("RenderHeroProbeConservativeUpdateMultiplier"); gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); } @@ -1074,6 +1076,7 @@ void LLPipeline::refreshCachedSettings() LLViewerShaderMgr::instance()->setShaders(); } RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate"); + RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier"); sReflectionProbesEnabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionsEnabled") && gSavedSettings.getBOOL("RenderReflectionsEnabled"); RenderSpotLight = nullptr; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index fe00c52e6d75f6f5a8de8302ddafa836ec2c03a6..817750b4a1cfd10ac526012e3b1954add783a51c 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -1057,6 +1057,7 @@ class LLPipeline static S32 RenderBufferVisualization; static bool RenderMirrors; static S32 RenderHeroProbeUpdateRate; + static S32 RenderHeroProbeConservativeUpdateMultiplier; }; void render_bbox(const LLVector3 &min, const LLVector3 &max);