Fixed the engergy conservation problem when pbr mode is toon.

This commit is contained in:
2025-05-13 21:35:52 +09:00
parent 961db806e9
commit d19322b768
11 changed files with 72 additions and 53 deletions

View File

@@ -8,6 +8,12 @@ namespace Misaki.HdrpToon.Editor
{
private GUIStyle _headerStyle;
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);
}
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
if (!initialized)