Skip to content

Commit

Permalink
Don't swap shaders when multi-pass is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoco007 committed Dec 12, 2023
1 parent 737cae8 commit 6a4fefc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AssetBundleLoadingTools/Utilities/ShaderRepair.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private static void MainThreadCheck()

private static async Task<ShaderReplacementInfo> ReplaceShadersAsync(List<Material> materials, List<CompiledShaderInfo> 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
Expand All @@ -92,7 +92,7 @@ private static async Task<ShaderReplacementInfo> ReplaceShadersAsync(List<Materi
{
material.shader = replacement.Shader;
}
else if (!Plugin.Config.ShowUnsupportedShaders && !Plugin.Config.EnableMultiPassRendering)
else if (!Plugin.Config.ShowUnsupportedShaders)
{
material.shader = ShaderBundleLoader.Instance.InvalidShader;
}
Expand All @@ -114,7 +114,7 @@ private static async Task<ShaderReplacementInfo> ReplaceShadersAsync(List<Materi

private static ShaderReplacementInfo ReplaceShaders(List<Material> materials, List<CompiledShaderInfo> 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
Expand Down Expand Up @@ -142,7 +142,7 @@ private static ShaderReplacementInfo ReplaceShaders(List<Material> materials, Li
{
material.shader = replacement.Shader;
}
else if (!Plugin.Config.ShowUnsupportedShaders && !Plugin.Config.EnableMultiPassRendering)
else if (!Plugin.Config.ShowUnsupportedShaders)
{
material.shader = ShaderBundleLoader.Instance.InvalidShader;
}
Expand Down

0 comments on commit 6a4fefc

Please sign in to comment.