Fix up the graphics setting detection

SL-18563
meow-7.2.2
Jonathan "Geenz" Goodman 2023-03-27 15:06:25 -07:00
parent 084ef5173f
commit 6c554c9c92
3 changed files with 14 additions and 8 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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] ) );