summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2024-03-20 13:36:20 -0700
committerCosmic Linden <cosmic@lindenlab.com>2024-03-20 13:36:20 -0700
commit294eaa3c57d97c74074330e1c4ac4d2903619757 (patch)
tree3b2ea81b776224b1b693803ffd62aaabe32ceebc /indra
parentd21813786ae51ba62b906e648908f7feaf6bcb32 (diff)
secondlife/viewer-issues#83: Add TODO/assert for deciding when to allow candidate future extensions on PBR terrain
Diffstat (limited to 'indra')
-rw-r--r--indra/llprimitive/llgltfmaterial.h11
-rw-r--r--indra/newview/llfloaterregioninfo.cpp14
2 files changed, 25 insertions, 0 deletions
diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h
index 02f62fb08c..d14ae6970b 100644
--- a/indra/llprimitive/llgltfmaterial.h
+++ b/indra/llprimitive/llgltfmaterial.h
@@ -129,6 +129,17 @@ public:
bool mOverrideDoubleSided = false;
bool mOverrideAlphaMode = false;
+ // *TODO: If/when we implement additional GLTF extensions, they may not be
+ // compatible with our GLTF terrain implementation. We may want to disallow
+ // materials with some features from being set on terrain, if their
+ // implementation on terrain is not compliant with the spec:
+ // - KHR_materials_transmission: Probably OK?
+ // - KHR_materials_ior: Probably OK?
+ // - KHR_materials_volume: Likely incompatible, as our terrain
+ // heightmaps cannot currently be described as finite enclosed
+ // volumes.
+ // See also LLPanelRegionTerrainInfo::validateMaterials
+
// get a UUID based on a hash of this LLGLTFMaterial
LLUUID getHash() const;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index aaae43bdc9..98656d6a58 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -1405,6 +1405,20 @@ bool LLPanelRegionTerrainInfo::validateMaterials()
if (is_texture_selected) { return true; }
}
+ // *TODO: If/when we implement additional GLTF extensions, they may not be
+ // compatible with our GLTF terrain implementation. We may want to disallow
+ // materials with some features from being set on terrain, if their
+ // implementation on terrain is not compliant with the spec:
+ // - KHR_materials_transmission: Probably OK?
+ // - KHR_materials_ior: Probably OK?
+ // - KHR_materials_volume: Likely incompatible, as our terrain
+ // heightmaps cannot currently be described as finite enclosed
+ // volumes.
+ // See also LLGLTFMaterial
+#ifdef LL_WINDOWS
+ llassert(sizeof(LLGLTFMaterial) == 232);
+#endif
+
bool valid = true;
for (S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
{