Added hair blending support.
This commit is contained in:
@@ -26,6 +26,16 @@ namespace Misaki.HdrpToon.Editor
|
||||
return (PBRMode)material.GetInteger(SurfaceOptions.PBR_MODE);
|
||||
}
|
||||
|
||||
public static MaterialType GetMaterialType(this Material material)
|
||||
{
|
||||
if (!material.HasProperty(SurfaceOptions.MATERIAL_TYPE))
|
||||
{
|
||||
return MaterialType.Standard;
|
||||
}
|
||||
|
||||
return (MaterialType)material.GetInteger(SurfaceOptions.MATERIAL_TYPE);
|
||||
}
|
||||
|
||||
public static bool HasFeature(this Material material, SurfaceFeature feature)
|
||||
{
|
||||
if (!material.HasProperty(SurfaceOptions.SURFACE_FEATURE))
|
||||
@@ -36,5 +46,10 @@ namespace Misaki.HdrpToon.Editor
|
||||
var value = (SurfaceFeature)material.GetInteger(SurfaceOptions.SURFACE_FEATURE);
|
||||
return (value & feature) != 0;
|
||||
}
|
||||
|
||||
public static bool IsHairBlendingTarget(this Material material)
|
||||
{
|
||||
return material.GetShaderPassEnabled(UtsShaderPassName.HAIR_BLENDING_TARGET_PASS_NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user