summaryrefslogtreecommitdiffstats
path: root/Editor/tooner.cs
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-10-05 17:32:47 -0700
committeryum <yum.food.vr@gmail.com>2024-10-05 17:32:47 -0700
commit144d7bc5cc999b9c5f84a9a7fc2a86dafe276df1 (patch)
treef258bc63750ed35720110edc457a1703763daf5d /Editor/tooner.cs
parent54cf2749759045b646282c5e28139510d3e7783e (diff)
Fix SSR
Diffstat (limited to 'Editor/tooner.cs')
-rw-r--r--Editor/tooner.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Editor/tooner.cs b/Editor/tooner.cs
index d2588b2..8824de5 100644
--- a/Editor/tooner.cs
+++ b/Editor/tooner.cs
@@ -2056,6 +2056,33 @@ public class ToonerGUI : ShaderGUI {
bct, bc);
SetKeyword("_REFLECTION_STRENGTH_TEX", bct.textureValue);
+
+ bc = FindProperty("_Enable_SSR");
+ enabled = bc.floatValue > 1E-6;
+ EditorGUI.BeginChangeCheck();
+ enabled = Toggle("Enable SSR", enabled);
+ EditorGUI.EndChangeCheck();
+ bc.floatValue = enabled ? 1.0f : 0.0f;
+ SetKeyword("SSR_ENABLED", enabled);
+
+ if (enabled) {
+ EditorGUI.indentLevel += 1;
+
+ bc = FindProperty("_SSRStrength");
+ FloatProperty(bc, "Strength");
+
+ bc = FindProperty("_SSRHeight");
+ FloatProperty(bc, "Height");
+
+ bc = FindProperty("_SSR_Mask");
+ TexturePropertySingleLine(
+ MakeLabel(bc, "Mask"),
+ bc);
+ SetKeyword("SSR_MASK", bc.textureValue);
+
+ EditorGUI.indentLevel -= 1;
+ }
+
EditorGUI.indentLevel -= 1;
show_ui.RemoveAt(show_ui.Count - 1);
}