From cc6175274c9520b61d7b87f124168e8a85e3bc48 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Fri, 15 Mar 2024 16:14:13 -0700 Subject: secondlife/viewer#906: Fix broken test plan link --- doc/testplans/pbr_terrain_composition.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/testplans/pbr_terrain_composition.md b/doc/testplans/pbr_terrain_composition.md index 8cc5560f64..05431ab4bf 100644 --- a/doc/testplans/pbr_terrain_composition.md +++ b/doc/testplans/pbr_terrain_composition.md @@ -58,4 +58,4 @@ Unlike a viewer without PBR terrain support, the new viewer will no longer treat Texture terrain with transparency will render as opaque. Parts of the texture that would be partially transparent will instead display as a mix of the color and black, depending on how transparent the texture is. -See [PBR Terrain Feature Gating](./pbr_terrain_feature_gating.md) for supported PBR terrain features. +See [PBR Terrain Appearance](./pbr_terrain_appearance.md) for supported PBR terrain features. -- cgit v1.2.3 From faa0f3696465a1e3ab80a277d0aad09c0775e450 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Fri, 15 Mar 2024 16:19:42 -0700 Subject: secondlife/viewer#1006: Don't send terrain update if validation fails --- indra/newview/llfloaterregioninfo.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 5de11d6699..084ff98851 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1633,21 +1633,6 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) BOOL LLPanelRegionTerrainInfo::sendUpdate() { LL_INFOS() << "LLPanelRegionTerrainInfo::sendUpdate" << LL_ENDL; - std::string buffer; - strings_t strings; - LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); - - // update the model - LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); - region_info.mWaterHeight = (F32) getChild("water_height_spin")->getValue().asReal(); - region_info.mTerrainRaiseLimit = (F32) getChild("terrain_raise_spin")->getValue().asReal(); - region_info.mTerrainLowerLimit = (F32) getChild("terrain_lower_spin")->getValue().asReal(); - - // and sync the region with it - region_info.sendRegionTerrain(invoice); - - // ======================================= - // Assemble and send texturedetail message // Make sure user hasn't chosen wacky textures. if (!validateTextureSizes()) @@ -1670,6 +1655,22 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() } } + std::string buffer; + strings_t strings; + LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); + + // update the model + LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); + region_info.mWaterHeight = (F32) getChild("water_height_spin")->getValue().asReal(); + region_info.mTerrainRaiseLimit = (F32) getChild("terrain_raise_spin")->getValue().asReal(); + region_info.mTerrainLowerLimit = (F32) getChild("terrain_lower_spin")->getValue().asReal(); + + // and sync the region with it + region_info.sendRegionTerrain(invoice); + + // ======================================= + // Assemble and send texturedetail message + std::string id_str; LLMessageSystem* msg = gMessageSystem; -- cgit v1.2.3 From 7ae7f9554d794abc62d6162043d41ea2aada9316 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Fri, 15 Mar 2024 16:43:20 -0700 Subject: secondlife/viewer#1006: Prevent PBR terrain material swatches from being null. Default to blank material for now. --- indra/newview/llfloaterregioninfo.cpp | 3 ++- indra/newview/skins/default/xui/en/panel_region_terrain.xml | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 084ff98851..8c4b6fc857 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -62,6 +62,7 @@ #include "llfloaterreg.h" #include "llfloaterregiondebugconsole.h" #include "llfloatertelehub.h" +#include "llgltfmateriallist.h" #include "llinventorymodel.h" #include "lllineeditor.h" #include "llnamelistctrl.h" @@ -1394,7 +1395,7 @@ LLPanelRegionTerrainInfo::LLPanelRegionTerrainInfo() } for (S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i) { - mLastSetMaterials[i] = LLUUID::null; + mLastSetMaterials[i] = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID; } } diff --git a/indra/newview/skins/default/xui/en/panel_region_terrain.xml b/indra/newview/skins/default/xui/en/panel_region_terrain.xml index 38d885d72d..4a2c0d42b9 100644 --- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml +++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml @@ -161,7 +161,7 @@ left="10" name="material_detail_0" pick_type="material" - allow_no_texture="true" + default_image_id="968cbad0-4dad-d64e-71b5-72bf13ad051a" top_delta="0" width="100" /> Date: Mon, 18 Mar 2024 13:26:41 -0700 Subject: secondlife/viewer#1006: Update test plan --- doc/testplans/pbr_terrain_composition.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/testplans/pbr_terrain_composition.md b/doc/testplans/pbr_terrain_composition.md index 05431ab4bf..0e721c064a 100644 --- a/doc/testplans/pbr_terrain_composition.md +++ b/doc/testplans/pbr_terrain_composition.md @@ -37,7 +37,7 @@ When toggling the "PBR Metallic Roughness" checkbox to the opposite value, which - The default textures/materials - For textures, this is the default terrain texture set - - For materials, this is blank/null, but this is subject to change + - For materials, this is all blank materials, but this is subject to change - The previously applied texture/material set - History is available on a best-effort basis only. In particular, the history does not persist on viewer restart. @@ -47,11 +47,15 @@ When toggling back the "PBR Metallic Roughness" checkbox to the original value, A user with appropriate permissions can change and save the textures or materials to the terrain. If the "PBR Metallic Roughness" checkbox is checked, the user applies materials, otherwise the user applies textures. +The user should not be allowed to set the texture or material swatches to null. + Saving may fail for the following reasons: -- A terrain or material texture is invalid or null +- A terrain or material texture is invalid - A terrain texture is greater than the max texture upload resolution +If saving the terrain fails for any reason, the terrain should not be updated. + Unlike a viewer without PBR terrain support, the new viewer will no longer treat textures with alpha channels as invalid. ## Graphics Features -- cgit v1.2.3