From 74e3d4664144c669da9231909dc91dbe4f1095c0 Mon Sep 17 00:00:00 2001 From: Juan Molteni Date: Wed, 4 Jun 2025 13:31:50 -0300 Subject: [PATCH 1/6] Set scene shader to LOD_1 --- Explorer/Assets/DCL/LOD/Systems/LODUtils.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs b/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs index cfa35fb9892..753c22590b6 100644 --- a/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs +++ b/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs @@ -18,6 +18,7 @@ namespace DCL.LOD.Systems public static class LODUtils { public static readonly URLSubdirectory LOD_EMBEDDED_SUBDIRECTORIES = URLSubdirectory.FromString("lods"); + private static readonly Shader sceneShader = Shader.Find("DCL/Scene"); public static IReadOnlyList LODManifests(IDecentralandUrlsSource decentralandUrlsSource) => Enumerable @@ -40,6 +41,7 @@ public static IReadOnlyList LODManifests(IDecentraland { for (int i = 0; i < pooledList.Value.Count; i++) { + pooledList.Value[i].SafeGetMaterials(TEMP_MATERIALS); for (int j = 0; j < TEMP_MATERIALS.Count; j++) @@ -60,8 +62,10 @@ public static IReadOnlyList LODManifests(IDecentraland continue; } - newSlots.AddRange(lodTextureArrayContainer.SetTexturesFromOriginalMaterial(pooledList.Value[i].materials[j], pooledList.Value[i].materials[j])); - TEMP_MATERIALS[j].mainTexture = null; + TEMP_MATERIALS[j].shader = sceneShader; + + //newSlots.AddRange(lodTextureArrayContainer.SetTexturesFromOriginalMaterial(pooledList.Value[i].materials[j], pooledList.Value[i].materials[j])); + //TEMP_MATERIALS[j].mainTexture = null; } } } From ec81fc76a55371debaecf7c6f0f1e399a3a68c2e Mon Sep 17 00:00:00 2001 From: Juan Molteni Date: Thu, 5 Jun 2025 07:56:12 -0300 Subject: [PATCH 2/6] Dont show LOD_1 at all --- Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs b/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs index cded67cad96..5d534ef90b7 100644 --- a/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs +++ b/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs @@ -59,7 +59,8 @@ private void UpdateLODLevel(ref SceneLODInfo sceneLODInfo, ref PartitionComponen // to height and dither the transition. lodForAcquisition = GetLODLevelForPartition(ref partitionComponent, ref sceneLODInfo); } - if (!sceneLODInfo.HasLOD(lodForAcquisition)) + + if (!sceneLODInfo.HasLOD(lodForAcquisition) && lodForAcquisition == 0) StartLODPromise(ref sceneLODInfo, ref partitionComponent, sceneDefinitionComponent, lodForAcquisition); } } From ddfdee468038bbc3a253db2886e9debb88f7a799 Mon Sep 17 00:00:00 2001 From: Juan Molteni Date: Fri, 6 Jun 2025 15:49:12 -0300 Subject: [PATCH 3/6] Rebuil scene_texarray --- Explorer/Assets/DCL/LOD/Systems/LODUtils.cs | 7 ++----- .../Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs | 2 +- .../AssetBundles/lods/dcl/scene_texarray_ignore_mac | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs b/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs index 753c22590b6..35308de8ab8 100644 --- a/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs +++ b/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs @@ -18,7 +18,6 @@ namespace DCL.LOD.Systems public static class LODUtils { public static readonly URLSubdirectory LOD_EMBEDDED_SUBDIRECTORIES = URLSubdirectory.FromString("lods"); - private static readonly Shader sceneShader = Shader.Find("DCL/Scene"); public static IReadOnlyList LODManifests(IDecentralandUrlsSource decentralandUrlsSource) => Enumerable @@ -62,10 +61,8 @@ public static IReadOnlyList LODManifests(IDecentraland continue; } - TEMP_MATERIALS[j].shader = sceneShader; - - //newSlots.AddRange(lodTextureArrayContainer.SetTexturesFromOriginalMaterial(pooledList.Value[i].materials[j], pooledList.Value[i].materials[j])); - //TEMP_MATERIALS[j].mainTexture = null; + newSlots.AddRange(lodTextureArrayContainer.SetTexturesFromOriginalMaterial(pooledList.Value[i].materials[j], pooledList.Value[i].materials[j])); + TEMP_MATERIALS[j].mainTexture = null; } } } diff --git a/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs b/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs index 5d534ef90b7..c2676b17dba 100644 --- a/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs +++ b/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs @@ -60,7 +60,7 @@ private void UpdateLODLevel(ref SceneLODInfo sceneLODInfo, ref PartitionComponen lodForAcquisition = GetLODLevelForPartition(ref partitionComponent, ref sceneLODInfo); } - if (!sceneLODInfo.HasLOD(lodForAcquisition) && lodForAcquisition == 0) + if (!sceneLODInfo.HasLOD(lodForAcquisition)) StartLODPromise(ref sceneLODInfo, ref partitionComponent, sceneDefinitionComponent, lodForAcquisition); } } diff --git a/Explorer/Assets/StreamingAssets/AssetBundles/lods/dcl/scene_texarray_ignore_mac b/Explorer/Assets/StreamingAssets/AssetBundles/lods/dcl/scene_texarray_ignore_mac index a570cbba30b..927a9ed3c17 100644 --- a/Explorer/Assets/StreamingAssets/AssetBundles/lods/dcl/scene_texarray_ignore_mac +++ b/Explorer/Assets/StreamingAssets/AssetBundles/lods/dcl/scene_texarray_ignore_mac @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:66ccd7230259ceec9ab6a59955d2f4ea27d01ce2ab4a6c7d198339f6084993f8 -size 8954912 +oid sha256:67a02595274fefaa2576d4c943fbf873936f40c75bb2ca6c83aa1ec708684df5 +size 683824 From ce302deb225846f89c9a82a4c3fb91e86051d0aa Mon Sep 17 00:00:00 2001 From: Juan Molteni Date: Fri, 6 Jun 2025 15:51:12 -0300 Subject: [PATCH 4/6] Cleanup --- Explorer/Assets/DCL/LOD/Systems/LODUtils.cs | 1 - Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs b/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs index 35308de8ab8..cfa35fb9892 100644 --- a/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs +++ b/Explorer/Assets/DCL/LOD/Systems/LODUtils.cs @@ -40,7 +40,6 @@ public static IReadOnlyList LODManifests(IDecentraland { for (int i = 0; i < pooledList.Value.Count; i++) { - pooledList.Value[i].SafeGetMaterials(TEMP_MATERIALS); for (int j = 0; j < TEMP_MATERIALS.Count; j++) diff --git a/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs b/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs index c2676b17dba..cded67cad96 100644 --- a/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs +++ b/Explorer/Assets/DCL/LOD/Systems/UpdateSceneLODInfoSystem.cs @@ -59,7 +59,6 @@ private void UpdateLODLevel(ref SceneLODInfo sceneLODInfo, ref PartitionComponen // to height and dither the transition. lodForAcquisition = GetLODLevelForPartition(ref partitionComponent, ref sceneLODInfo); } - if (!sceneLODInfo.HasLOD(lodForAcquisition)) StartLODPromise(ref sceneLODInfo, ref partitionComponent, sceneDefinitionComponent, lodForAcquisition); } From 1e5cc835da9db458ab1c3da97dbad4d18e68d186 Mon Sep 17 00:00:00 2001 From: Juan Molteni Date: Fri, 6 Jun 2025 16:07:00 -0300 Subject: [PATCH 5/6] Removed texarray variants from the graphics settings. This are on the AB, no need to rebuild them --- Explorer/ProjectSettings/GraphicsSettings.asset | 1 - 1 file changed, 1 deletion(-) diff --git a/Explorer/ProjectSettings/GraphicsSettings.asset b/Explorer/ProjectSettings/GraphicsSettings.asset index 88fdd387f78..a67068e9d54 100644 --- a/Explorer/ProjectSettings/GraphicsSettings.asset +++ b/Explorer/ProjectSettings/GraphicsSettings.asset @@ -43,7 +43,6 @@ GraphicsSettings: m_PreloadedShaders: - {fileID: 20000000, guid: 29ff2a68595df104ab86d7589e04b702, type: 2} - {fileID: 20000000, guid: 5108e1fd8995a4642b1032eb189390ae, type: 2} - - {fileID: 20000000, guid: 208c657bf63862c449775069ddb6a9d4, type: 2} - {fileID: 20000000, guid: f574592a55beb414bbd9aaaa5e43cbc8, type: 2} m_PreloadShadersBatchTimeLimit: -1 m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} From bd6ccae3f4fa27ac2f5b7f15536a7556dbca2e73 Mon Sep 17 00:00:00 2001 From: Juan Molteni Date: Sat, 7 Jun 2025 18:05:11 -0300 Subject: [PATCH 6/6] Update the shared dependecies --- Explorer/Packages/packages-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Explorer/Packages/packages-lock.json b/Explorer/Packages/packages-lock.json index ce89562b0bb..f2211560493 100644 --- a/Explorer/Packages/packages-lock.json +++ b/Explorer/Packages/packages-lock.json @@ -82,7 +82,7 @@ "depth": 0, "source": "git", "dependencies": {}, - "hash": "e4cb3c41a94ba810f35e743bfdabbbaaa8fd8ab2" + "hash": "f7afcfe62d08863b017a747f94d02a98f4b612a2" }, "com.gurbu.gpui-pro": { "version": "git@github.com:decentraland/unity-explorer-packages.git?path=/GPUInstancerPro/com.gurbu.gpui-pro",