diff options
-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++) { |