summaryrefslogtreecommitdiffstats
path: root/Editor/tooner.cs
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-06-25 19:35:35 -0700
committeryum <yum.food.vr@gmail.com>2024-06-25 19:35:35 -0700
commit312d7acc39b4dc33edd3fdc3d3d77d373b5cb198 (patch)
treec4b73a8317699055fc46d9c33b490fac8e9d8db6 /Editor/tooner.cs
parent9b1523dce73e803c822d33e2529f2836dcc8ef7f (diff)
Add glitter option to rim lighting
Now rim lighting can illuminate the avatar as if it has glitter on it. Also deprecate glitter seed, since it was unused.
Diffstat (limited to 'Editor/tooner.cs')
-rw-r--r--Editor/tooner.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/Editor/tooner.cs b/Editor/tooner.cs
index 33b23ac..9190f0f 100644
--- a/Editor/tooner.cs
+++ b/Editor/tooner.cs
@@ -371,6 +371,40 @@ public class ToonerGUI : ShaderGUI {
bc,
"Rim lighting emission");
+ bc = FindProperty($"_Rim_Lighting{i}_Glitter_Enabled");
+ enabled = bc.floatValue > 1E-6;
+ EditorGUI.BeginChangeCheck();
+ enabled = EditorGUILayout.Toggle("Glitter", enabled);
+ EditorGUI.EndChangeCheck();
+ bc.floatValue = enabled ? 1.0f : 0.0f;
+ SetKeyword($"_RIM_LIGHTING{i}_GLITTER", enabled);
+
+ if (enabled) {
+ EditorGUI.indentLevel += 1;
+
+ bc = FindProperty($"_Rim_Lighting{i}_Glitter_Density");
+ editor.FloatProperty(
+ bc,
+ "Density");
+
+ bc = FindProperty($"_Rim_Lighting{i}_Glitter_Amount");
+ editor.FloatProperty(
+ bc,
+ "Amount");
+
+ bc = FindProperty($"_Rim_Lighting{i}_Glitter_Speed");
+ editor.FloatProperty(
+ bc,
+ "Speed");
+
+ bc = FindProperty($"_Rim_Lighting{i}_Glitter_Quantization");
+ editor.FloatProperty(
+ bc,
+ "Quantization");
+
+ EditorGUI.indentLevel -= 1;
+ }
+
EditorGUI.indentLevel -= 1;
}
}