summaryrefslogtreecommitdiffstats
path: root/Editor
diff options
context:
space:
mode:
Diffstat (limited to 'Editor')
-rw-r--r--Editor/tooner.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Editor/tooner.cs b/Editor/tooner.cs
index 4e96e61..4d96d76 100644
--- a/Editor/tooner.cs
+++ b/Editor/tooner.cs
@@ -480,6 +480,11 @@ public class ToonerGUI : ShaderGUI {
bc,
"Matcap strength");
+ bc = FindProperty($"_Matcap{i}MixFactor");
+ editor.RangeProperty(
+ bc,
+ "Mix factor");
+
bc = FindProperty($"_Matcap{i}Emission");
editor.FloatProperty(
bc,
@@ -490,6 +495,29 @@ public class ToonerGUI : ShaderGUI {
bc,
"Quantization");
+ bc = FindProperty($"_Matcap{i}Normal_Enabled");
+ enabled = bc.floatValue > 1E-6;
+ EditorGUI.BeginChangeCheck();
+ enabled = EditorGUILayout.Toggle("Replace normals", enabled);
+ EditorGUI.EndChangeCheck();
+ bc.floatValue = enabled ? 1.0f : 0.0f;
+ SetKeyword($"_MATCAP{i}_NORMAL", enabled);
+
+ if (enabled) {
+ EditorGUI.indentLevel += 1;
+ bc = FindProperty($"_Matcap{i}Normal");
+ editor.TexturePropertySingleLine(
+ MakeLabel(bc, "Normal map"),
+ bc);
+ if (bc.textureValue) {
+ editor.TextureScaleOffsetProperty(bc);
+
+ bc = FindProperty($"_Matcap{i}Normal_Str");
+ editor.RangeProperty(bc, "Strength");
+ }
+ EditorGUI.indentLevel -= 1;
+ }
+
bc = FindProperty($"_Matcap{i}Distortion0");
enabled = bc.floatValue > 1E-6;
EditorGUI.BeginChangeCheck();