summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl3
-rw-r--r--indra/newview/llfeaturemanager.cpp8
-rw-r--r--indra/newview/llviewershadermgr.cpp11
3 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
index a6a2543915..9b5cb39883 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
@@ -29,9 +29,6 @@
float tapScreenSpaceReflection(int totalSamples, vec2 tc, vec3 viewPos, vec3 n, inout vec4 collectedColor, sampler2D source);
#endif
-#define REFMAP_COUNT 256
-#define REF_SAMPLE_COUNT 64 //maximum number of samples to consider
-
uniform samplerCubeArray reflectionProbes;
uniform samplerCubeArray irradianceProbes;
uniform sampler2D sceneMap;
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 81a7aa47c8..0974ae0742 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -434,19 +434,19 @@ bool LLFeatureManager::loadGPUClass()
mGPUClass = GPU_CLASS_0;
#endif
}
- else if (gbps <= 8.f)
+ else if (gbps <= 32.0f)
{
mGPUClass = GPU_CLASS_1;
}
- else if (gbps <= 16.f)
+ else if (gbps <= 64.0f)
{
mGPUClass = GPU_CLASS_2;
}
- else if (gbps <= 40.f)
+ else if (gbps <= 128.0f)
{
mGPUClass = GPU_CLASS_3;
}
- else if (gbps <= 80.f)
+ else if (gbps <= 256.0f)
{
mGPUClass = GPU_CLASS_4;
}
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 31c71aac2a..7790013f01 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -667,6 +667,10 @@ std::string LLViewerShaderMgr::loadBasicShaders()
BOOL local_light_kill = gSavedSettings.getBOOL("LocalLightDisable");
BOOL ssr = gSavedSettings.getBOOL("RenderScreenSpaceReflections");
+ bool has_reflection_probes = gSavedSettings.getBOOL("RenderReflectionsEnabled") && gGLManager.mGLVersion > 3.99f;
+
+ S32 probe_count = gSavedSettings.getS32("RenderReflectionProbeCount");
+
if (ambient_kill)
{
attribs["AMBIENT_KILL"] = "1";
@@ -699,6 +703,12 @@ std::string LLViewerShaderMgr::loadBasicShaders()
attribs["SSR"] = "1";
}
+ if (has_reflection_probes)
+ {
+ attribs["REFMAP_COUNT"] = std::to_string(probe_count);
+ attribs["REF_SAMPLE_COUNT"] = "32";
+ }
+
// We no longer have to bind the shaders to global glhandles, they are automatically added to a map now.
for (U32 i = 0; i < shaders.size(); i++)
{
@@ -721,7 +731,6 @@ std::string LLViewerShaderMgr::loadBasicShaders()
ch = llmax(LLGLSLShader::sIndexedTextureChannels, 1);
}
- bool has_reflection_probes = gSavedSettings.getBOOL("RenderReflectionsEnabled") && gGLManager.mGLVersion > 3.99f;
std::vector<S32> index_channels;
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsVarsF.glsl", mShaderLevel[SHADER_WINDLIGHT] ) );