diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2024-02-23 15:27:29 -0800 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2024-02-23 15:27:29 -0800 |
commit | 0d38d1bbd659206454d261193857d6fbb91387fa (patch) | |
tree | 046acde9a0a7aca5970f24729df7702bf6450f19 /indra/newview/llviewerregion.cpp | |
parent | e68735ad3a6da635a447eb9ed1981e5c360fd2f2 (diff) | |
parent | 8415461d2dc21b0e7453860f41bfd955f6e194cd (diff) |
Merge remote-tracking branch 'origin/release/materials_featurette' into geenz/mirrors-optimization-pass-1
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index cea083e07d..d887a579e4 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1610,8 +1610,8 @@ void LLViewerRegion::idleUpdate(F32 max_update_time) mLastUpdate = LLViewerOctreeEntryData::getCurrentFrame(); - static bool pbr_terrain_enabled = gSavedSettings.get<bool>("RenderTerrainPBREnabled"); - static LLCachedControl<bool> pbr_terrain_experimental_normals(gSavedSettings, "RenderTerrainPBRNormalsEnabled", FALSE); + static LLCachedControl<bool> pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false); + static LLCachedControl<bool> pbr_terrain_experimental_normals(gSavedSettings, "RenderTerrainPBRNormalsEnabled", false); bool pbr_material = mImpl->mCompositionp && (mImpl->mCompositionp->getMaterialType() == LLTerrainMaterials::Type::PBR); bool pbr_land = pbr_material && pbr_terrain_enabled && pbr_terrain_experimental_normals; @@ -1925,8 +1925,8 @@ void LLViewerRegion::forceUpdate() { constexpr F32 max_update_time = 0.f; - static bool pbr_terrain_enabled = gSavedSettings.get<BOOL>("RenderTerrainPBREnabled"); - static LLCachedControl<BOOL> pbr_terrain_experimental_normals(gSavedSettings, "RenderTerrainPBRNormalsEnabled", FALSE); + static LLCachedControl<bool> pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false); + static LLCachedControl<bool> pbr_terrain_experimental_normals(gSavedSettings, "RenderTerrainPBRNormalsEnabled", false); bool pbr_material = mImpl->mCompositionp && (mImpl->mCompositionp->getMaterialType() == LLTerrainMaterials::Type::PBR); bool pbr_land = pbr_material && pbr_terrain_enabled && pbr_terrain_experimental_normals; @@ -2459,6 +2459,26 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) } gSavedSettings.setBOOL("RenderMirrors", mirrors_enabled); + + if (mSimulatorFeatures.has("PBRTerrainEnabled")) + { + bool enabled = mSimulatorFeatures["PBRTerrainEnabled"]; + gSavedSettings.setBOOL("RenderTerrainPBREnabled", enabled); + } + else + { + gSavedSettings.setBOOL("RenderTerrainPBREnabled", false); + } + + if (mSimulatorFeatures.has("PBRMaterialSwatchEnabled")) + { + bool enabled = mSimulatorFeatures["PBRMaterialSwatchEnabled"]; + gSavedSettings.setBOOL("UIPreviewMaterial", enabled); + } + else + { + gSavedSettings.setBOOL("UIPreviewMaterial", false); + } } //this is called when the parent is not cacheable. |