Added new stocking surface feature; Added unity 6.3 support; Fixed the issue that ssr weight does not blend ibl and ssr properly; Fixed the issue that material recive ssr regardless of specular ambient mode;
62 lines
1.7 KiB
C#
62 lines
1.7 KiB
C#
using Misaki.ShaderGUI;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace Misaki.HdrpToon.Editor
|
|
{
|
|
public class UTSShaderGUI : ScopedShaderGUI
|
|
{
|
|
private GUIStyle _headerStyle;
|
|
|
|
public override void ValidateMaterial(Material material)
|
|
{
|
|
UTSAPI.SetupPass(material);
|
|
UTSAPI.SetupKeywords(material);
|
|
UTSAPI.SetupProperties(material);
|
|
}
|
|
|
|
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<SurfaceOptionsScope>();
|
|
AddUIScope<ShadingColorScope>();
|
|
AddUIScope<ShadowScope>();
|
|
AddUIScope<SurfaceInputsScope>();
|
|
AddUIScope<AmbientScope>();
|
|
|
|
// Surface Features
|
|
AddUIScope<AngelRingScope>();
|
|
AddUIScope<RimLightScope>();
|
|
AddUIScope<StockingScope>();
|
|
|
|
AddUIScope<OutlineScope>();
|
|
AddUIScope<AdvanceScope>();
|
|
|
|
Initialize(materialEditor, properties);
|
|
|
|
_headerStyle = new GUIStyle()
|
|
{
|
|
fontSize = 25,
|
|
fontStyle = FontStyle.Bold,
|
|
alignment = TextAnchor.MiddleCenter,
|
|
normal =
|
|
{
|
|
textColor = GUI.skin.label.normal.textColor
|
|
}
|
|
};
|
|
}
|
|
}
|
|
} |