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(); }
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); }