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

@@ -18,7 +18,6 @@ namespace Misaki.HdrpToon.Editor
public static MaterialProperty materialType;
public static MaterialProperty pbrMode;
public static MaterialProperty receiveHairShadow;
public static MaterialProperty hairBlendingTarget;
public static MaterialProperty surfaceFeatures;
}
@@ -35,7 +34,6 @@ namespace Misaki.HdrpToon.Editor
public static readonly GUIContent materialTypeText = new("Material Type", "Specifies the material type.");
public static readonly GUIContent pbrModeText = new("PBR Mode", "Specifies PBR model mode.");
public static readonly GUIContent receiveHairShadowText = new("Receive Hair Shadow", "Enable to receive shadow from hair shadow caster");
public static readonly GUIContent hairBlendingTargetText = new("Hair Blending Target", "Enable to be blended with hair");
public static readonly GUIContent surfaceFeaturesText = new("Surface Features", "Specifies the surface features.");
}
@@ -49,6 +47,11 @@ namespace Misaki.HdrpToon.Editor
return (ShadingMode)Properties.shadingMode.floatValue;
}
public static PBRMode GetPBRMode()
{
return (PBRMode)Properties.pbrMode.floatValue;
}
public static bool HasFeature(SurfaceFeatureFlags feature)
{
return ((SurfaceFeatureFlags)Properties.surfaceFeatures.floatValue & feature) != 0;
@@ -66,7 +69,6 @@ namespace Misaki.HdrpToon.Editor
Properties.materialType = FindProperty("_Material_Type");
Properties.pbrMode = FindProperty("_PBR_Mode");
Properties.receiveHairShadow = FindProperty("_Receive_Hair_Shadow");
Properties.hairBlendingTarget = FindProperty("_HairBlendingTarget");
Properties.surfaceFeatures = FindProperty("_SurfaceFeatures");
}
@@ -88,8 +90,6 @@ namespace Misaki.HdrpToon.Editor
editor.ShaderProperty(Properties.materialType, Styles.materialTypeText);
editor.ShaderProperty(Properties.pbrMode, Styles.pbrModeText);
editor.ShaderProperty(Properties.receiveHairShadow, Styles.receiveHairShadowText);
EditorGUI.BeginChangeCheck();
editor.ShaderProperty(Properties.hairBlendingTarget, Styles.hairBlendingTargetText);
if (EditorGUI.EndChangeCheck())