From 294eaa3c57d97c74074330e1c4ac4d2903619757 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 20 Mar 2024 13:36:20 -0700 Subject: secondlife/viewer-issues#83: Add TODO/assert for deciding when to allow candidate future extensions on PBR terrain --- indra/llprimitive/llgltfmaterial.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/llprimitive/llgltfmaterial.h') 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; -- cgit v1.2.3 From 54816bdf81c05dfeb0f4fa35f4e222fdd8126057 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Wed, 8 May 2024 13:40:58 -0700 Subject: Fix for mirrors not functioning properly under water. (#1436) * #1165 Fix for clipping and culling for mirrors under water. --- indra/llprimitive/llgltfmaterial.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/llprimitive/llgltfmaterial.h') diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h index d14ae6970b..855cb58832 100644 --- a/indra/llprimitive/llgltfmaterial.h +++ b/indra/llprimitive/llgltfmaterial.h @@ -122,9 +122,10 @@ public: F32 mRoughnessFactor = 1.f; F32 mAlphaCutoff = 0.5f; - bool mDoubleSided = false; AlphaMode mAlphaMode = ALPHA_MODE_OPAQUE; + bool mDoubleSided = false; + // override specific flags for state that can't use off-by-epsilon or UUID hack bool mOverrideDoubleSided = false; bool mOverrideAlphaMode = false; @@ -139,6 +140,11 @@ public: // heightmaps cannot currently be described as finite enclosed // volumes. // See also LLPanelRegionTerrainInfo::validateMaterials + // These fields are local to viewer and are a part of local bitmap support + typedef std::map local_tex_map_t; + local_tex_map_t mTrackingIdToLocalTexture; + +public: // get a UUID based on a hash of this LLGLTFMaterial LLUUID getHash() const; @@ -240,10 +246,6 @@ public: virtual bool replaceLocalTexture(const LLUUID& tracking_id, const LLUUID &old_id, const LLUUID& new_id); virtual void updateTextureTracking(); - // These fields are local to viewer and are a part of local bitmap support - typedef std::map local_tex_map_t; - local_tex_map_t mTrackingIdToLocalTexture; - protected: static LLVector2 vec2FromJson(const std::map& object, const char* key, const LLVector2& default_value); static F32 floatFromJson(const std::map& object, const char* key, const F32 default_value); -- cgit v1.2.3