only preserve render queue and override tag if it differs from the shader's one (so we dont fuck up dummy shaders, which dont have those things set)

This commit is contained in:
JohnCorby 2022-12-02 13:44:37 -08:00
parent d40eff9dcf
commit bd6aca5c88

View File

@ -29,6 +29,8 @@ public static class ShaderReplacer
// preserve override tag and render queue (for Standard shader) // preserve override tag and render queue (for Standard shader)
// keywords and properties are already preserved // keywords and properties are already preserved
if (material.renderQueue != material.shader.renderQueue)
{
var renderType = material.GetTag("RenderType", false); var renderType = material.GetTag("RenderType", false);
var renderQueue = material.renderQueue; var renderQueue = material.renderQueue;
material.shader = replacementShader; material.shader = replacementShader;
@ -37,4 +39,5 @@ public static class ShaderReplacer
} }
} }
} }
}
} }