Exemplo n.º 1
0
        public static void DoSpecularArea(SimpleLitProperties properties, MaterialEditor materialEditor, Material material)
        {
            SpecularSource specSource = (SpecularSource)properties.specHighlights.floatValue;

            EditorGUI.BeginDisabledGroup(specSource == SpecularSource.NoSpecular);
            BaseShaderGUI.TextureColorProps(materialEditor, Styles.specularMapText, properties.specGlossMap, properties.specColor, true);
            DoSmoothness(properties, material);
            EditorGUI.EndDisabledGroup();
        }
Exemplo n.º 2
0
 public static void DoMetallicSpecularArea(LitProperties properties, MaterialEditor materialEditor, Material material)
 {
     string[] smoothnessChannelNames;
     bool hasGlossMap = false;
     if (properties.workflowMode == null ||
         (WorkflowMode)properties.workflowMode.floatValue == WorkflowMode.Metallic)
     {
         hasGlossMap = properties.metallicGlossMap.textureValue != null;
         smoothnessChannelNames = Styles.metallicSmoothnessChannelNames;
         materialEditor.TexturePropertySingleLine(Styles.metallicMapText, properties.metallicGlossMap,
             hasGlossMap ? null : properties.metallic);
     }
     else
     {
         hasGlossMap = properties.specGlossMap.textureValue != null;
         smoothnessChannelNames = Styles.specularSmoothnessChannelNames;
         BaseShaderGUI.TextureColorProps(materialEditor, Styles.specularMapText, properties.specGlossMap,
             hasGlossMap ? null : properties.specColor);
     }
     DoSmoothness(materialEditor, material, properties.smoothness, properties.smoothnessMapChannel, smoothnessChannelNames);
 }