Files
com.misaki.hdrp-toon/Editor/MeterialEditor/UIScopes/AngelRingScope.cs
Misaki d8b12a0ca9 Added SurfaceFeatureFlags;
Added OutlineScope;
Added AngelRingScope;

Change up Outline pass
2025-01-29 21:54:17 +09:00

45 lines
1.8 KiB
C#

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