summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-02-24 03:08:28 -0800
committeryum <yum.food.vr@gmail.com>2025-02-24 03:08:35 -0800
commit6b6920cfde43d84c59d757b7b96ccabe46d6d75a (patch)
tree8bf5472d1305902c5badb654dd88a7d824301a34
parentcd10b0140515cd70630564694dcff0f4616b2e4d (diff)
Extra stencil color pass behaves as base pass when disabled and not locked
-rw-r--r--2ner.cginc2
-rw-r--r--2ner.shader2
-rw-r--r--features.cginc4
3 files changed, 6 insertions, 2 deletions
diff --git a/2ner.cginc b/2ner.cginc
index b4e7d8e..e814fd8 100644
--- a/2ner.cginc
+++ b/2ner.cginc
@@ -121,7 +121,7 @@ float4 frag(v2f i) : SV_Target {
pbr.albedo.a = 1;
}
-#if defined(EXTRA_STENCIL_COLOR_PASS)
+#if defined(EXTRA_STENCIL_COLOR_PASS) && defined(_EXTRA_STENCIL_COLOR_PASS)
pbr.albedo = _ExtraStencilColor;
#endif
diff --git a/2ner.shader b/2ner.shader
index 8ccd63c..f6e4626 100644
--- a/2ner.shader
+++ b/2ner.shader
@@ -340,7 +340,7 @@ Shader "yum_food/2ner"
//ifex _ExtraStencilColorPass_Enabled==0
[HideInInspector] m_start_ExtraStencilColorPass("Extra stencil color pass", Float) = 0
- [ThryToggle(_)] _ExtraStencilColorPass_Enabled("Enable", Float) = 0
+ [ThryToggle(_EXTRA_STENCIL_COLOR_PASS)] _ExtraStencilColorPass_Enabled("Enable", Float) = 0
_ExtraStencilColor("Color", Color) = (1, 1, 1, 1)
[ThryWideEnum(Simple, 0, Front Face vs Back Face, 1)] _ExtraStencilColorType ("Stencil Type", Float) = 0
[IntRange] _ExtraStencilColorRef ("Stencil Reference Value", Range(0, 255)) = 0
diff --git a/features.cginc b/features.cginc
index bead254..95928a1 100644
--- a/features.cginc
+++ b/features.cginc
@@ -91,5 +91,9 @@
#pragma shader_feature_local _LTCGI
//endex
+//ifex _ExtraStencilColorPass_Enabled==0
+#pragma shader_feature_local _EXTRA_STENCIL_COLOR_PASS
+//endex
+
#endif // __FEATURES_INC