Added ShadowScope;
Renamed PBRScope to SurfaceInputsScope;
This commit is contained in:
20
Editor/MeterialEditor/Helpers/UTSShaderGUIHelpers.cs
Normal file
20
Editor/MeterialEditor/Helpers/UTSShaderGUIHelpers.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user