Added ShadowScope;

Renamed PBRScope to SurfaceInputsScope;
This commit is contained in:
2025-02-01 20:51:22 +09:00
parent 458afd880f
commit 3273812902
26 changed files with 346 additions and 172 deletions

View 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;
}
}
}