From 01255d3804afbcaf6c3b9fb620c51291c64f9335 Mon Sep 17 00:00:00 2001 From: yum Date: Fri, 21 Jun 2024 18:18:50 -0700 Subject: Add parameters for outline width multiplier & stenciling Outline width makes it easier to animate outline width across an avatar with many materials of different widths. Stenciling being toggleable is just nice for customization. --- Editor/tooner.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Editor') diff --git a/Editor/tooner.cs b/Editor/tooner.cs index 71e7271..da9397a 100644 --- a/Editor/tooner.cs +++ b/Editor/tooner.cs @@ -496,6 +496,18 @@ public class ToonerGUI : ShaderGUI { inverted = EditorGUILayout.Toggle("Invert mask", inverted); EditorGUI.EndChangeCheck(); bc.floatValue = inverted ? 1.0f : 0.0f; + + bc = FindProperty("_Outline_Width_Multiplier"); + editor.FloatProperty( + bc, + "Outline width multiplier"); + + bc = FindProperty("_Outline_Stenciling"); + bool enabled = (bc.floatValue == 1.0); + EditorGUI.BeginChangeCheck(); + enabled = EditorGUILayout.Toggle("Enable stenciling", enabled); + EditorGUI.EndChangeCheck(); + bc.floatValue = enabled ? 1.0f : 2.0f; } } -- cgit v1.2.3