From edfa3276cf9bf4731b4e4aac2638d73f1cc6256e Mon Sep 17 00:00:00 2001 From: 4sval Date: Tue, 25 Oct 2022 22:13:59 +0200 Subject: [PATCH] submodule --- .gitmodules | 3 +++ CUE4Parse | 2 +- FModel/Views/Snooper/Renderer.cs | 14 +++++++------- FModel/Views/Snooper/Snooper.cs | 2 ++ 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2221fc41..959570f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "CUE4Parse"] path = CUE4Parse url = https://github.com/FabianFG/CUE4Parse +[submodule "EpicManifestParser"] + path = EpicManifestParser + url = https://github.com/FModel/EpicManifestParser \ No newline at end of file diff --git a/CUE4Parse b/CUE4Parse index 842f6d4b..2eb7988f 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 842f6d4b37b4ecf54d51dd93dcc19f154e33e438 +Subproject commit 2eb7988f9e80c15f6828dca37ced41ccccebdc84 diff --git a/FModel/Views/Snooper/Renderer.cs b/FModel/Views/Snooper/Renderer.cs index 440e4fd5..b23feb89 100644 --- a/FModel/Views/Snooper/Renderer.cs +++ b/FModel/Views/Snooper/Renderer.cs @@ -75,10 +75,10 @@ public class Renderer : IDisposable _shader.SetUniform("uProjection", projMatrix); _shader.SetUniform("viewPos", cam.Position); - _shader.SetUniform("material.diffuseMap", 0); - _shader.SetUniform("material.normalMap", 1); - _shader.SetUniform("material.specularMap", 2); - _shader.SetUniform("material.emissionMap", 3); + // _shader.SetUniform("material.diffuseMap", 0); + // _shader.SetUniform("material.normalMap", 1); + // _shader.SetUniform("material.specularMap", 2); + // _shader.SetUniform("material.emissionMap", 3); _shader.SetUniform("light.position", cam.Position); _shader.SetUniform("light.diffuse", _diffuseLight); @@ -186,13 +186,13 @@ public class Renderer : IDisposable if (textureDataIdx.TryGetValue(out FPackageIndex diffuse, "Diffuse") && diffuse.Load() is UTexture2D diffuseTexture) - model.Sections[j].Material.Parameters.Textures["Diffuse"] = diffuseTexture; + model.Sections[j].Material.Parameters.Textures[CMaterialParams2.Diffuse[j]] = diffuseTexture; if (textureDataIdx.TryGetValue(out FPackageIndex normal, "Normal") && normal.Load() is UTexture2D normalTexture) - model.Sections[j].Material.Parameters.Textures["Normals"] = normalTexture; + model.Sections[j].Material.Parameters.Textures[CMaterialParams2.Normals[j]] = normalTexture; if (textureDataIdx.TryGetValue(out FPackageIndex specular, "Specular") && specular.Load() is UTexture2D specularTexture) - model.Sections[j].Material.Parameters.Textures["SpecularMasks"] = specularTexture; + model.Sections[j].Material.Parameters.Textures[CMaterialParams2.SpecularMasks[j]] = specularTexture; } } if (staticMeshComp.TryGetValue(out FPackageIndex[] overrideMaterials, "OverrideMaterials")) diff --git a/FModel/Views/Snooper/Snooper.cs b/FModel/Views/Snooper/Snooper.cs index d7d0b149..b2eaebd2 100644 --- a/FModel/Views/Snooper/Snooper.cs +++ b/FModel/Views/Snooper/Snooper.cs @@ -49,6 +49,8 @@ public class Snooper : GameWindow { _renderer.Cache.DisposeModels(); _renderer.Cache.ClearModels(); + _renderer.Cache.DisposeTextures(); + _renderer.Cache.ClearTextures(); _renderer.Settings.Reset(); _previousSpeed = 0f; }