diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
index a6a254391548b83c1c35c905cf866c5a86c63556..9b5cb398835abf17d383845047bf27bc2e7764ca 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 81a7aa47c8e6a3d71704086deeebd44cf3dba608..0974ae07423f0c753982c801c8d0477f60352a75 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 31c71aac2af686c00e46ff9b8175466c52bae576..7790013f0160406f4338db9ae3f5b9314acaf91c 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] ) );