Added UTSAPI

This commit is contained in:
2025-05-21 17:02:07 +09:00
parent 35dc7b15a6
commit 59b46bce44
9 changed files with 147 additions and 69 deletions

View File

@@ -1,7 +1,6 @@
using Misaki.ShaderGUI;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
namespace Misaki.HdrpToon.Editor
{
@@ -11,24 +10,9 @@ namespace Misaki.HdrpToon.Editor
public override void ValidateMaterial(Material material)
{
material.SetShaderPassEnabled(UtsShaderPassName.HAIR_SHADOW_CASTER_PASS_NAME, (MaterialType)material.GetInteger("_Material_Type") == MaterialType.FrontHair);
material.SetShaderPassEnabled(UtsShaderPassName.HAIR_BLENDING_TARGET_PASS_NAME, material.GetInteger("_HairBlendingTarget") == 1);
if (material.GetInteger("_AlphaCutoffEnable") > 0.0f)
{
material.SetInt("_ZTestGBuffer", (int)CompareFunction.Equal);
}
else
{
material.SetInt("_ZTestGBuffer", (int)CompareFunction.LessEqual);
}
//if (surfaceType == SurfaceType.Opaque)
//{
material.SetInt("_ZTestDepthEqualForOpaque", (int)CompareFunction.Equal);
//}
//else
// material.SetInt(kZTestDepthEqualForOpaque, (int)material.GetTransparentZTest());
UTSAPI.SetupPass(material);
UTSAPI.SetupProperties(material);
UTSAPI.SetupKeywords(material);
}
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)