Skip to content

Commit

Permalink
#2490: Fix PBR terrain texture transform feature flag handled by view…
Browse files Browse the repository at this point in the history
…er in unpredictable manner
  • Loading branch information
cosmic-linden committed Sep 4, 2024
1 parent ceed015 commit 0f166a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion indra/newview/app_settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9391,7 +9391,7 @@
<key>Comment</key>
<string>EXPERIMENTAL: Enable PBR Terrain texture transforms.</string>
<key>Persist</key>
<integer>1</integer>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
Expand Down
8 changes: 4 additions & 4 deletions indra/newview/llfloaterregioninfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ bool LLFloaterRegionInfo::postBuild()
mInfoPanels.push_back(panel);
static LLCachedControl<bool> feature_pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false);
static LLCachedControl<bool> 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");
}
Expand Down Expand Up @@ -1694,7 +1694,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
static LLCachedControl<bool> 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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -1938,7 +1938,7 @@ bool LLPanelRegionTerrainInfo::sendUpdate()
// POST to ModifyRegion endpoint, if enabled

static LLCachedControl<bool> 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)
Expand Down

0 comments on commit 0f166a1

Please sign in to comment.