20 lines
775 B
C#
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;
|
|
}
|
|
}
|
|
} |