public void Process(AssetImporter importer, TextWriter writer)
        {
            if (Path.GetExtension(importer.assetPath) != ".mat")
            {
                return;
            }

            var material = AssetDatabase.LoadAssetAtPath <Material>(importer.assetPath);

            if (!material)
            {
                Debug.LogError($"Load material fail : {importer.assetPath}");
                return;
            }
            var shader     = material.shader;
            var shaderPath = AssetDatabase.GetAssetPath(shader);

            if (shaderPath.StartsWith("Packages"))
            {
                writer.WriteLine($"Material : {importer.assetPath} using in packages shader : {shaderPath}");
            }

            var materialKeywords = material.shaderKeywords;

            if (ShaderPreprocessor.AddInUsedShaderKeywords(shader, materialKeywords) &&
                m_shaderToGlobalKeywords.TryGetValue(shader, out var localGlobal))
            {
                List <string> filteredKeywords = new List <string>(materialKeywords);
                for (int i = filteredKeywords.Count - 1; i >= 0; i--)
                {
                    if (Array.IndexOf(localGlobal.Item2, filteredKeywords[i]) == -1)
                    {
                        filteredKeywords.RemoveAt(i);
                    }
                }

                foreach (var keyword in localGlobal.Item1)
                {
                    string[] keywords = new string[filteredKeywords.Count + 1];
                    filteredKeywords.CopyTo(0, keywords, 0, filteredKeywords.Count);
                    keywords[filteredKeywords.Count] = keyword;
                    m_collection.Add(new ShaderVariantCollection.ShaderVariant(shader, PassType.ScriptableRenderPipeline, keywords));
                }
                m_collection.Add(new ShaderVariantCollection.ShaderVariant(shader, PassType.ScriptableRenderPipeline, filteredKeywords.ToArray()));
            }
        }
 public void Clear()
 {
     ShaderPreprocessor.Clear();
 }