Added UtsSingleLightLoop

This commit is contained in:
2025-03-23 17:53:36 +09:00
parent ee0b720b6d
commit ea3e83157c
18 changed files with 142 additions and 234 deletions

View File

@@ -108,7 +108,7 @@ namespace Misaki.HdrpToon.Editor
{
editor.KeywordTexturePropertySingleLine(Styles.NormalMapText, Properties.NormalMap, Properties.NormalMapScale);
if (editor.GetMaterials().All(mat => mat.GetPBRMode() != PBRMode.Off))
if (materials.All(mat => mat.GetPBRMode() != PBRMode.Off))
{
if (editor.KeywordTexturePropertySingleLine(Styles.MaskMapText, Properties.MaskMap))
{
@@ -118,7 +118,7 @@ namespace Misaki.HdrpToon.Editor
}
else
{
if (editor.GetMaterials().All(mat => mat.GetPBRMode() != PBRMode.KKHair))
if (materials.All(mat => mat.GetPBRMode() != PBRMode.KKHair))
{
editor.ShaderProperty(Properties.Metallic, Styles.MetallicText);
}
@@ -127,10 +127,10 @@ namespace Misaki.HdrpToon.Editor
}
}
if (editor.GetMaterials().All(mat => mat.GetPBRMode() == PBRMode.Anisotropy || mat.GetPBRMode() == PBRMode.KKHair))
if (materials.All(mat => mat.GetPBRMode() == PBRMode.Anisotropy || mat.GetPBRMode() == PBRMode.KKHair))
{
editor.KeywordTexturePropertySingleLine(Styles.AnisotropyMapText, Properties.AnisotropyMap, Properties.Anisotropy);
if (editor.GetMaterials().All(mat => mat.GetPBRMode() == PBRMode.KKHair))
if (materials.All(mat => mat.GetPBRMode() == PBRMode.KKHair))
{
editor.ShaderProperty(Properties.KKColor, Styles.KKColorText);
editor.ShaderProperty(Properties.BSDFContribution, Styles.BSDFContributionText);
@@ -140,7 +140,7 @@ namespace Misaki.HdrpToon.Editor
EditorGUILayout.LabelField("Anisotropy Map only ST");
editor.TextureScaleOffsetProperty(Properties.AnisotropyMap);
}
else if (editor.GetMaterials().All(mat => mat.GetPBRMode() == PBRMode.Toon))
else if (materials.All(mat => mat.GetPBRMode() == PBRMode.Toon))
{
editor.KeywordTexturePropertySingleLine(Styles.SpecularColorMapText, Properties.SpecularColorMap, Properties.SpecularColor);
editor.MinMaxShaderProperty(Properties.SpecularFeather, Properties.SpecularStep, 0, 1, Styles.SpecRemap);
@@ -157,7 +157,7 @@ namespace Misaki.HdrpToon.Editor
editor.ShaderProperty(Properties.emissiveIntensity, Styles.emissiveIntensityText);
if (EditorGUI.EndChangeCheck())
{
foreach (var material in editor.GetMaterials())
foreach (var material in materials)
{
if (material.HasProperty(EMISSIVE_COLOR_LDR) && material.HasProperty(EMISSIVE_INTENSITY) && material.HasProperty(EMISSIVE_COLOR))
{