|
|
|
|
|
|
public static GUIContent normalMapText = new GUIContent("Normal Map", "Normal Map (BC7/BC5/DXT5(nm))"); |
|
|
|
public static GUIContent decalBlendText = new GUIContent("Global Opacity", "Whole decal Opacity"); |
|
|
|
public static GUIContent AlbedoModeText = new GUIContent("Affect BaseColor", "Base color + Opacity, Opacity only"); |
|
|
|
public static GUIContent MeshDecalDepthBiasText = new GUIContent("Mesh decal depth bias", "prevents z-fighting"); |
|
|
|
|
|
|
|
public static GUIContent[] maskMapText = |
|
|
|
{ |
|
|
|
|
|
|
protected MaterialProperty maskmapSmoothness = new MaterialProperty(); |
|
|
|
protected const string kMaskmapSmoothness = "_MaskmapSmoothness"; |
|
|
|
|
|
|
|
protected MaterialProperty decalMeshDepthBias = new MaterialProperty(); |
|
|
|
protected const string kDecalMeshDepthBias = "_DecalMeshDepthBias"; |
|
|
|
|
|
|
|
protected MaterialEditor m_MaterialEditor; |
|
|
|
|
|
|
|
// This is call by the inspector
|
|
|
|
|
|
|
maskmapMetal = FindProperty(kMaskmapMetal, props); |
|
|
|
maskmapAO = FindProperty(kMaskmapAO, props); |
|
|
|
maskmapSmoothness = FindProperty(kMaskmapSmoothness, props); |
|
|
|
decalMeshDepthBias = FindProperty(kDecalMeshDepthBias, props); |
|
|
|
|
|
|
|
// always instanced
|
|
|
|
SerializedProperty instancing = m_MaterialEditor.serializedObject.FindProperty("m_EnableInstancingVariants"); |
|
|
|
|
|
|
EditorGUI.indentLevel--; |
|
|
|
} |
|
|
|
m_MaterialEditor.ShaderProperty(decalBlend, Styles.decalBlendText); |
|
|
|
m_MaterialEditor.ShaderProperty(decalMeshDepthBias, Styles.MeshDecalDepthBiasText); |
|
|
|
EditorGUI.indentLevel--; |
|
|
|
|
|
|
|
EditorGUILayout.HelpBox( |
|
|
|