Files
com.misaki.hdrp-toon/Editor/MeterialEditor/Helpers/UTSShaderGUIHelpers.cs
Misaki 886432db7b Updated OutlineScope;
Reorgnize shader code;
2025-02-03 13:46:31 +09:00

20 lines
765 B
C#

namespace Misaki.HdrpToon.Editor
{
internal static class UTSShaderGUIHelpers
{
public static ShadingMode GetShadingMode(this UTSShaderGUI shaderGUI)
{
return (ShadingMode)shaderGUI.GetUIScope<SurfaceOptionsScope>().FindProperty("_Shading_Mode").floatValue;
}
public static PBRMode GetPBRMode(this UTSShaderGUI shaderGUI)
{
return (PBRMode)shaderGUI.GetUIScope<SurfaceOptionsScope>().FindProperty("_PBR_Mode").floatValue;
}
public static bool HasFeature(this UTSShaderGUI shaderGUI, SurfaceFeature feature)
{
return ((SurfaceFeature)shaderGUI.GetUIScope<SurfaceOptionsScope>().FindProperty("_Surface_Features").floatValue & feature) != 0;
}
}
}