diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-09 20:51:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 19:51:02 -0500 |
commit | e101d1aa28a51570e6d76dc12df810b1daa71e7e (patch) | |
tree | 1018c667abca8e2fb5494200696b794f3d856e65 /indra/newview/llviewershadermgr.cpp | |
parent | a79e02da0f2acad033bc2eaa048c62b4dd26be7f (diff) |
Fix excessive clearing of shader cache when toggling mirrors (#1950)
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 12d0aa4f8e..96354ea18f 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -495,8 +495,6 @@ void LLViewerShaderMgr::setShaders() mShaderList.clear(); - LLShaderMgr::sMirrorsEnabled = LLPipeline::RenderMirrors; - if (!gGLManager.mHasRequirements) { // Viewer will show 'hardware requirements' warning later @@ -755,6 +753,8 @@ std::string LLViewerShaderMgr::loadBasicShaders() bool ssr = gSavedSettings.getBOOL("RenderScreenSpaceReflections"); + bool mirrors = gSavedSettings.getBOOL("RenderMirrors"); + bool has_reflection_probes = gSavedSettings.getBOOL("RenderReflectionsEnabled") && gGLManager.mGLVersion > 3.99f; S32 probe_level = llclamp(gSavedSettings.getS32("RenderReflectionProbeLevel"), 0, 3); @@ -782,6 +782,11 @@ std::string LLViewerShaderMgr::loadBasicShaders() attribs["REF_SAMPLE_COUNT"] = "32"; } + if (mirrors) + { + attribs["HERO_PROBES"] = "1"; + } + { // PBR terrain const S32 mapping = clamp_terrain_mapping(gSavedSettings.getS32("RenderTerrainPBRPlanarSampleCount")); attribs["TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT"] = llformat("%d", mapping); |