bool checkSpecUsage(Material mat, string label) {
if ((label.IndexOf("layer Spec+Gloss")<0) && (label.IndexOf("gloss mask")<0) && (label.IndexOf("Spec (RGB)")<0)) return true;
if (!mat.HasProperty("_DirectSpec")) return true;
if (!mat.HasProperty("_IBLSpec")) return true;
if (mat.GetFloat("_DirectSpec")==0 && mat.GetFloat("_IBLSpec")==0) return false;
return true;
}