summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llshadermgr.cpp6
-rw-r--r--indra/llrender/llshadermgr.h1
-rw-r--r--indra/newview/llviewercontrol.cpp1
-rw-r--r--indra/newview/llviewershadermgr.cpp9
-rw-r--r--indra/newview/pipeline.cpp7
5 files changed, 9 insertions, 15 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 8bc00c0cf6..bc542d325e 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -44,7 +44,6 @@ using std::make_pair;
using std::string;
LLShaderMgr * LLShaderMgr::sInstance = NULL;
-bool LLShaderMgr::sMirrorsEnabled = false;
LLShaderMgr::LLShaderMgr()
{
@@ -600,11 +599,6 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
extra_code_text[extra_code_count++] = strdup("#define FXAA_GLSL_130 1\n");
}
- if (sMirrorsEnabled)
- {
- extra_code_text[extra_code_count++] = strdup("#define HERO_PROBES 1\n");
- }
-
// Use alpha float to store bit flags
// See: C++: addDeferredAttachment(), shader: frag_data[2]
extra_code_text[extra_code_count++] = strdup("#define GBUFFER_FLAG_SKIP_ATMOS 0.0 \n"); // atmo kill
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index fe6137c448..921ef20997 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -378,7 +378,6 @@ public:
bool mShaderCacheInitialized = false;
bool mShaderCacheEnabled = false;
std::string mShaderCacheDir;
- static bool sMirrorsEnabled;
protected:
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 820d413535..1d483f1b8a 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -797,6 +797,7 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeDetail", handleReflectionProbeDetailChanged);
setting_setup_signal_listener(gSavedSettings, "RenderReflectionsEnabled", handleReflectionProbeDetailChanged);
setting_setup_signal_listener(gSavedSettings, "RenderScreenSpaceReflections", handleReflectionProbeDetailChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderMirrors", handleReflectionProbeDetailChanged);
setting_setup_signal_listener(gSavedSettings, "RenderHeroProbeResolution", handleHeroProbeResolutionChanged);
setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderDeferredSSAO", handleSetShaderChanged);
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);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5598660368..16d66123ae 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1072,12 +1072,7 @@ void LLPipeline::refreshCachedSettings()
RenderScreenSpaceReflectionAdaptiveStepMultiplier = gSavedSettings.getF32("RenderScreenSpaceReflectionAdaptiveStepMultiplier");
RenderScreenSpaceReflectionGlossySamples = gSavedSettings.getS32("RenderScreenSpaceReflectionGlossySamples");
RenderBufferVisualization = gSavedSettings.getS32("RenderBufferVisualization");
- if (gSavedSettings.getBOOL("RenderMirrors") != RenderMirrors)
- {
- RenderMirrors = gSavedSettings.getBOOL("RenderMirrors");
- LLViewerShaderMgr::instance()->clearShaderCache();
- LLViewerShaderMgr::instance()->setShaders();
- }
+ RenderMirrors = gSavedSettings.getBOOL("RenderMirrors");
RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate");
RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier");