From 5f4b58803d1f1d0c61a031e8563df4024682b328 Mon Sep 17 00:00:00 2001 From: yum Date: Mon, 4 Nov 2024 01:04:32 -0800 Subject: Add noise mask option to cutout shading mode --- Editor/tooner.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Editor') 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"); -- cgit v1.2.3