From 6a4fefca257ca8dd272559569694cf6288ef3846 Mon Sep 17 00:00:00 2001 From: Nicolas Gnyra Date: Tue, 12 Dec 2023 06:41:26 -0500 Subject: [PATCH] Don't swap shaders when multi-pass is enabled --- AssetBundleLoadingTools/Utilities/ShaderRepair.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AssetBundleLoadingTools/Utilities/ShaderRepair.cs b/AssetBundleLoadingTools/Utilities/ShaderRepair.cs index f8fb33e..2d8f5c3 100644 --- a/AssetBundleLoadingTools/Utilities/ShaderRepair.cs +++ b/AssetBundleLoadingTools/Utilities/ShaderRepair.cs @@ -65,7 +65,7 @@ private static void MainThreadCheck() private static async Task ReplaceShadersAsync(List materials, List shaderInfos) { - if (shaderInfos.All(x => x.IsSupported)) + if (Plugin.Config.EnableMultiPassRendering || shaderInfos.All(x => x.IsSupported)) { // TODO: explicit override for "force compiled" stuff // TODO: explicit override for BS uber only/standard only/etc @@ -92,7 +92,7 @@ private static async Task ReplaceShadersAsync(List ReplaceShadersAsync(List materials, List shaderInfos) { - if (shaderInfos.All(x => x.IsSupported)) + if (Plugin.Config.EnableMultiPassRendering || shaderInfos.All(x => x.IsSupported)) { // TODO: explicit override for "force compiled" stuff // TODO: explicit override for BS uber only/standard only/etc @@ -142,7 +142,7 @@ private static ShaderReplacementInfo ReplaceShaders(List materials, Li { material.shader = replacement.Shader; } - else if (!Plugin.Config.ShowUnsupportedShaders && !Plugin.Config.EnableMultiPassRendering) + else if (!Plugin.Config.ShowUnsupportedShaders) { material.shader = ShaderBundleLoader.Instance.InvalidShader; }