summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-03-27 18:30:05 -0500
committerDave Parks <davep@lindenlab.com>2023-03-27 18:30:05 -0500
commit9bf08f553aa59122a606487f1b28bd6083d9f966 (patch)
tree0e650ce4c61b743e639e16d8b01d8d51b281d988
parentb81761c1d0c6f29e618b11d71ba9abb314214451 (diff)
parent91a9a94df115fa2a69abb6cb1a6eacb569f08eef (diff)
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
-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 1f4833ea21..7a5676e0ab 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] ) );