diff options
| author | yum <yum.food.vr@gmail.com> | 2024-11-04 01:04:32 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-11-04 01:04:32 -0800 |
| commit | 5f4b58803d1f1d0c61a031e8563df4024682b328 (patch) | |
| tree | cca8177cb3b370bdb3123c75820a44cc41ca82e1 /Editor | |
| parent | 4adbc6dfbf2409f34e11e001db2b434feeeb435f (diff) | |
Add noise mask option to cutout shading mode
Diffstat (limited to 'Editor')
| -rw-r--r-- | Editor/tooner.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Editor/tooner.cs b/Editor/tooner.cs index 53ae1a8..6c5a9f8 100644 --- a/Editor/tooner.cs +++ b/Editor/tooner.cs @@ -2367,6 +2367,7 @@ public class ToonerGUI : ShaderGUI { Cutoff, Stochastic, InterleavedGradientNoise, + NoiseMask, } // unity is made by fucking morons and they don't expose this so i'm @@ -2481,11 +2482,19 @@ public class ToonerGUI : ShaderGUI { bc.floatValue = (float) cmode; SetKeyword("_RENDERING_CUTOUT_STOCHASTIC", cmode == CutoutMode.Stochastic); SetKeyword("_RENDERING_CUTOUT_IGN", cmode == CutoutMode.InterleavedGradientNoise); + SetKeyword("_RENDERING_CUTOUT_NOISE_MASK", cmode == CutoutMode.NoiseMask); + EditorGUI.indentLevel += 1; if (cmode == CutoutMode.Cutoff) { bc = FindProperty("_Alpha_Cutoff"); ShaderProperty(bc, MakeLabel(bc)); + } else if (cmode == CutoutMode.NoiseMask) { + bc = FindProperty("_Rendering_Cutout_Noise_Mask"); + TexturePropertySingleLine( + MakeLabel(bc, "Noise mask"), + bc); } + EditorGUI.indentLevel -= 1; } bc = FindProperty("_Cull"); |
