Shader code cleanupand bug fix.
This commit is contained in:
@@ -69,23 +69,24 @@ namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
editor.ShaderProperty(Properties.outlineState, Styles.outlineStateText);
|
||||
|
||||
using var disabledScope = new EditorGUI.DisabledScope(!Properties.outlineState.GetBooleanValue());
|
||||
|
||||
EditorGUILayout.Space();
|
||||
editor.TexturePropertySingleLine(Styles.outlineWidthText, Properties.outlineWidthMap, Properties.outlineWidth);
|
||||
editor.TexturePropertySingleLine(Styles.outlineColorText, Properties.outlineColorMap, Properties.outlineColor);
|
||||
editor.ShaderProperty(Properties.albedoAffectOutline, Styles.albedoAffectOutlineText);
|
||||
editor.ShaderProperty(Properties.skyColorAffectOutline, Styles.skyColorAffectOutlineText);
|
||||
if (Properties.skyColorAffectOutline.GetBooleanValue())
|
||||
if (Properties.outlineState.GetBooleanValue())
|
||||
{
|
||||
using var skyColorIndentLevelScope = new EditorGUI.IndentLevelScope();
|
||||
editor.ShaderProperty(Properties.skyColorIntensity, Styles.skyColorIntensityText);
|
||||
}
|
||||
EditorGUILayout.Space();
|
||||
editor.TexturePropertySingleLine(Styles.outlineWidthText, Properties.outlineWidthMap, Properties.outlineWidth);
|
||||
editor.TexturePropertySingleLine(Styles.outlineColorText, Properties.outlineColorMap, Properties.outlineColor);
|
||||
editor.ShaderProperty(Properties.albedoAffectOutline, Styles.albedoAffectOutlineText);
|
||||
editor.ShaderProperty(Properties.skyColorAffectOutline, Styles.skyColorAffectOutlineText);
|
||||
if (Properties.skyColorAffectOutline.GetBooleanValue())
|
||||
{
|
||||
using var skyColorIndentLevelScope = new EditorGUI.IndentLevelScope();
|
||||
editor.ShaderProperty(Properties.skyColorIntensity, Styles.skyColorIntensityText);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
editor.ShaderProperty(Properties.fadeIn, Styles.fadeInText);
|
||||
editor.ShaderProperty(Properties.fadeOut, Styles.fadeOutText);
|
||||
editor.ShaderProperty(Properties.useSmoothedNormal, Styles.useSmoothedNormalText);
|
||||
EditorGUILayout.Space();
|
||||
editor.ShaderProperty(Properties.fadeIn, Styles.fadeInText);
|
||||
editor.ShaderProperty(Properties.fadeOut, Styles.fadeOutText);
|
||||
editor.ShaderProperty(Properties.useSmoothedNormal, Styles.useSmoothedNormalText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user