|
|
|
|
|
|
|
|
|
|
public static GUIContent baseColorText = new GUIContent("Base Color + Blend", "Albedo (RGB) and Blend Factor (A)"); |
|
|
|
public static GUIContent normalMapText = new GUIContent("Normal Map", "Normal Map (BC7/BC5/DXT5(nm))"); |
|
|
|
public static GUIContent MSHMapText = new GUIContent("Metal Smoothness Height Map", "Metal(R) Smoothness(G) Height(B) "); |
|
|
|
public static GUIContent decalBlendText = new GUIContent("Decal Blend", "Combines with Base Color (A)"); |
|
|
|
public static GUIContent maskMapText = new GUIContent("Mask Map - M(R), AO(G), D(B), S(A)", "Mask map"); |
|
|
|
public static GUIContent decalBlendText = new GUIContent("Decal Blend", "Whole decal blend"); |
|
|
|
} |
|
|
|
|
|
|
|
protected MaterialProperty baseColorMap = new MaterialProperty(); |
|
|
|
|
|
|
protected const string kNormalMap = "_NormalMap"; |
|
|
|
|
|
|
|
protected MaterialProperty MSHMap = new MaterialProperty(); |
|
|
|
protected const string kMSHMap = "_MSHMap"; |
|
|
|
protected MaterialProperty maskMap = new MaterialProperty(); |
|
|
|
protected const string kMaskMap = "_MaskMap"; |
|
|
|
|
|
|
|
protected MaterialProperty decalBlend = new MaterialProperty(); |
|
|
|
protected const string kDecalBlend = "_DecalBlend"; |
|
|
|
|
|
|
{ |
|
|
|
baseColorMap = FindProperty(kBaseColorMap, props); |
|
|
|
normalMap = FindProperty(kNormalMap, props); |
|
|
|
MSHMap = FindProperty(kMSHMap, props); |
|
|
|
maskMap = FindProperty(kMaskMap, props); |
|
|
|
decalBlend = FindProperty(kDecalBlend, props); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
CoreUtils.SetKeyword(material, "_COLORMAP", material.GetTexture(kBaseColorMap)); |
|
|
|
CoreUtils.SetKeyword(material, "_NORMALMAP", material.GetTexture(kNormalMap)); |
|
|
|
CoreUtils.SetKeyword(material, "_MSHMAP", material.GetTexture(kMSHMap)); |
|
|
|
CoreUtils.SetKeyword(material, "_MASKMAP", material.GetTexture(kMaskMap)); |
|
|
|
} |
|
|
|
|
|
|
|
protected void SetupMaterialKeywordsAndPassInternal(Material material) |
|
|
|
|
|
|
|
|
|
|
m_MaterialEditor.TexturePropertySingleLine(Styles.baseColorText, baseColorMap); |
|
|
|
m_MaterialEditor.TexturePropertySingleLine(Styles.normalMapText, normalMap); |
|
|
|
m_MaterialEditor.TexturePropertySingleLine(Styles.MSHMapText, MSHMap); |
|
|
|
m_MaterialEditor.TexturePropertySingleLine(Styles.maskMapText, maskMap); |
|
|
|
m_MaterialEditor.ShaderProperty(decalBlend, Styles.decalBlendText); |
|
|
|
|
|
|
|
EditorGUI.indentLevel--; |
|
|
|