Added UTSAPI
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user