summaryrefslogtreecommitdiffstats
path: root/Editor
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-08-21 15:05:32 -0700
committeryum <yum.food.vr@gmail.com>2024-08-21 15:05:32 -0700
commit5c3223949546fee336ba50e5e33736b83c450d78 (patch)
tree5de9bb5e6f1e2fe61c58a78692554ebedc0864dc /Editor
parentd97cbbef750c86a329ce7669fd532ad7f7593839 (diff)
Matcap masks are now UV channel aware
Diffstat (limited to 'Editor')
-rw-r--r--Editor/tooner.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Editor/tooner.cs b/Editor/tooner.cs
index d769a02..8cb4d07 100644
--- a/Editor/tooner.cs
+++ b/Editor/tooner.cs
@@ -440,12 +440,19 @@ public class ToonerGUI : ShaderGUI {
bool enabled; // c# is a shitty language
if (bc.textureValue) {
+ EditorGUI.indentLevel += 1;
bc = FindProperty($"_Matcap{i}_Mask_Invert");
enabled = bc.floatValue > 1E-6;
EditorGUI.BeginChangeCheck();
enabled = EditorGUILayout.Toggle("Invert mask", enabled);
EditorGUI.EndChangeCheck();
bc.floatValue = enabled ? 1.0f : 0.0f;
+
+ bc = FindProperty($"_Matcap{i}_Mask_UV_Select");
+ editor.RangeProperty(
+ bc,
+ "UV channel");
+ EditorGUI.indentLevel -= 1;
}
bc = FindProperty($"_Matcap{i}_Mask2");
@@ -455,12 +462,19 @@ public class ToonerGUI : ShaderGUI {
SetKeyword($"_MATCAP{i}_MASK2", bc.textureValue);
if (bc.textureValue) {
+ EditorGUI.indentLevel += 1;
bc = FindProperty($"_Matcap{i}_Mask2_Invert");
enabled = bc.floatValue > 1E-6;
EditorGUI.BeginChangeCheck();
enabled = EditorGUILayout.Toggle("Invert mask", enabled);
EditorGUI.EndChangeCheck();
bc.floatValue = enabled ? 1.0f : 0.0f;
+
+ bc = FindProperty($"_Matcap{i}_Mask2_UV_Select");
+ editor.RangeProperty(
+ bc,
+ "UV channel");
+ EditorGUI.indentLevel -= 1;
}
EditorGUI.BeginChangeCheck();