Files
com.misaki.hdrp-toon/Editor/MeterialEditor/Helpers/UTSShaderGUIHelpers.cs
Misaki 3273812902 Added ShadowScope;
Renamed PBRScope to SurfaceInputsScope;
2025-02-01 20:51:22 +09:00

20 lines
775 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, SurfaceFeatureFlags feature)
{
return ((SurfaceFeatureFlags)shaderGUI.GetUIScope<SurfaceOptionsScope>().FindProperty("_Surface_Features").floatValue & feature) != 0;
}
}
}