Update ShadingColorScope tooltips;

This commit is contained in:
2025-01-31 20:01:49 +08:00
parent 9822fa61ca
commit 68870fe818

View File

@@ -31,12 +31,10 @@ namespace Misaki.HdrpToon.Editor
{
public static readonly GUIContent baseMapText = new("Base Map", "Base Color : Texture(sRGB) x Color(RGB) Default:White");
public static readonly GUIContent applyTo1stShadingMapText = new("Apply to 1st shading map", "Apply Base map to the 1st shading map.");
public static readonly GUIContent firstShadingMapText = new("1st Shading Map", "1st shading map.");
public static readonly GUIContent firstShadeColorText = new("1st Shading Color", "1st shading color.");
public static readonly GUIContent firstShadingMapText = new("1st Shading Map", "The map used for the brighter portions of the shadow.");
public static readonly GUIContent applyTo2ndShadingMapText = new("Apply to 2nd shading map", "Apply Base map or the 1st shading map to the 2st shading map.");
public static readonly GUIContent secondShadingMapText = new("2nd Shading Map", "2nd shading map.");
public static readonly GUIContent secondShadeColorText = new("2nd Shading Color", "2nd shading color.");
public static readonly GUIContent secondShadingMapText = new("2nd Shading Map", "The map used for the darker portions of the shadow.");
public static readonly GUIContent sdfShadowMapText = new("SDF Shadow Map", "SDF Shadow Map");
public static readonly GUIContent sdfShadowLevelText = new("SDF Shadow Level", "SDF Shadow Level");
@@ -56,10 +54,10 @@ namespace Misaki.HdrpToon.Editor
EditorGUI.indentLevel += 2;
editor.ShaderProperty(Properties.applyTo2ndShadingMapEnable, Styles.applyTo2ndShadingMapText);
EditorGUI.indentLevel -= 2;
if (Properties.applyTo2ndShadingMapEnable.floatValue == 1)
if (Mathf.Approximately(Properties.applyTo2ndShadingMapEnable.floatValue, 1))
{
EditorGUI.indentLevel += 2;
editor.ColorProperty(Properties.secondShadingColor, Styles.secondShadeColorText.text);
editor.ColorProperty(Properties.secondShadingColor, Styles.secondShadingMapText.text);
EditorGUI.indentLevel -= 2;
}
else
@@ -74,10 +72,10 @@ namespace Misaki.HdrpToon.Editor
EditorGUI.indentLevel += 2;
editor.ShaderProperty(Properties.applyTo1stShadingMapEnable, Styles.applyTo1stShadingMapText);
EditorGUI.indentLevel -= 2;
if (Properties.applyTo1stShadingMapEnable.floatValue == 1)
if (Mathf.Approximately(Properties.applyTo1stShadingMapEnable.floatValue, 1))
{
EditorGUI.indentLevel += 2;
editor.ColorProperty(Properties.firstShadingColor, Styles.firstShadeColorText.text);
editor.ColorProperty(Properties.firstShadingColor, Styles.firstShadingMapText.text);
EditorGUI.indentLevel -= 2;
}
else