diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2024-02-07 09:05:25 -0800 |
---|---|---|
committer | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2024-02-07 09:11:26 -0800 |
commit | c583c666d2f463e9de43a571a62b74c3817e5038 (patch) | |
tree | fa6e69e68ef16455cdf4cf5c47178cdd31b3b953 | |
parent | 7a5b0f5acf0b8aee3e73af0eb15d8c6930b98243 (diff) |
secondlife/viewer#67: (debug) Add temporary setting to force-load PBR terrain
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llvlcomposition.cpp | 21 |
2 files changed, 32 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4413cf9269..e1fb82be32 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10844,6 +10844,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>RenderTerrainPBRForce</key> + <map> + <key>Comment</key> + <string>Force-load PBR terrain if enabled</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>RenderTerrainPBRDetail</key> <map> <key>Comment</key> diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index f645023217..7c16ee4f61 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -142,6 +142,27 @@ BOOL LLTerrainMaterials::texturesReady(BOOL boost) BOOL LLTerrainMaterials::materialsReady(BOOL boost) { +#if 1 + static bool sRenderTerrainPBREnabled = gSavedSettings.get<bool>("RenderTerrainPBREnabled"); + static LLCachedControl<bool> sRenderTerrainPBRForce(gSavedSettings, "RenderTerrainPBRForce", false); + if (sRenderTerrainPBREnabled && sRenderTerrainPBRForce) + { + bool defined = true; + for (S32 i = 0; i < ASSET_COUNT; i++) + { + if (!mDetailMaterials[i]) + { + defined = false; + break; + } + } + if (defined) + { + return TRUE; + } + } +#endif + BOOL ready = TRUE; for (S32 i = 0; i < ASSET_COUNT; i++) { |