From e16859804561272fb257b73f4d7558a74045ca2b Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Tue, 3 Sep 2024 17:53:21 -0700 Subject: secondlife/viewer#2490: Fix PBR terrain texture transform feature flag handled by viewer in unpredictable manner --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfloaterregioninfo.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 56cd58d88e..0d194288e8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9402,7 +9402,7 @@ Comment EXPERIMENTAL: Enable PBR Terrain texture transforms. Persist - 1 + 0 Type Boolean Value diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 7869abf66d..7bece051fd 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -268,7 +268,7 @@ bool LLFloaterRegionInfo::postBuild() mInfoPanels.push_back(panel); static LLCachedControl feature_pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false); static LLCachedControl feature_pbr_terrain_transforms_enabled(gSavedSettings, "RenderTerrainPBRTransformsEnabled", false); - if (!feature_pbr_terrain_transforms_enabled || !feature_pbr_terrain_enabled) + if (!feature_pbr_terrain_transforms_enabled() || !feature_pbr_terrain_enabled()) { panel->buildFromFile("panel_region_terrain.xml"); } @@ -1694,7 +1694,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) static LLCachedControl feature_pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false); const bool textures_ready = compp->makeTexturesReady(false, false); - const bool materials_ready = feature_pbr_terrain_enabled && compp->makeMaterialsReady(false, false); + const bool materials_ready = feature_pbr_terrain_enabled() && compp->makeMaterialsReady(false, false); bool set_texture_swatches; bool set_material_swatches; @@ -1724,7 +1724,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) { material_type_to_ctrl(mMaterialTypeCtrl, material_type); updateForMaterialType(); - mMaterialTypeCtrl->setVisible(feature_pbr_terrain_enabled); + mMaterialTypeCtrl->setVisible(feature_pbr_terrain_enabled()); } if (set_texture_swatches) @@ -1938,7 +1938,7 @@ bool LLPanelRegionTerrainInfo::sendUpdate() // POST to ModifyRegion endpoint, if enabled static LLCachedControl feature_pbr_terrain_transforms_enabled(gSavedSettings, "RenderTerrainPBRTransformsEnabled", false); - if (material_type == LLTerrainMaterials::Type::PBR && feature_pbr_terrain_transforms_enabled) + if (material_type == LLTerrainMaterials::Type::PBR && feature_pbr_terrain_transforms_enabled()) { LLTerrainMaterials composition; for (S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i) -- cgit v1.2.3