From e569b1a55d7b1536aff4757321d0fed2b1bed67b Mon Sep 17 00:00:00 2001 From: Maurizio Farmi Date: Thu, 23 Apr 2026 17:31:29 +0200 Subject: [PATCH 1/5] Updated version to 1.1.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6459232..3454e68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.decentraland.unity-shared-dependencies", - "version": "1.1.7", + "version": "1.1.8", "displayName": "Decentraland.SharedDependencies", "description": "This package contains shared dependencies between unity-renderer, aang-renderer and asset-bundle-converter repositories, this includes gltf importer wrappers, shaders and wearable utils", "unity": "2021.3", From afce31a0feeffcabd91d6a737123daa364f47e1e Mon Sep 17 00:00:00 2001 From: Maurizio Farmi Date: Thu, 23 Apr 2026 17:48:27 +0200 Subject: [PATCH 2/5] Revert "Fixed imports" This reverts commit e7dc3286806e732f4388754ec17df23b81a8d89e. --- Runtime/GLTFastWrappers/DefaultMaterialGenerator.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Runtime/GLTFastWrappers/DefaultMaterialGenerator.cs b/Runtime/GLTFastWrappers/DefaultMaterialGenerator.cs index 2648cb3..0a12a09 100644 --- a/Runtime/GLTFastWrappers/DefaultMaterialGenerator.cs +++ b/Runtime/GLTFastWrappers/DefaultMaterialGenerator.cs @@ -1,9 +1,7 @@ using GLTFast; using GLTFast.Materials; -using GLTFast.Schema; using System; using UnityEngine; -using Material = UnityEngine.Material; namespace DCL.GLTFast.Wrappers { From e0b6c9cb0513556686b84db39151955c5b6c817e Mon Sep 17 00:00:00 2001 From: Maurizio Farmi Date: Thu, 23 Apr 2026 17:49:31 +0200 Subject: [PATCH 3/5] Revert "- Updated DecentralandMaterialGenerator.cs and DefaultMaterialGenerator.cs aligning method signatures to gltFast version 6.16.1" This reverts commit 5cc0942d --- .../DecentralandMaterialGenerator.cs | 34 ++++++++++--------- .../DefaultMaterialGenerator.cs | 16 +++++---- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/Runtime/GLTFastWrappers/DecentralandMaterialGenerator.cs b/Runtime/GLTFastWrappers/DecentralandMaterialGenerator.cs index 3ed8d0b..0ba7fee 100644 --- a/Runtime/GLTFastWrappers/DecentralandMaterialGenerator.cs +++ b/Runtime/GLTFastWrappers/DecentralandMaterialGenerator.cs @@ -35,15 +35,15 @@ public DecentralandMaterialGenerator(string shaderName, bool preserveMaxAlpha = /// /// /// - public override Material GenerateMaterial(MaterialBase gltfMaterial, IGltfReadable gltf, bool pointsSupport = false) + public override Material GenerateMaterial(int materialIndex, GLTFastMaterial gltfMaterial, IGltfReadable gltf, bool pointsSupport = false) { material = new Material(shader); - SetMaterialName(gltfMaterial); + SetMaterialName(materialIndex, gltfMaterial); - if (gltfMaterial.Extensions?.KHR_materials_pbrSpecularGlossiness != null) + if (gltfMaterial.extensions?.KHR_materials_pbrSpecularGlossiness != null) { - var specGloss = gltfMaterial.Extensions.KHR_materials_pbrSpecularGlossiness; + var specGloss = gltfMaterial.extensions.KHR_materials_pbrSpecularGlossiness; SetColor(specGloss.DiffuseColor.gamma); SetSpecularColor(specGloss.SpecularColor); @@ -56,21 +56,21 @@ public override Material GenerateMaterial(MaterialBase gltfMaterial, IGltfReadab // (according to extension specification) else { - PbrMetallicRoughnessBase roughness = gltfMaterial.PbrMetallicRoughness; + PbrMetallicRoughness roughness = gltfMaterial.pbrMetallicRoughness; if (roughness != null) { SetColor(roughness.BaseColor.gamma); - SetBaseMapTexture(roughness.BaseColorTexture, gltf); + SetBaseMapTexture(roughness.baseColorTexture, gltf); SetMetallic(roughness.metallicFactor); - SetMetallicRoughnessTexture(gltf, roughness.MetallicRoughnessTexture, roughness.roughnessFactor); + SetMetallicRoughnessTexture(gltf, roughness.metallicRoughnessTexture, roughness.roughnessFactor); } } - SetBumpMapTexture(gltfMaterial.NormalTexture, gltf); - SetOcclusionTexture(gltfMaterial.OcclusionTexture, gltf); + SetBumpMapTexture(gltfMaterial.normalTexture, gltf); + SetOcclusionTexture(gltfMaterial.occlusionTexture, gltf); SetEmissiveColor(gltfMaterial.Emissive); - SetEmissiveTexture(gltfMaterial.EmissiveTexture, gltf); + SetEmissiveTexture(gltfMaterial.emissiveTexture, gltf); SetAlphaMode(gltfMaterial.GetAlphaMode(), gltfMaterial.alphaCutoff); SetDoubleSided(gltfMaterial.doubleSided); @@ -79,7 +79,7 @@ public override Material GenerateMaterial(MaterialBase gltfMaterial, IGltfReadab } // This step is important if we want to keep the functionality of skin and hair colouring - private void SetMaterialName(MaterialBase gltfMaterial) + private void SetMaterialName(int materialIndex, GLTFastMaterial gltfMaterial) { material.name = "material"; @@ -93,6 +93,8 @@ private void SetMaterialName(MaterialBase gltfMaterial) if (originalName.Contains("hair")) material.name += "_hair"; } + + material.name += $"_{materialIndex}"; } private void SetEmissiveColor(Color gltfMaterialEmissive) @@ -105,7 +107,7 @@ private void SetEmissiveColor(Color gltfMaterialEmissive) } } - private void SetEmissiveTexture(TextureInfoBase emissiveTexture, IGltfReadable gltf) + private void SetEmissiveTexture(TextureInfo emissiveTexture, IGltfReadable gltf) { if (TrySetTexture( emissiveTexture, @@ -122,7 +124,7 @@ private void SetEmissiveTexture(TextureInfoBase emissiveTexture, IGltfReadable g } } - private void SetOcclusionTexture(OcclusionTextureInfoBase occlusionTexture, IGltfReadable gltf) + private void SetOcclusionTexture(OcclusionTextureInfo occlusionTexture, IGltfReadable gltf) { if (TrySetTexture( occlusionTexture, @@ -139,7 +141,7 @@ private void SetOcclusionTexture(OcclusionTextureInfoBase occlusionTexture, IGlt } } - private void SetBumpMapTexture(NormalTextureInfoBase textureInfo, IGltfReadable gltf) + private void SetBumpMapTexture(NormalTextureInfo textureInfo, IGltfReadable gltf) { if (TrySetTexture( textureInfo, @@ -157,7 +159,7 @@ private void SetBumpMapTexture(NormalTextureInfoBase textureInfo, IGltfReadable } } - private void SetMetallicRoughnessTexture(IGltfReadable gltf, TextureInfoBase textureInfo, float roughnessFactor) + private void SetMetallicRoughnessTexture(IGltfReadable gltf, TextureInfo textureInfo, float roughnessFactor) { if (TrySetTexture( textureInfo, @@ -202,7 +204,7 @@ private void SetSpecularMapTexture(TextureInfo textureInfo, IGltfReadable gltf) } } - private void SetBaseMapTexture(TextureInfoBase textureInfo, IGltfReadable gltf) + private void SetBaseMapTexture(TextureInfo textureInfo, IGltfReadable gltf) { TrySetTexture( textureInfo, diff --git a/Runtime/GLTFastWrappers/DefaultMaterialGenerator.cs b/Runtime/GLTFastWrappers/DefaultMaterialGenerator.cs index 0a12a09..80e95d2 100644 --- a/Runtime/GLTFastWrappers/DefaultMaterialGenerator.cs +++ b/Runtime/GLTFastWrappers/DefaultMaterialGenerator.cs @@ -13,26 +13,28 @@ internal class DefaultMaterialGenerator : ShaderGraphMaterialGenerator { private const float CUSTOM_EMISSIVE_FACTOR = 5f; - public override Material GenerateMaterial(MaterialBase gltfMaterial, IGltfReadable gltf, bool pointsSupport = false) + public override Material GenerateMaterial(int materialIndex, global::GLTFast.Schema.Material gltfMaterial, IGltfReadable gltf, bool pointsSupport = false) { - Material generatedMaterial = base.GenerateMaterial(gltfMaterial, gltf, pointsSupport); + Material generatedMaterial = base.GenerateMaterial(materialIndex, gltfMaterial, gltf); - SetMaterialName(generatedMaterial, gltfMaterial); + SetMaterialName(generatedMaterial, materialIndex, gltfMaterial); - if (gltfMaterial.Emissive != Color.black) { generatedMaterial.SetColor(MaterialProperty.EmissiveFactor, gltfMaterial.Emissive * CUSTOM_EMISSIVE_FACTOR); } + if (gltfMaterial.Emissive != Color.black) { generatedMaterial.SetColor(EmissiveFactorProperty, gltfMaterial.Emissive * CUSTOM_EMISSIVE_FACTOR); } return generatedMaterial; // This step is important if we want to keep the functionality of skin and hair colouring - void SetMaterialName(Material material, MaterialBase materialBase) + void SetMaterialName(Material material, int materialIndex, global::GLTFast.Schema.Material gltfMaterial) { material.name = "material"; - if (materialBase.name.Contains("skin", StringComparison.InvariantCultureIgnoreCase)) + if (gltfMaterial.name.Contains("skin", StringComparison.InvariantCultureIgnoreCase)) material.name += "_skin"; - if (materialBase.name.Contains("hair", StringComparison.InvariantCultureIgnoreCase)) + if (gltfMaterial.name.Contains("hair", StringComparison.InvariantCultureIgnoreCase)) material.name += "_hair"; + + material.name += $"_{materialIndex}"; } } } From 143b1b49c98a4ebe23fefdc09d034568bd773764 Mon Sep 17 00:00:00 2001 From: Maurizio Farmi Date: Thu, 23 Apr 2026 17:51:30 +0200 Subject: [PATCH 4/5] Updated changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53d622b..c7d78f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +#1.1.8 +- Reverted gltfast version to 5.0.0 + #1.1.7 - Updated gltfast to 6.16.1 From a2fea2f463972ca32760b3519da979358f0d0359 Mon Sep 17 00:00:00 2001 From: Maurizio Farmi Date: Thu, 23 Apr 2026 17:53:57 +0200 Subject: [PATCH 5/5] Fixed summary for GenerateMaterial --- Runtime/GLTFastWrappers/DecentralandMaterialGenerator.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Runtime/GLTFastWrappers/DecentralandMaterialGenerator.cs b/Runtime/GLTFastWrappers/DecentralandMaterialGenerator.cs index 0ba7fee..0a09564 100644 --- a/Runtime/GLTFastWrappers/DecentralandMaterialGenerator.cs +++ b/Runtime/GLTFastWrappers/DecentralandMaterialGenerator.cs @@ -32,9 +32,6 @@ public DecentralandMaterialGenerator(string shaderName, bool preserveMaxAlpha = /// /// Here we convert a GLTFMaterial into our Material using our shaders /// - /// - /// - /// public override Material GenerateMaterial(int materialIndex, GLTFastMaterial gltfMaterial, IGltfReadable gltf, bool pointsSupport = false) { material = new Material(shader);