diff options
| author | yum <yum.food.vr@gmail.com> | 2024-06-21 18:18:50 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-06-21 18:18:50 -0700 |
| commit | 01255d3804afbcaf6c3b9fb620c51291c64f9335 (patch) | |
| tree | 9fb3c9bcca6d52d0830366b3388b5330fa4cbcee /Editor | |
| parent | eadd7efade2162ac66d35c2a9c3e73bb5826f974 (diff) | |
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.
Diffstat (limited to 'Editor')
| -rw-r--r-- | Editor/tooner.cs | 12 |
1 files changed, 12 insertions, 0 deletions
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; } } |
