diff options
| author | yum <yum.food.vr@gmail.com> | 2024-08-10 16:47:24 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-08-10 16:47:24 -0700 |
| commit | 7ce783162a9be36c5e75c90d347bcf65182598c4 (patch) | |
| tree | 4a37f36737b80c5571074cb5d5fc2303f0d66312 /Editor | |
| parent | 8948b000fb82cea4ce1d966a669daf68bfeb3166 (diff) | |
Add mask inverts for roughness & hue shift
Diffstat (limited to 'Editor')
| -rw-r--r-- | Editor/tooner.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Editor/tooner.cs b/Editor/tooner.cs index 01ab5a2..4623e9f 100644 --- a/Editor/tooner.cs +++ b/Editor/tooner.cs @@ -94,7 +94,15 @@ public class ToonerGUI : ShaderGUI { bc); if (bct.textureValue) { editor.TextureScaleOffsetProperty(bct); + + bc = FindProperty("_Roughness_Invert"); + bool enabled = bc.floatValue > 1E-6; + EditorGUI.BeginChangeCheck(); + enabled = EditorGUILayout.Toggle("Invert", enabled); + EditorGUI.EndChangeCheck(); + bc.floatValue = enabled ? 1.0f : 0.0f; } + SetKeyword("_ROUGHNESS_MAP", bct.textureValue); } @@ -670,6 +678,15 @@ public class ToonerGUI : ShaderGUI { MakeLabel(bc, "Mask"), bc); + if (bc.textureValue) { + bc = FindProperty("_OKLAB_Mask_Invert"); + enabled = bc.floatValue > 1E-6; + EditorGUI.BeginChangeCheck(); + enabled = EditorGUILayout.Toggle("Invert", enabled); + EditorGUI.EndChangeCheck(); + bc.floatValue = enabled ? 1.0f : 0.0f; + } + bc = FindProperty("_OKLAB_Lightness_Shift"); editor.RangeProperty( bc, |
