Shader code cleanupand bug fix.

This commit is contained in:
2025-02-17 22:15:27 +09:00
parent eacbbc9b8b
commit 4ce84572d0
20 changed files with 375 additions and 467 deletions

View File

@@ -72,7 +72,16 @@ namespace Misaki.HdrpToon.Editor
editor.ShaderProperty(Properties.cullMode, Styles.cullingModeText);
editor.ShaderProperty(Properties.shadingMode, Styles.shadingModeText);
EditorGUI.BeginChangeCheck();
editor.ShaderProperty(Properties.materialType, Styles.materialTypeText);
if (EditorGUI.EndChangeCheck())
{
foreach (var material in editor.GetMaterials())
{
material.SetShaderPassEnabled(UtsShaderPassName.HAIR_SHADOW_CASTER_PASS_NAME, Properties.materialType.GetEnumValue<MaterialType>() == MaterialType.FrontHair);
}
}
editor.ShaderProperty(Properties.pbrMode, Styles.pbrModeText);
EditorGUI.BeginChangeCheck();