From 348974089c6f5f441deda9cec028210b5a298d50 Mon Sep 17 00:00:00 2001 From: Rye Date: Thu, 23 Oct 2025 05:47:55 -0400 Subject: Restore linux CEF build support including changes from archive/develop Fix various files missing linden_common Signed-off-by: Rye --- indra/newview/app_settings/settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/app_settings/settings.xml') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d6a1fbd124..a7a52182c1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5053,6 +5053,17 @@ Value 0 + MediaPluginPipeWireVolumeCatcher + + Comment + Use PipeWire instead of PulseAudio for controlling web media volume. + Persist + 1 + Type + Boolean + Value + 1 + MediaControlFadeTime Comment -- cgit v1.3 From cec5419d5d072a326e7a6303aa3cb8ee3d6f5b80 Mon Sep 17 00:00:00 2001 From: Rye Date: Sat, 18 Oct 2025 02:13:22 -0400 Subject: Add debug option to force libvlc plugin on linux Signed-off-by: Rye --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewermedia.cpp | 7 +++++++ 2 files changed, 18 insertions(+) (limited to 'indra/newview/app_settings/settings.xml') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a7a52182c1..94c7a97ccc 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5064,6 +5064,17 @@ Value 1 + MediaPluginForceVLC + + Comment + Force use of VLC based media plugin. (Linux Only) + Persist + 1 + Type + Boolean + Value + 0 + MediaControlFadeTime Comment diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index bb3ea74589..a75f2b2c64 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1735,6 +1735,13 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ } else { +#if LL_LINUX + if(plugin_basename == "media_plugin_gstreamer10" && gSavedSettings.getBOOL("MediaPluginForceVLC")) + { + plugin_basename = "media_plugin_libvlc"; + } +#endif + std::string launcher_name = gDirUtilp->getLLPluginLauncher(); std::string plugin_name = gDirUtilp->getLLPluginFilename(plugin_basename); -- cgit v1.3 From 5a875a61881b4109a0d33caa6039a84372b33a95 Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 28 Oct 2025 08:00:07 -0400 Subject: Rework anisotropic filtering options into a dropdown with levels for better performance tuning of low end gpu Signed-off-by: Rye --- indra/llrender/llimagegl.cpp | 1 - indra/llrender/llimagegl.h | 1 - indra/llrender/llrender.cpp | 7 ++- indra/llrender/llrender.h | 1 + indra/newview/app_settings/settings.xml | 13 +++++- indra/newview/featuretable.txt | 30 +++++++----- indra/newview/featuretable_linux.txt | 30 +++++++----- indra/newview/featuretable_mac.txt | 29 +++++++----- indra/newview/llappviewer.cpp | 2 +- indra/newview/llfeaturemanager.cpp | 5 +- .../llfloaterpreferencesgraphicsadvanced.cpp | 20 ++++++++ indra/newview/llviewercontrol.cpp | 18 ++++++-- .../en/floater_preferences_graphics_advanced.xml | 54 +++++++++++++++++----- 13 files changed, 155 insertions(+), 56 deletions(-) (limited to 'indra/newview/app_settings/settings.xml') diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 7757c9a13a..3165cb313b 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -138,7 +138,6 @@ U32 LLImageGL::sUniqueCount = 0; U32 LLImageGL::sBindCount = 0; S32 LLImageGL::sCount = 0; -bool LLImageGL::sGlobalUseAnisotropic = false; F32 LLImageGL::sLastFrameTime = 0.f; LLImageGL* LLImageGL::sDefaultGLTexture = NULL ; bool LLImageGL::sCompressTextures = false; diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 6b4492c09e..773b647d69 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -285,7 +285,6 @@ public: // Global memory statistics static U32 sBindCount; // Tracks number of texture binds for current frame static U32 sUniqueCount; // Tracks number of unique texture binds for current frame - static bool sGlobalUseAnisotropic; static LLImageGL* sDefaultGLTexture ; static bool sAutomatedTest; static bool sCompressTextures; //use GL texture compression diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 970a9f6975..0d7ebd4a25 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -71,6 +71,7 @@ S32 gGLViewport[4]; U32 LLRender::sUICalls = 0; U32 LLRender::sUIVerts = 0; U32 LLTexUnit::sWhiteTexture = 0; +F32 LLRender::sAnisotropicFilteringLevel = 0.f; bool LLRender::sGLCoreProfile = false; bool LLRender::sNsightDebugSupport = false; LLVector2 LLRender::sUIGLScaleFactor = LLVector2(1.f, 1.f); @@ -524,9 +525,11 @@ void LLTexUnit::setTextureFilteringOptionFast(LLTexUnit::eTextureFilterOptions o if (gGLManager.mHasAnisotropic) { - if (LLImageGL::sGlobalUseAnisotropic && option == TFO_ANISOTROPIC) + if (option == TFO_ANISOTROPIC && LLRender::sAnisotropicFilteringLevel > 1.f) { - glTexParameterf(sGLTextureType[tex_type], GL_TEXTURE_MAX_ANISOTROPY, gGLManager.mMaxAnisotropy); + F32 aniso_level = llclamp(LLRender::sAnisotropicFilteringLevel, 1.f, gGLManager.mMaxAnisotropy); + glTexParameterf(sGLTextureType[tex_type], GL_TEXTURE_MAX_ANISOTROPY, aniso_level); + } else { diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index bc1fb3ce40..4bfc5723ee 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -489,6 +489,7 @@ public: public: static U32 sUICalls; static U32 sUIVerts; + static F32 sAnisotropicFilteringLevel; static bool sGLCoreProfile; static bool sNsightDebugSupport; static LLVector2 sUIGLScaleFactor; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 94c7a97ccc..05e3e7aaa2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7241,7 +7241,7 @@ RenderAnisotropic Comment - Render textures using anisotropic filtering + [OBSOLETE] Render textures using anisotropic filtering Persist 1 Type @@ -7249,6 +7249,17 @@ Value 0 + RenderAnisotropicLevel + + Comment + Anisotropic filtering strength(0(Disable), 2x, 4x, 8x, 16x + Persist + 1 + Type + U32 + Value + 0 + RenderAppleUseMultGL Comment diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 1090dd8ffb..eca58938cf 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -1,4 +1,4 @@ -version 74 +version 75 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -27,7 +27,7 @@ version 74 // NOTE: All settings are set to the MIN of applied values, including 'all'! // list all -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 16 RenderAvatarLODFactor 1 1.0 RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 @@ -92,7 +92,7 @@ RenderReflectionProbeCount 1 256 // Low Graphics Settings // list Low -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderAvatarLODFactor 1 0 RenderAvatarPhysicsLODFactor 1 0 RenderAvatarMaxNonImpostors 1 3 @@ -135,7 +135,7 @@ RenderReflectionProbeCount 1 1 // Medium Low Graphics Settings // list LowMid -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 2 RenderAvatarLODFactor 1 0.5 RenderAvatarMaxComplexity 1 100000 RenderAvatarPhysicsLODFactor 1 0.75 @@ -178,7 +178,7 @@ RenderReflectionProbeCount 1 32 // Medium Graphics Settings (standard) // list Mid -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 2 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 200000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -220,7 +220,7 @@ RenderReflectionProbeCount 1 64 // Medium High Graphics Settings // list MidHigh -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 4 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 250000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -262,7 +262,7 @@ RenderReflectionProbeCount 1 64 // High Graphics Settings (SSAO + sun shadows) // list High -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 4 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 300000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -301,10 +301,10 @@ RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 128 // -// High Ultra Graphics Settings (deferred + SSAO + all shadows) +// High Ultra Graphics Settings (SSAO + all shadows) // list HighUltra -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 4 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 350000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -346,7 +346,7 @@ RenderReflectionProbeCount 1 256 // Ultra graphics (REALLY PURTY!) // list Ultra -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 8 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 RenderAvatarPhysicsLODFactor 1 1.0 @@ -399,11 +399,17 @@ RenderDisableVintageMode 1 0 list VRAMGT512 RenderCompressTextures 1 0 +// +// AF Missing or AF < 2 +// +list AnisotropicMissing +RenderAnisotropicLevel 0 0 + // // "Default" setups for safe, low, medium, high // list safe -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderAvatarMaxNonImpostors 1 16 RenderAvatarMaxComplexity 1 80000 RenderLocalLightCount 1 0 @@ -419,7 +425,7 @@ RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 0 0 list Intel -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderFSAAType 1 0 RenderFSAASamples 1 0 RenderGLContextCoreProfile 1 0 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index c53e828020..a160161ef1 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -1,4 +1,4 @@ -version 33 +version 34 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -27,7 +27,7 @@ version 33 // NOTE: All settings are set to the MIN of applied values, including 'all'! // list all -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 16 RenderAvatarLODFactor 1 1.0 RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 @@ -92,7 +92,7 @@ RenderReflectionProbeCount 1 256 // Low Graphics Settings // list Low -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderAvatarLODFactor 1 0 RenderAvatarPhysicsLODFactor 1 0 RenderAvatarMaxNonImpostors 1 3 @@ -135,7 +135,7 @@ RenderReflectionProbeCount 1 1 // Medium Low Graphics Settings // list LowMid -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderAvatarLODFactor 1 0.5 RenderAvatarMaxComplexity 1 100000 RenderAvatarPhysicsLODFactor 1 0.75 @@ -178,7 +178,7 @@ RenderReflectionProbeCount 1 32 // Medium Graphics Settings (standard) // list Mid -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 2 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 200000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -220,7 +220,7 @@ RenderReflectionProbeCount 1 64 // Medium High Graphics Settings // list MidHigh -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 2 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 250000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -262,7 +262,7 @@ RenderReflectionProbeCount 1 64 // High Graphics Settings (SSAO + sun shadows) // list High -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 4 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 300000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -301,10 +301,10 @@ RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 128 // -// High Ultra Graphics Settings (deferred + SSAO + all shadows) +// High Ultra Graphics Settings (SSAO + all shadows) // list HighUltra -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 4 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 350000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -346,7 +346,7 @@ RenderReflectionProbeCount 1 256 // Ultra graphics (REALLY PURTY!) // list Ultra -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 8 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 RenderAvatarPhysicsLODFactor 1 1.0 @@ -399,11 +399,17 @@ RenderDisableVintageMode 1 0 list VRAMGT512 RenderCompressTextures 1 0 +// +// AF Missing or AF < 2 +// +list AnisotropicMissing +RenderAnisotropicLevel 0 0 + // // "Default" setups for safe, low, medium, high // list safe -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderAvatarMaxNonImpostors 1 16 RenderAvatarMaxComplexity 1 80000 RenderLocalLightCount 1 0 @@ -419,7 +425,7 @@ RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 0 0 list Intel -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderFSAAType 1 0 RenderFSAASamples 1 0 RenderGLContextCoreProfile 1 0 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index c3e2dd0c41..b75df5e3f2 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 73 +version 74 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -27,7 +27,7 @@ version 73 // NOTE: All settings are set to the MIN of applied values, including 'all'! // list all -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 16 RenderAvatarLODFactor 1 1.0 RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 @@ -92,7 +92,7 @@ RenderReflectionProbeCount 1 256 // Low Graphics Settings // list Low -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderAvatarLODFactor 1 0 RenderAvatarPhysicsLODFactor 1 0 RenderAvatarMaxNonImpostors 1 3 @@ -135,7 +135,7 @@ RenderReflectionProbeCount 1 1 // Medium Low Graphics Settings // list LowMid -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderAvatarLODFactor 1 0.5 RenderAvatarMaxComplexity 1 100000 RenderAvatarPhysicsLODFactor 1 0.75 @@ -178,7 +178,7 @@ RenderReflectionProbeCount 1 32 // Medium Graphics Settings (standard) // list Mid -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 2 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 200000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -220,7 +220,7 @@ RenderReflectionProbeCount 1 64 // Medium High Graphics Settings // list MidHigh -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 2 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 250000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -262,7 +262,7 @@ RenderReflectionProbeCount 1 64 // High Graphics Settings (SSAO + sun shadows) // list High -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 2 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxComplexity 1 300000 RenderAvatarPhysicsLODFactor 1 1.0 @@ -304,7 +304,7 @@ RenderReflectionProbeCount 1 128 // High Ultra Graphics Settings (SSAO + all shadows) // list HighUltra -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 2 RenderAvatarLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 RenderAvatarMaxComplexity 1 350000 @@ -346,7 +346,7 @@ RenderReflectionProbeCount 1 256 // Ultra graphics (REALLY PURTY!) // list Ultra -RenderAnisotropic 1 1 +RenderAnisotropicLevel 1 4 RenderAvatarLODFactor 1 1.0 RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 @@ -400,11 +400,18 @@ RenderDisableVintageMode 1 0 list VRAMGT512 RenderCompressTextures 1 0 +// +// +// AF Missing or AF < 2 +// +list AnisotropicMissing +RenderAnisotropicLevel 0 0 + // // "Default" setups for safe, low, medium, high // list safe -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderAvatarMaxNonImpostors 1 16 RenderAvatarMaxComplexity 1 80000 RenderLocalLightCount 1 0 @@ -434,7 +441,7 @@ RenderGLMultiThreadedMedia 1 0 RenderAppleUseMultGL 1 0 list Intel -RenderAnisotropic 1 0 +RenderAnisotropicLevel 1 0 RenderFSAASamples 1 0 RenderGLMultiThreadedTextures 1 0 RenderGLMultiThreadedMedia 1 0 diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f2e1326e96..f3970ed1a8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -547,7 +547,7 @@ static void settings_to_globals() LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLContextCoreProfile"); #endif LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport"); - LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); + LLRender::sAnisotropicFilteringLevel = static_cast(gSavedSettings.getU32("RenderAnisotropicLevel")); LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); LLVOVolume::sLODFactor = llclamp(gSavedSettings.getF32("RenderVolumeLODFactor"), 0.01f, MAX_LOD_FACTOR); LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f; diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index ac19c08be8..e0a3cf04ec 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -260,7 +260,6 @@ bool LLFeatureManager::loadFeatureTables() // *TODO - if I or anyone else adds something else to the skipped list // make this data driven. Put it in the feature table and parse it // correctly - mSkippedFeatures.insert("RenderAnisotropic"); mSkippedFeatures.insert("RenderGamma"); mSkippedFeatures.insert("RenderVBOEnable"); mSkippedFeatures.insert("RenderFogRatio"); @@ -709,6 +708,10 @@ void LLFeatureManager::applyBaseMasks() { maskFeatures("VRAMLT2GB"); } + if (!gGLManager.mHasAnisotropic || 2.f > gGLManager.mMaxAnisotropy) + { + maskFeatures("AnisotropicMissing"); + } if (gGLManager.mGLVersion < 3.99f) { maskFeatures("GL3"); diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp index 85c027c84e..96c2e1e1e4 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp @@ -340,6 +340,12 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings() tonemapMix->setEnabled(is_not_vintage); exposureSlider->setEnabled(is_not_vintage); cas_slider->setEnabled(is_not_vintage); + + LLComboBox* ctrl_anisotropic = getChild("anisotropic_filter"); + if (!LLFeatureManager::instance().isFeatureAvailable("RenderAnisotropicLevel")) + { + ctrl_anisotropic->setEnabled(false); + } } void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() @@ -384,6 +390,20 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() getChildView("antialiasing restart")->setVisible(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred")); + LLComboBox* af_combo = getChild("anisotropic_filter"); + if (2.f > gGLManager.mMaxAnisotropy) { + af_combo->remove("2x"); + } + if (4.f > gGLManager.mMaxAnisotropy) { + af_combo->remove("4x"); + } + if (8.f > gGLManager.mMaxAnisotropy) { + af_combo->remove("8x"); + } + if (16.f > gGLManager.mMaxAnisotropy) { + af_combo->remove("16x"); + } + // now turn off any features that are unavailable disableUnavailableSettings(); } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 75cc76fee6..411eb3a47e 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -293,9 +293,14 @@ static bool handleLUTBufferChanged(const LLSD& newvalue) return true; } -static bool handleAnisotropicChanged(const LLSD& newvalue) +static bool handleAnisotropicFilteringChanged(const LLSD& newval) { - LLImageGL::sGlobalUseAnisotropic = newvalue.asBoolean(); + F32 val = static_cast(newval.asReal()); + if (val > gGLManager.mMaxAnisotropy) + { + val = llclamp(val, 0.f, gGLManager.mMaxAnisotropy); + } + LLRender::sAnisotropicFilteringLevel = val; LLImageGL::dirtyTexOptions(); return true; } @@ -317,6 +322,12 @@ static bool handleVSyncChanged(const LLSD& newvalue) return true; } +static bool validateAnisotropicFiltering(const LLSD& val) +{ + S32 filter_level = val.asInteger(); + return filter_level == 0 || filter_level == 2 || filter_level == 4 || filter_level == 8 || filter_level == 16; +} + static bool handleVolumeLODChanged(const LLSD& newvalue) { LLVOVolume::sLODFactor = llclamp((F32) newvalue.asReal(), 0.01f, MAX_LOD_FACTOR); @@ -832,7 +843,8 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderSpecularResX", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularResY", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularExponent", handleLUTBufferChanged); - setting_setup_signal_listener(gSavedSettings, "RenderAnisotropic", handleAnisotropicChanged); + setting_setup_signal_listener(gSavedSettings, "RenderAnisotropicLevel", handleAnisotropicFilteringChanged); + gSavedSettings.getControl("RenderAnisotropicLevel")->getValidateSignal()->connect(boost::bind(&validateAnisotropicFiltering, _2)); setting_setup_signal_listener(gSavedSettings, "RenderShadowResolutionScale", handleShadowsResized); setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleSetShaderChanged); diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index 2a18134491..3ba772e8d7 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -360,17 +360,6 @@ Hardware - - - + + Anisotropic Filtering: + + + + + + + + + Date: Tue, 28 Oct 2025 08:14:17 -0400 Subject: Fix cef scaling on linux hidpi displays Signed-off-by: Rye --- indra/llplugin/llpluginclassmedia.cpp | 4 ++-- indra/newview/app_settings/settings.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/app_settings/settings.xml') diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 68c8854a12..803574f9fa 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -34,7 +34,7 @@ #include "llcontrol.h" extern LLControlGroup gSavedSettings; -#if LL_DARWIN +#if LL_DARWIN || LL_LINUX extern bool gHiDPISupport; #endif @@ -372,7 +372,7 @@ void LLPluginClassMedia::setSizeInternal(void) mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight); } -#if LL_DARWIN +#if LL_DARWIN || LL_LINUX if (!gHiDPISupport) #endif { diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 05e3e7aaa2..875f4442a3 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7476,7 +7476,7 @@ RenderHiDPI Comment - Enable support for HiDPI displays, like Retina (macOS ONLY, requires restart) + Enable support for HiDPI displays, like Retina (macOS and Linux ONLY, requires restart) Persist 1 Type -- cgit v1.3 From b9727dd84124756adacfbce73b5a916a2c0dd891 Mon Sep 17 00:00:00 2001 From: Rye Date: Thu, 27 Nov 2025 07:52:56 -0500 Subject: Migrate sky/cloud rendering to fragment shader and introduce high precision post process option Signed-off-by: Rye --- indra/newview/app_settings/settings.xml | 13 +- .../shaders/class1/deferred/cloudsF.glsl | 137 ++++++++++++++++++--- .../shaders/class1/deferred/cloudsV.glsl | 126 +------------------ .../app_settings/shaders/class1/deferred/skyF.glsl | 118 ++++++++++++++++-- .../app_settings/shaders/class1/deferred/skyV.glsl | 123 ++---------------- indra/newview/featuretable.txt | 18 +-- indra/newview/featuretable_linux.txt | 18 +-- indra/newview/featuretable_mac.txt | 17 ++- .../llfloaterpreferencesgraphicsadvanced.cpp | 13 +- indra/newview/llviewercontrol.cpp | 12 +- indra/newview/llvowlsky.cpp | 7 +- indra/newview/pipeline.cpp | 15 +-- .../en/floater_preferences_graphics_advanced.xml | 24 ++-- 13 files changed, 303 insertions(+), 338 deletions(-) (limited to 'indra/newview/app_settings/settings.xml') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 37d1a6653b..674f459193 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10162,6 +10162,17 @@ Value 1 + RenderHighPrecisionPostProcess + + Comment + Use 16-bit floating point buffers for post process rendering + Persist + 1 + Type + Boolean + Value + 0 + ReplaySession Comment @@ -13895,7 +13906,7 @@ WLSkyDetail Comment - Controls vertex detail on the WindLight sky. Lower numbers will give better performance and uglier skies. + [OBSOLETE] Persist 1 Type diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl index 8c51b4a36b..f5200719ae 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl @@ -30,9 +30,13 @@ out vec4 frag_data[4]; // The fragment shader for the sky ///////////////////////////////////////////////////////////////////////// -in vec3 vary_CloudColorSun; -in vec3 vary_CloudColorAmbient; -in float vary_CloudDensity; +// In +in vec3 pos; + +in vec2 vary_texcoord0; +in vec2 vary_texcoord1; +in vec2 vary_texcoord2; +in vec2 vary_texcoord3; uniform sampler2D cloud_noise_texture; uniform sampler2D cloud_noise_texture_next; @@ -42,11 +46,26 @@ uniform vec3 cloud_pos_density2; uniform float cloud_scale; uniform float cloud_variance; -in vec2 vary_texcoord0; -in vec2 vary_texcoord1; -in vec2 vary_texcoord2; -in vec2 vary_texcoord3; -in float altitude_blend_factor; +uniform vec3 camPosLocal; + +uniform vec3 lightnorm; +uniform vec3 sunlight_color; +uniform vec3 moonlight_color; +uniform int sun_up_factor; +uniform vec3 ambient_color; +uniform vec3 blue_horizon; +uniform vec3 blue_density; +uniform float haze_horizon; +uniform float haze_density; + +uniform float cloud_shadow; +uniform float density_multiplier; +uniform float max_y; + +uniform vec3 glow; +uniform float sun_moon_glow_factor; + +uniform vec3 cloud_color; vec4 cloudNoise(vec2 uv) { @@ -58,21 +77,111 @@ vec4 cloudNoise(vec2 uv) void main() { + if (cloud_scale < 0.001) + { + discard; + } + // Set variables vec2 uv1 = vary_texcoord0.xy; vec2 uv2 = vary_texcoord1.xy; - - vec3 cloudColorSun = vary_CloudColorSun; - vec3 cloudColorAmbient = vary_CloudColorAmbient; - float cloudDensity = vary_CloudDensity; vec2 uv3 = vary_texcoord2.xy; vec2 uv4 = vary_texcoord3.xy; - if (cloud_scale < 0.001) + // Get relative position + vec3 rel_pos = pos.xyz - camPosLocal.xyz + vec3(0, 50, 0); + + float altitude_blend_factor = clamp((rel_pos.y + 512.0) / max_y, 0.0, 1.0); + + // Set altitude + if (rel_pos.y > 0) { - discard; + rel_pos *= (max_y / rel_pos.y); + } + if (rel_pos.y < 0) + { + altitude_blend_factor = 0; // SL-11589 Fix clouds drooping below horizon + rel_pos *= (-32000. / rel_pos.y); } + // Can normalize then + vec3 rel_pos_norm = normalize(rel_pos); + float rel_pos_len = length(rel_pos); + + // Initialize temp variables + vec3 sunlight = sunlight_color; + vec3 light_atten; + + // Sunlight attenuation effect (hue and brightness) due to atmosphere + // this is used later for sunlight modulation at various altitudes + light_atten = (blue_density + vec3(haze_density * 0.25)) * (density_multiplier * max_y); + + // Calculate relative weights + vec3 combined_haze = abs(blue_density) + vec3(abs(haze_density)); + vec3 blue_weight = blue_density / combined_haze; + vec3 haze_weight = haze_density / combined_haze; + + // Compute sunlight from rel_pos & lightnorm (for long rays like sky) + float off_axis = 1.0 / max(1e-6, max(0., rel_pos_norm.y) + lightnorm.y); + sunlight *= exp(-light_atten * off_axis); + + // Distance + float density_dist = rel_pos_len * density_multiplier; + + // Transparency (-> combined_haze) + // ATI Bugfix -- can't store combined_haze*density_dist in a variable because the ati + // compiler gets confused. + combined_haze = exp(-combined_haze * density_dist); + + // Compute haze glow + float haze_glow = 1.0 - dot(rel_pos_norm, lightnorm.xyz); + // haze_glow is 0 at the sun and increases away from sun + haze_glow = max(haze_glow, .001); + // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot) + haze_glow *= glow.x; + // Higher glow.x gives dimmer glow (because next step is 1 / "angle") + haze_glow = pow(haze_glow, glow.z); + // glow.z should be negative, so we're doing a sort of (1 / "angle") function + + haze_glow *= sun_moon_glow_factor; + + // Add "minimum anti-solar illumination" + // For sun, add to glow. For moon, remove glow entirely. SL-13768 + haze_glow = (sun_moon_glow_factor < 1.0) ? 0.0 : (haze_glow + 0.25); + + // Increase ambient when there are more clouds + vec3 tmpAmbient = ambient_color; + tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5; + + // Dim sunlight by cloud shadow percentage + sunlight *= (1. - cloud_shadow); + + // Haze color below cloud + vec3 additiveColorBelowCloud = + (blue_horizon * blue_weight * (sunlight + tmpAmbient) + (haze_horizon * haze_weight) * (sunlight * haze_glow + tmpAmbient)); + + // CLOUDS + sunlight = sunlight_color; + off_axis = 1.0 / max(1e-6, lightnorm.y * 2.); + sunlight *= exp(-light_atten * off_axis); + + // Cloud color out + vec3 cloudColorSun = (sunlight * haze_glow) * cloud_color; + vec3 cloudColorAmbient = tmpAmbient * cloud_color; + + // Attenuate cloud color by atmosphere + combined_haze = sqrt(combined_haze); // less atmos opacity (more transparency) below clouds + cloudColorSun *= combined_haze; + cloudColorAmbient *= combined_haze; + vec3 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - combined_haze); + + // Make a nice cloud density based on the cloud_shadow value that was passed in. + float cloudDensity = 2. * (cloud_shadow - 0.25); + + // Combine these to minimize register use + cloudColorAmbient += oHazeColorBelowCloud; + + // Cloud Fragment vec2 disturbance = vec2(cloudNoise(uv1 / 8.0f).x, cloudNoise((uv3 + uv1) / 16.0f).x) * cloud_variance * (1.0f - cloud_scale * 0.25f); vec2 disturbance2 = vec2(cloudNoise((uv1 + uv3) / 4.0f).x, cloudNoise((uv4 + uv2) / 8.0f).x) * cloud_variance * (1.0f - cloud_scale * 0.25f); diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl index c019b5606a..89fbe38af0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl @@ -1,5 +1,5 @@ /** - * @file WLCloudsV.glsl + * @file class1/deferred/cloudsV.glsl * * $LicenseInfo:firstyear=2005&license=viewerlgpl$ * Second Life Viewer Source Code @@ -33,38 +33,15 @@ in vec2 texcoord0; /////////////////////////////////////////////////////////////////////////////// // Output parameters -out vec3 vary_CloudColorSun; -out vec3 vary_CloudColorAmbient; -out float vary_CloudDensity; +out vec3 pos; out vec2 vary_texcoord0; out vec2 vary_texcoord1; out vec2 vary_texcoord2; out vec2 vary_texcoord3; -out float altitude_blend_factor; // Inputs -uniform vec3 camPosLocal; - uniform vec3 lightnorm; -uniform vec3 sunlight_color; -uniform vec3 moonlight_color; -uniform int sun_up_factor; -uniform vec3 ambient_color; -uniform vec3 blue_horizon; -uniform vec3 blue_density; -uniform float haze_horizon; -uniform float haze_density; - -uniform float cloud_shadow; -uniform float density_multiplier; -uniform float max_y; - -uniform vec3 glow; -uniform float sun_moon_glow_factor; - -uniform vec3 cloud_color; - uniform float cloud_scale; // NOTE: Keep these in sync! @@ -76,6 +53,7 @@ uniform float cloud_scale; void main() { // World / view / projection + pos = position.xyz; gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); // Texture coords @@ -92,102 +70,4 @@ void main() vary_texcoord2 = vary_texcoord0 * 16.; vary_texcoord3 = vary_texcoord1 * 16.; - - // Get relative position - vec3 rel_pos = position.xyz - camPosLocal.xyz + vec3(0, 50, 0); - - altitude_blend_factor = clamp((rel_pos.y + 512.0) / max_y, 0.0, 1.0); - - // Set altitude - if (rel_pos.y > 0) - { - rel_pos *= (max_y / rel_pos.y); - } - if (rel_pos.y < 0) - { - altitude_blend_factor = 0; // SL-11589 Fix clouds drooping below horizon - rel_pos *= (-32000. / rel_pos.y); - } - - // Can normalize then - vec3 rel_pos_norm = normalize(rel_pos); - float rel_pos_len = length(rel_pos); - - // Initialize temp variables - vec3 sunlight = sunlight_color; - vec3 light_atten; - - // Sunlight attenuation effect (hue and brightness) due to atmosphere - // this is used later for sunlight modulation at various altitudes - light_atten = (blue_density + vec3(haze_density * 0.25)) * (density_multiplier * max_y); - - // Calculate relative weights - vec3 combined_haze = abs(blue_density) + vec3(abs(haze_density)); - vec3 blue_weight = blue_density / combined_haze; - vec3 haze_weight = haze_density / combined_haze; - - // Compute sunlight from rel_pos & lightnorm (for long rays like sky) - float off_axis = 1.0 / max(1e-6, max(0., rel_pos_norm.y) + lightnorm.y); - sunlight *= exp(-light_atten * off_axis); - - // Distance - float density_dist = rel_pos_len * density_multiplier; - - // Transparency (-> combined_haze) - // ATI Bugfix -- can't store combined_haze*density_dist in a variable because the ati - // compiler gets confused. - combined_haze = exp(-combined_haze * density_dist); - - // Compute haze glow - float haze_glow = 1.0 - dot(rel_pos_norm, lightnorm.xyz); - // haze_glow is 0 at the sun and increases away from sun - haze_glow = max(haze_glow, .001); - // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot) - haze_glow *= glow.x; - // Higher glow.x gives dimmer glow (because next step is 1 / "angle") - haze_glow = pow(haze_glow, glow.z); - // glow.z should be negative, so we're doing a sort of (1 / "angle") function - - haze_glow *= sun_moon_glow_factor; - - // Add "minimum anti-solar illumination" - // For sun, add to glow. For moon, remove glow entirely. SL-13768 - haze_glow = (sun_moon_glow_factor < 1.0) ? 0.0 : (haze_glow + 0.25); - - // Increase ambient when there are more clouds - vec3 tmpAmbient = ambient_color; - tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5; - - // Dim sunlight by cloud shadow percentage - sunlight *= (1. - cloud_shadow); - - // Haze color below cloud - vec3 additiveColorBelowCloud = - (blue_horizon * blue_weight * (sunlight + tmpAmbient) + (haze_horizon * haze_weight) * (sunlight * haze_glow + tmpAmbient)); - - // CLOUDS - sunlight = sunlight_color; - off_axis = 1.0 / max(1e-6, lightnorm.y * 2.); - sunlight *= exp(-light_atten * off_axis); - - // Cloud color out - vary_CloudColorSun = (sunlight * haze_glow) * cloud_color; - vary_CloudColorAmbient = tmpAmbient * cloud_color; - - // Attenuate cloud color by atmosphere - combined_haze = sqrt(combined_haze); // less atmos opacity (more transparency) below clouds - vary_CloudColorSun *= combined_haze; - vary_CloudColorAmbient *= combined_haze; - vec3 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - combined_haze); - - // Make a nice cloud density based on the cloud_shadow value that was passed in. - vary_CloudDensity = 2. * (cloud_shadow - 0.25); - - // Combine these to minimize register use - vary_CloudColorAmbient += oHazeColorBelowCloud; - - // needs this to compile on mac - //vary_AtmosAttenuation = vec3(0.0,0.0,0.0); - - // END CLOUDS } diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl index 7639a5e6fc..b70d1db499 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl @@ -23,13 +23,14 @@ * $/LicenseInfo$ */ +// Outputs +out vec4 frag_data[4]; + // Inputs -in vec3 vary_HazeColor; -in float vary_LightNormPosDot; +in vec3 pos; #ifdef HAS_HDRI in vec4 vary_position; -in vec3 vary_rel_pos; uniform float sky_hdr_scale; uniform float hdri_split_screen; uniform mat3 env_mat; @@ -43,7 +44,27 @@ uniform float moisture_level; uniform float droplet_radius; uniform float ice_level; -out vec4 frag_data[4]; +uniform vec3 camPosLocal; + +uniform vec3 lightnorm; +uniform vec3 sunlight_color; +uniform vec3 moonlight_color; +uniform int sun_up_factor; +uniform vec3 ambient_color; +uniform vec3 blue_horizon; +uniform vec3 blue_density; +uniform float haze_horizon; +uniform float haze_density; + +uniform float cloud_shadow; +uniform float density_multiplier; +uniform float distance_multiplier; +uniform float max_y; + +uniform vec3 glow; +uniform float sun_moon_glow_factor; + +uniform int cube_snapshot; vec3 srgb_to_linear(vec3 c); vec3 linear_to_srgb(vec3 c); @@ -83,12 +104,25 @@ vec3 halo22(float d) void main() { + // Get relative position + vec3 rel_pos = pos.xyz - camPosLocal.xyz + vec3(0, 50, 0); + + // Adj position vector to clamp altitude + if (rel_pos.y > 0.) + { + rel_pos *= (max_y / rel_pos.y); + } + if (rel_pos.y < 0.) + { + rel_pos *= (-32000. / rel_pos.y); + } + vec3 color; #ifdef HAS_HDRI vec3 frag_coord = vary_position.xyz/vary_position.w; if (-frag_coord.x > ((1.0-hdri_split_screen)*2.0-1.0)) { - vec3 pos = normalize(vary_rel_pos); + vec3 pos = normalize(rel_pos); pos = env_mat * pos; vec2 texCoord = vec2(atan(pos.z, pos.x) + PI, acos(pos.y)) / vec2(2.0 * PI, PI); color = textureLod(environmentMap, texCoord.xy, 0).rgb * sky_hdr_scale; @@ -99,15 +133,75 @@ void main() else #endif { - // Potential Fill-rate optimization. Add cloud calculation - // back in and output alpha of 0 (so that alpha culling kills - // the fragment) if the sky wouldn't show up because the clouds - // are fully opaque. + // Normalized + vec3 rel_pos_norm = normalize(rel_pos); + float rel_pos_len = length(rel_pos); + + // Grab this value and pass to frag shader for rainbows + float rel_pos_lightnorm_dot = dot(rel_pos_norm, lightnorm.xyz); + + // Initialize temp variables + vec3 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color * 0.7; //magic 0.7 to match legacy color + + // Sunlight attenuation effect (hue and brightness) due to atmosphere + // this is used later for sunlight modulation at various altitudes + vec3 light_atten = (blue_density + vec3(haze_density * 0.25)) * (density_multiplier * max_y); + + // Calculate relative weights + vec3 combined_haze = max(abs(blue_density) + vec3(abs(haze_density)), vec3(1e-6)); + vec3 blue_weight = blue_density / combined_haze; + vec3 haze_weight = haze_density / combined_haze; + + // Compute sunlight from rel_pos & lightnorm (for long rays like sky) + float off_axis = 1.0 / max(1e-6, max(0., rel_pos_norm.y) + lightnorm.y); + sunlight *= exp(-light_atten * off_axis); + + // Distance + float density_dist = rel_pos_len * density_multiplier; + + // Transparency (-> combined_haze) + // ATI Bugfix -- can't store combined_haze*density_dist in a variable because the ati + // compiler gets confused. + combined_haze = exp(-combined_haze * density_dist); + + // Compute haze glow + float haze_glow = 1.0 - rel_pos_lightnorm_dot; + // haze_glow is 0 at the sun and increases away from sun + haze_glow = max(haze_glow, .001); + // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot) + haze_glow *= glow.x; + // Higher glow.x gives dimmer glow (because next step is 1 / "angle") + haze_glow = pow(haze_glow, glow.z); + // glow.z should be negative, so we're doing a sort of (1 / "angle") function + + // Add "minimum anti-solar illumination" + // For sun, add to glow. For moon, remove glow entirely. SL-13768 + haze_glow = (sun_moon_glow_factor < 1.0) ? 0.0 : (sun_moon_glow_factor * (haze_glow + 0.25)); + + // Haze color above cloud + color = (blue_horizon * blue_weight * (sunlight + ambient_color) + + (haze_horizon * haze_weight) * (sunlight * haze_glow + ambient_color)); + + // Final atmosphere additive + color *= (1. - combined_haze); + + // Increase ambient when there are more clouds + vec3 ambient = ambient_color + max(vec3(0), (1. - ambient_color)) * cloud_shadow * 0.5; + + // Dim sunlight by cloud shadow percentage + sunlight *= max(0.0, (1. - cloud_shadow)); + + // Haze color below cloud + vec3 add_below_cloud = (blue_horizon * blue_weight * (sunlight + ambient) + + (haze_horizon * haze_weight) * (sunlight * haze_glow + ambient)); + + // Attenuate cloud color by atmosphere + combined_haze = sqrt(combined_haze); // less atmos opacity (more transparency) below clouds - color = vary_HazeColor; + // At horizon, blend high altitude sky color towards the darker color below the clouds + color += (add_below_cloud - color) * (1. - sqrt(combined_haze)); - float rel_pos_lightnorm = vary_LightNormPosDot; - float optic_d = rel_pos_lightnorm; + float optic_d = rel_pos_lightnorm_dot; vec3 halo_22 = halo22(optic_d); color.rgb += rainbow(optic_d); color.rgb += halo_22; diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl index ea00d240df..836ad66098 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl @@ -1,5 +1,5 @@ /** - * @file WLSkyV.glsl + * @file class1/deferred/skyV.glsl * * $LicenseInfo:firstyear=2005&license=viewerlgpl$ * Second Life Viewer Source Code @@ -32,36 +32,13 @@ in vec3 position; /////////////////////////////////////////////////////////////////////////////// // Output parameters -out vec3 vary_HazeColor; -out float vary_LightNormPosDot; +out vec3 pos; #ifdef HAS_HDRI out vec4 vary_position; -out vec3 vary_rel_pos; #endif // Inputs -uniform vec3 camPosLocal; - -uniform vec3 lightnorm; -uniform vec3 sunlight_color; -uniform vec3 moonlight_color; -uniform int sun_up_factor; -uniform vec3 ambient_color; -uniform vec3 blue_horizon; -uniform vec3 blue_density; -uniform float haze_horizon; -uniform float haze_density; - -uniform float cloud_shadow; -uniform float density_multiplier; -uniform float distance_multiplier; -uniform float max_y; - -uniform vec3 glow; -uniform float sun_moon_glow_factor; - -uniform int cube_snapshot; // NOTE: Keep these in sync! // indra\newview\app_settings\shaders\class1\deferred\skyV.glsl @@ -70,97 +47,13 @@ uniform int cube_snapshot; void main() { // World / view / projection - vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0); - - gl_Position = pos; - - // Get relative position - vec3 rel_pos = position.xyz - camPosLocal.xyz + vec3(0, 50, 0); - -#ifdef HAS_HDRI - vary_rel_pos = rel_pos; - vary_position = pos; -#endif - - // Adj position vector to clamp altitude - if (rel_pos.y > 0.) - { - rel_pos *= (max_y / rel_pos.y); - } - if (rel_pos.y < 0.) - { - rel_pos *= (-32000. / rel_pos.y); - } - - // Normalized - vec3 rel_pos_norm = normalize(rel_pos); - float rel_pos_len = length(rel_pos); - - // Grab this value and pass to frag shader for rainbows - float rel_pos_lightnorm_dot = dot(rel_pos_norm, lightnorm.xyz); - vary_LightNormPosDot = rel_pos_lightnorm_dot; - - // Initialize temp variables - vec3 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color * 0.7; //magic 0.7 to match legacy color - - // Sunlight attenuation effect (hue and brightness) due to atmosphere - // this is used later for sunlight modulation at various altitudes - vec3 light_atten = (blue_density + vec3(haze_density * 0.25)) * (density_multiplier * max_y); - - // Calculate relative weights - vec3 combined_haze = max(abs(blue_density) + vec3(abs(haze_density)), vec3(1e-6)); - vec3 blue_weight = blue_density / combined_haze; - vec3 haze_weight = haze_density / combined_haze; - - // Compute sunlight from rel_pos & lightnorm (for long rays like sky) - float off_axis = 1.0 / max(1e-6, max(0., rel_pos_norm.y) + lightnorm.y); - sunlight *= exp(-light_atten * off_axis); - - // Distance - float density_dist = rel_pos_len * density_multiplier; - - // Transparency (-> combined_haze) - // ATI Bugfix -- can't store combined_haze*density_dist in a variable because the ati - // compiler gets confused. - combined_haze = exp(-combined_haze * density_dist); - - // Compute haze glow - float haze_glow = 1.0 - rel_pos_lightnorm_dot; - // haze_glow is 0 at the sun and increases away from sun - haze_glow = max(haze_glow, .001); - // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot) - haze_glow *= glow.x; - // Higher glow.x gives dimmer glow (because next step is 1 / "angle") - haze_glow = pow(haze_glow, glow.z); - // glow.z should be negative, so we're doing a sort of (1 / "angle") function - - // Add "minimum anti-solar illumination" - // For sun, add to glow. For moon, remove glow entirely. SL-13768 - haze_glow = (sun_moon_glow_factor < 1.0) ? 0.0 : (sun_moon_glow_factor * (haze_glow + 0.25)); - - // Haze color above cloud - vec3 color = (blue_horizon * blue_weight * (sunlight + ambient_color) - + (haze_horizon * haze_weight) * (sunlight * haze_glow + ambient_color)); - - // Final atmosphere additive - color *= (1. - combined_haze); - - // Increase ambient when there are more clouds - vec3 ambient = ambient_color + max(vec3(0), (1. - ambient_color)) * cloud_shadow * 0.5; - - // Dim sunlight by cloud shadow percentage - sunlight *= max(0.0, (1. - cloud_shadow)); - - // Haze color below cloud - vec3 add_below_cloud = (blue_horizon * blue_weight * (sunlight + ambient) - + (haze_horizon * haze_weight) * (sunlight * haze_glow + ambient)); + pos = position.xyz; - // Attenuate cloud color by atmosphere - combined_haze = sqrt(combined_haze); // less atmos opacity (more transparency) below clouds + vec4 transformed_pos = modelview_projection_matrix * vec4(position.xyz, 1.0); - // At horizon, blend high altitude sky color towards the darker color below the clouds - color += (add_below_cloud - color) * (1. - sqrt(combined_haze)); + gl_Position = transformed_pos; - // Haze color above cloud - vary_HazeColor = color; + #ifdef HAS_HDRI + vary_position = transformed_pos; + #endif } diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index eca58938cf..21cbf259df 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -1,4 +1,4 @@ -version 75 +version 76 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -56,7 +56,6 @@ RenderVolumeLODFactor 1 2.0 UseStartScreen 1 1 UseOcclusion 1 1 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderCompressTextures 1 1 @@ -87,6 +86,7 @@ RenderTonemapMix 1 1 RenderDisableVintageMode 1 1 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 256 +RenderHighPrecisionPostProcess 1 1 // // Low Graphics Settings @@ -113,7 +113,6 @@ RenderTreeLODFactor 1 0 RenderVolumeLODFactor 1 1.125 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 0 RenderFSAASamples 1 0 RenderScreenSpaceReflections 1 0 @@ -130,6 +129,7 @@ RenderTonemapMix 1 0.7 RenderDisableVintageMode 1 0 RenderMaxTextureResolution 1 512 RenderReflectionProbeCount 1 1 +RenderHighPrecisionPostProcess 1 0 // // Medium Low Graphics Settings @@ -156,7 +156,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.125 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 0 RenderFSAASamples 1 0 RenderScreenSpaceReflections 1 0 @@ -173,6 +172,7 @@ RenderTonemapMix 1 0.7 RenderDisableVintageMode 1 0 RenderMaxTextureResolution 1 1024 RenderReflectionProbeCount 1 32 +RenderHighPrecisionPostProcess 1 0 // // Medium Graphics Settings (standard) @@ -197,7 +197,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.25 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 1 RenderFSAASamples 1 1 RenderReflectionsEnabled 1 1 @@ -215,6 +214,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 64 +RenderHighPrecisionPostProcess 1 0 // // Medium High Graphics Settings @@ -239,7 +239,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.375 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 1 RenderFSAASamples 1 1 RenderReflectionsEnabled 1 1 @@ -257,6 +256,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 64 +RenderHighPrecisionPostProcess 1 0 // // High Graphics Settings (SSAO + sun shadows) @@ -281,7 +281,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.5 RenderDeferredSSAO 1 1 RenderShadowDetail 1 1 -WLSkyDetail 1 96 RenderFSAAType 1 2 RenderFSAASamples 1 2 RenderReflectionsEnabled 1 1 @@ -299,6 +298,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 128 +RenderHighPrecisionPostProcess 1 0 // // High Ultra Graphics Settings (SSAO + all shadows) @@ -323,7 +323,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.75 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 -WLSkyDetail 1 96 RenderFSAAType 1 2 RenderFSAASamples 1 2 RenderReflectionsEnabled 1 1 @@ -341,6 +340,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 256 +RenderHighPrecisionPostProcess 1 1 // // Ultra graphics (REALLY PURTY!) @@ -363,7 +363,6 @@ RenderTransparentWater 1 1 RenderTreeLODFactor 1 1.0 RenderVolumeLODFactor 1 2.0 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 128 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 RenderFSAAType 1 2 @@ -383,6 +382,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 256 +RenderHighPrecisionPostProcess 1 1 // // Class Unknown Hardware (unknown) diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index a160161ef1..5d2819169e 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -1,4 +1,4 @@ -version 34 +version 35 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -56,7 +56,6 @@ RenderVolumeLODFactor 1 2.0 UseStartScreen 1 1 UseOcclusion 1 1 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderCompressTextures 1 1 @@ -87,6 +86,7 @@ RenderTonemapMix 1 1 RenderDisableVintageMode 1 1 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 256 +RenderHighPrecisionPostProcess 1 1 // // Low Graphics Settings @@ -113,7 +113,6 @@ RenderTreeLODFactor 1 0 RenderVolumeLODFactor 1 1.125 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 0 RenderFSAASamples 1 0 RenderScreenSpaceReflections 1 0 @@ -130,6 +129,7 @@ RenderTonemapMix 1 0.7 RenderDisableVintageMode 1 0 RenderMaxTextureResolution 1 512 RenderReflectionProbeCount 1 1 +RenderHighPrecisionPostProcess 1 0 // // Medium Low Graphics Settings @@ -156,7 +156,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.125 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 0 RenderFSAASamples 1 0 RenderScreenSpaceReflections 1 0 @@ -173,6 +172,7 @@ RenderTonemapMix 1 0.7 RenderDisableVintageMode 1 0 RenderMaxTextureResolution 1 1024 RenderReflectionProbeCount 1 32 +RenderHighPrecisionPostProcess 1 0 // // Medium Graphics Settings (standard) @@ -197,7 +197,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.25 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 1 RenderFSAASamples 1 1 RenderReflectionsEnabled 1 1 @@ -215,6 +214,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 64 +RenderHighPrecisionPostProcess 1 0 // // Medium High Graphics Settings @@ -239,7 +239,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.375 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 1 RenderFSAASamples 1 1 RenderReflectionsEnabled 1 1 @@ -257,6 +256,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 64 +RenderHighPrecisionPostProcess 1 0 // // High Graphics Settings (SSAO + sun shadows) @@ -281,7 +281,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.5 RenderDeferredSSAO 1 1 RenderShadowDetail 1 1 -WLSkyDetail 1 96 RenderFSAAType 1 2 RenderFSAASamples 1 2 RenderReflectionsEnabled 1 1 @@ -299,6 +298,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 128 +RenderHighPrecisionPostProcess 1 0 // // High Ultra Graphics Settings (SSAO + all shadows) @@ -323,7 +323,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.75 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 -WLSkyDetail 1 96 RenderFSAAType 1 2 RenderFSAASamples 1 2 RenderReflectionsEnabled 1 1 @@ -341,6 +340,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 256 +RenderHighPrecisionPostProcess 1 1 // // Ultra graphics (REALLY PURTY!) @@ -363,7 +363,6 @@ RenderTransparentWater 1 1 RenderTreeLODFactor 1 1.0 RenderVolumeLODFactor 1 2.0 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 128 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 RenderFSAAType 1 2 @@ -383,6 +382,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 256 +RenderHighPrecisionPostProcess 1 1 // // Class Unknown Hardware (unknown) diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index b75df5e3f2..7bb4fb6dd0 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 74 +version 75 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -54,7 +54,6 @@ RenderVolumeLODFactor 1 2.0 UseStartScreen 1 1 UseOcclusion 1 1 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderCompressTextures 1 1 @@ -87,6 +86,7 @@ RenderDisableVintageMode 1 1 RenderDownScaleMethod 1 0 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 256 +RenderHighPrecisionPostProcess 1 1 // // Low Graphics Settings @@ -111,7 +111,6 @@ RenderTreeLODFactor 1 0 RenderVolumeLODFactor 1 1.125 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 0 RenderFSAASamples 1 0 RenderReflectionsEnabled 1 0 @@ -130,6 +129,7 @@ RenderTonemapMix 1 0.7 RenderDisableVintageMode 1 0 RenderMaxTextureResolution 1 512 RenderReflectionProbeCount 1 1 +RenderHighPrecisionPostProcess 1 0 // // Medium Low Graphics Settings @@ -154,7 +154,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.125 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 0 RenderFSAASamples 1 0 RenderReflectionsEnabled 1 1 @@ -173,6 +172,7 @@ RenderTonemapMix 1 0.7 RenderDisableVintageMode 1 0 RenderMaxTextureResolution 1 1024 RenderReflectionProbeCount 1 32 +RenderHighPrecisionPostProcess 1 0 // // Medium Graphics Settings (standard) @@ -197,7 +197,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.25 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 1 RenderFSAASamples 1 0 RenderReflectionsEnabled 1 1 @@ -215,6 +214,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 64 +RenderHighPrecisionPostProcess 1 0 // // Medium High Graphics Settings @@ -239,7 +239,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.375 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -WLSkyDetail 1 96 RenderFSAAType 1 1 RenderFSAASamples 1 1 RenderReflectionsEnabled 1 1 @@ -257,6 +256,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 64 +RenderHighPrecisionPostProcess 1 0 // // High Graphics Settings (SSAO + sun shadows) @@ -281,7 +281,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.5 RenderDeferredSSAO 1 1 RenderShadowDetail 1 1 -WLSkyDetail 1 96 RenderFSAAType 1 1 RenderFSAASamples 1 2 RenderReflectionsEnabled 1 1 @@ -299,6 +298,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 128 +RenderHighPrecisionPostProcess 1 0 // // High Ultra Graphics Settings (SSAO + all shadows) @@ -323,7 +323,6 @@ RenderTreeLODFactor 1 0.5 RenderVolumeLODFactor 1 1.75 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 -WLSkyDetail 1 96 RenderFSAAType 1 2 RenderFSAASamples 1 2 RenderReflectionsEnabled 1 1 @@ -341,6 +340,7 @@ RenderTonemapType 1 1 RenderTonemapMix 1 0.7 RenderMaxTextureResolution 1 2048 RenderReflectionProbeCount 1 256 +RenderHighPrecisionPostProcess 1 1 // // Ultra graphics (REALLY PURTY!) @@ -363,7 +363,6 @@ RenderTransparentWater 1 1 RenderTreeLODFactor 1 1.0 RenderVolumeLODFactor 1 2.0 WindLightUseAtmosShaders 1 1 -WLSkyDetail 1 128 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 RenderFSAAType 1 2 diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp index 96c2e1e1e4..8999a84c7e 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp @@ -158,7 +158,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refresh() updateSliderText(getChild("AvatarPhysicsDetail", true), getChild("AvatarPhysicsDetailText", true)); updateSliderText(getChild("TerrainMeshDetail", true), getChild("TerrainMeshDetailText", true)); updateSliderText(getChild("RenderPostProcess", true), getChild("PostProcessText", true)); - updateSliderText(getChild("SkyMeshDetail", true), getChild("SkyMeshDetailText", true)); + updateSliderText(getChild("GlowResolution", true), getChild("GlowResolutionText", true)); LLAvatarComplexityControls::setIndirectControls(); setMaxNonImpostorsText( gSavedSettings.getU32("RenderAvatarMaxNonImpostors"), @@ -277,16 +277,11 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings() LLTextBox* shadows_text = getChild("RenderShadowDetailText"); LLCheckBoxCtrl* ctrl_ssao = getChild("UseSSAO"); LLCheckBoxCtrl* ctrl_dof = getChild("UseDoF"); - LLSliderCtrl* sky = getChild("SkyMeshDetail"); - LLTextBox* sky_text = getChild("SkyMeshDetailText"); LLSliderCtrl* cas_slider = getChild("RenderSharpness"); // disabled windlight if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")) { - sky->setEnabled(false); - sky_text->setEnabled(false); - //deferred needs windlight, disable deferred ctrl_shadows->setEnabled(false); ctrl_shadows->setValue(0); @@ -350,12 +345,6 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings() void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() { - // WindLight - LLSliderCtrl* sky = getChild("SkyMeshDetail"); - LLTextBox* sky_text = getChild("SkyMeshDetailText"); - sky->setEnabled(true); - sky_text->setEnabled(true); - bool enabled = true; LLCheckBoxCtrl* ctrl_ssao = getChild("UseSSAO"); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index d7b43e1789..a8ed79a8cc 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -446,16 +446,6 @@ static bool handleUploadBakedTexOldChanged(const LLSD& newvalue) return true; } - -static bool handleWLSkyDetailChanged(const LLSD&) -{ - if (gSky.mVOWLSkyp.notNull()) - { - gSky.mVOWLSkyp->updateGeometry(gSky.mVOWLSkyp->mDrawable); - } - return true; -} - static bool handleRepartition(const LLSD&) { if (gPipeline.isInit()) @@ -840,6 +830,7 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderUIBuffer", handleWindowResized); setting_setup_signal_listener(gSavedSettings, "RenderDepthOfField", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderFSAAType", handleReleaseGLBufferChanged); + setting_setup_signal_listener(gSavedSettings, "RenderHighPrecisionPostProcess", handleReleaseGLBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularResX", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularResY", handleLUTBufferChanged); setting_setup_signal_listener(gSavedSettings, "RenderSpecularExponent", handleLUTBufferChanged); @@ -901,7 +892,6 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "MuteVoice", handleAudioVolumeChanged); setting_setup_signal_listener(gSavedSettings, "MuteAmbient", handleAudioVolumeChanged); setting_setup_signal_listener(gSavedSettings, "MuteUI", handleAudioVolumeChanged); - setting_setup_signal_listener(gSavedSettings, "WLSkyDetail", handleWLSkyDetailChanged); setting_setup_signal_listener(gSavedSettings, "JoystickAxis0", handleJoystickChanged); setting_setup_signal_listener(gSavedSettings, "JoystickAxis1", handleJoystickChanged); setting_setup_signal_listener(gSavedSettings, "JoystickAxis2", handleJoystickChanged); diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index b5ee42f36c..98d771f8da 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -36,17 +36,16 @@ #include "llenvironment.h" #include "llsettingssky.h" -constexpr U32 MIN_SKY_DETAIL = 8; -constexpr U32 MAX_SKY_DETAIL = 180; +constexpr U32 SKY_DETAIL = 18; // Any lower and there will be artifacts inline U32 LLVOWLSky::getNumStacks(void) { - return llmin(MAX_SKY_DETAIL, llmax(MIN_SKY_DETAIL, gSavedSettings.getU32("WLSkyDetail"))); + return SKY_DETAIL; } inline U32 LLVOWLSky::getNumSlices(void) { - return 2 * llmin(MAX_SKY_DETAIL, llmax(MIN_SKY_DETAIL, gSavedSettings.getU32("WLSkyDetail"))); + return 2 * SKY_DETAIL; } inline U32 LLVOWLSky::getStripsNumVerts(void) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 259ea0c84f..4316b850e3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -820,9 +820,8 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY) bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; - - static LLCachedControl has_hdr(gSavedSettings, "RenderHDREnabled", true); - bool hdr = gGLManager.mGLVersion > 4.05f && has_hdr(); + bool has_hdr = gSavedSettings.getBOOL("RenderHDREnabled"); + bool hdr = gGLManager.mGLVersion > 4.05f && has_hdr; if (mRT == &mMainRT) { // hacky -- allocate auxillary buffer @@ -888,6 +887,8 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) if (!gCubeSnapshot) // hack to not re-allocate various targets for cube snapshots { + U32 post_color_fmt = gSavedSettings.getBOOL("RenderHighPrecisionPostProcess") ? GL_RGBA16F : GL_RGBA; + if (RenderUIBuffer) { if (!mUIScreen.allocate(resX, resY, GL_RGBA)) @@ -898,10 +899,10 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) if (RenderFSAAType > 0) { - if (!mFXAAMap.allocate(resX, resY, GL_RGBA)) return false; + if (!mFXAAMap.allocate(resX, resY, post_color_fmt)) return false; if (RenderFSAAType == 2) { - if (!mSMAABlendBuffer.allocate(resX, resY, GL_RGBA, false)) return false; + if (!mSMAABlendBuffer.allocate(resX, resY, post_color_fmt, false)) return false; } } else @@ -922,8 +923,8 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) mSceneMap.release(); } - mPostPingMap.allocate(resX, resY, GL_RGBA); - mPostPongMap.allocate(resX, resY, GL_RGBA); + mPostPingMap.allocate(resX, resY, post_color_fmt); + mPostPongMap.allocate(resX, resY, post_color_fmt); // The water exclusion mask needs its own depth buffer so we can take care of the problem of multiple water planes. // Should we ever make water not just a plane, it also aids with that as well as the water planes will be rendered into the mask. diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index 3ba772e8d7..aff4111d35 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -76,19 +76,19 @@ height="16" increment="1" initial_value="8" - label="Post process quality:" + label="Glow quality:" label_width="185" layout="topleft" left="30" min_val="8" max_val="9" - name="RenderPostProcess" + name="GlowResolution" show_text="false" top_delta="16" width="300"> + parameter="GlowResolutionText" /> @@ -689,25 +689,25 @@ + parameter="PostProcessText" /> -- cgit v1.3