diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2023-07-11 09:51:14 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-07-12 15:44:15 -0700 |
commit | 66283201301b0e55336f4b20407fed811acdc739 (patch) | |
tree | 30b9a2d1eeb1a2e353984145e87cb7842e55027c /indra/newview/llviewershadermgr.cpp | |
parent | afcb421bdc666d9b45fb5adb7098b7e433042823 (diff) |
SL-19567: Add option RenderGlowNoise for low precision glow dithering, enabled by default
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 4559d71d6d..82b16d67bd 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -898,11 +898,20 @@ BOOL LLViewerShaderMgr::loadShadersEffects() if (success) { - gGlowExtractProgram.mName = "Glow Extract Shader (Post)"; + const bool use_glow_noise = gSavedSettings.getBOOL("RenderGlowNoise"); + const std::string glow_noise_label = use_glow_noise ? " (+Noise)" : ""; + + gGlowExtractProgram.mName = llformat("Glow Extract Shader (Post)%s", glow_noise_label.c_str()); gGlowExtractProgram.mShaderFiles.clear(); gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractV.glsl", GL_VERTEX_SHADER)); gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractF.glsl", GL_FRAGMENT_SHADER)); gGlowExtractProgram.mShaderLevel = mShaderLevel[SHADER_EFFECT]; + + if (use_glow_noise) + { + gGlowExtractProgram.addPermutation("HAS_NOISE", "1"); + } + success = gGlowExtractProgram.createShader(NULL, NULL); if (!success) { |