summaryrefslogtreecommitdiffstats
path: root/Editor
diff options
context:
space:
mode:
Diffstat (limited to 'Editor')
-rw-r--r--Editor/tooner.cs29
1 files changed, 27 insertions, 2 deletions
diff --git a/Editor/tooner.cs b/Editor/tooner.cs
index 44306be..0d4fcb6 100644
--- a/Editor/tooner.cs
+++ b/Editor/tooner.cs
@@ -658,9 +658,29 @@ public class ToonerGUI : ShaderGUI {
}
}
- void DoMain() {
- SetKeyword("VERTEXLIGHT_ON", false);
+ void DoLTCGI() {
+#if LTCGI_INCLUDED
+ GUILayout.Label($"Available: yes");
+
+ MaterialProperty bc = FindProperty("_LTCGI_Enabled");
+ bool enabled = bc.floatValue > 1E-6;
+ EditorGUI.BeginChangeCheck();
+ enabled = EditorGUILayout.Toggle("Enable", enabled);
+ EditorGUI.EndChangeCheck();
+ bc.floatValue = enabled ? 1.0f : 0.0f;
+ SetKeyword("_LTCGI", enabled);
+ bc = FindProperty("_LTCGI_SpecularColor");
+ editor.ColorProperty(bc, "Specular color (RGB)");
+
+ bc = FindProperty("_LTCGI_DiffuseColor");
+ editor.ColorProperty(bc, "Diffuse color (RGB)");
+#else
+ GUILayout.Label($"Available: no");
+#endif // LTCGI_INCLUDED
+ }
+
+ void DoMain() {
GUILayout.Label("PBR", EditorStyles.boldLabel);
EditorGUI.indentLevel += 1;
DoBaseColor();
@@ -739,6 +759,11 @@ public class ToonerGUI : ShaderGUI {
EditorGUI.indentLevel += 1;
DoRendering();
EditorGUI.indentLevel -= 1;
+
+ GUILayout.Label("LTCGI", EditorStyles.boldLabel);
+ EditorGUI.indentLevel += 1;
+ DoLTCGI();
+ EditorGUI.indentLevel -= 1;
}
}