Added SurfaceFeatureFlags;
Added OutlineScope; Added AngelRingScope; Change up Outline pass
This commit is contained in:
44
Editor/MeterialEditor/UIScopes/AngelRingScope.cs
Normal file
44
Editor/MeterialEditor/UIScopes/AngelRingScope.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Misaki.ShaderGUI;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
internal class AngelRingScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
{
|
||||
private static class Properties
|
||||
{
|
||||
public static MaterialProperty angelRingColor;
|
||||
public static MaterialProperty angelRingColorMap;
|
||||
public static MaterialProperty angelRingIntensity;
|
||||
}
|
||||
|
||||
private static class Styles
|
||||
{
|
||||
public static readonly GUIContent angelRingColorText = new("Angel Ring Color", "Specifies the color of the angel ring.");
|
||||
public static readonly GUIContent angelRingIntensityText = new("Angel Ring Intensity", "Specifies the intensity of the angel ring.");
|
||||
}
|
||||
|
||||
protected override bool ShowSection => owner.GetUIScope<SurfaceOptionsScope>().HasFeature(SurfaceFeatureFlags.AngelRing);
|
||||
|
||||
protected override ShaderGUIExpandable ExpandableBit => ShaderGUIExpandable.AngelRing;
|
||||
|
||||
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Angel Ring Settings");
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.angelRingColor = FindProperty("_AngelRingColor");
|
||||
Properties.angelRingColorMap = FindProperty("_AngelRingColorMap");
|
||||
Properties.angelRingIntensity = FindProperty("_AngelRingIntensity");
|
||||
}
|
||||
|
||||
protected override void DrawContent()
|
||||
{
|
||||
editor.TexturePropertySingleLine(Styles.angelRingColorText, Properties.angelRingColorMap, Properties.angelRingColor);
|
||||
editor.ShaderProperty(Properties.angelRingIntensity, Styles.angelRingIntensityText);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
editor.TextureScaleOffsetProperty(Properties.angelRingColorMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user