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

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

37 lines
1.1 KiB
C#

using Misaki.ShaderGUI;
using UnityEditor;
using UnityEngine;
namespace Misaki.HdrpToon.Editor
{
public class UTSShaderGUI : ScopedShaderGUI
{
private GUIStyle _headerStyle;
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
if (!initialized)
{
OnInitialize(materialEditor, properties);
}
EditorGUILayout.Space(10);
EditorGUILayout.LabelField("HDRP Toon Shader", _headerStyle);
EditorGUILayout.Space(20);
DrawShaderGUI(properties);
}
private void OnInitialize(MaterialEditor materialEditor, MaterialProperty[] properties)
{
AddUIScope(new SurfaceOptionsScope());
AddUIScope(new AngelRingScope());
AddUIScope(new OutlineScope());
Initialize(materialEditor, properties);
_headerStyle = new GUIStyle() { fontSize = 25, fontStyle = FontStyle.Bold, alignment = TextAnchor.MiddleCenter };
_headerStyle.normal.textColor = GUI.skin.label.normal.textColor;
}
}
}