summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-02-24 02:33:23 -0800
committeryum <yum.food.vr@gmail.com>2025-02-24 02:33:23 -0800
commitcd10b0140515cd70630564694dcff0f4616b2e4d (patch)
treebf2dda8bc0b2ebcb23a13c838bf2a158a9dcce93
parent16d416134ae155a3f0dacfbbe80fb26a998ec9db (diff)
fix extra stencil pass on transparent (cutout) materials
-rw-r--r--2ner.cginc7
1 files changed, 4 insertions, 3 deletions
diff --git a/2ner.cginc b/2ner.cginc
index 9096923..b4e7d8e 100644
--- a/2ner.cginc
+++ b/2ner.cginc
@@ -114,9 +114,6 @@ float4 frag(v2f i) : SV_Target {
#if defined(_EYE_EFFECT_00)
pbr.normal = eye_effect_00.normal;
#endif
-#if defined(EXTRA_STENCIL_COLOR_PASS)
- pbr.albedo = _ExtraStencilColor;
-#endif
UNITY_BRANCH
if (_Mode == 1) {
@@ -124,6 +121,10 @@ float4 frag(v2f i) : SV_Target {
pbr.albedo.a = 1;
}
+#if defined(EXTRA_STENCIL_COLOR_PASS)
+ pbr.albedo = _ExtraStencilColor;
+#endif
+
#if defined(FORWARD_BASE_PASS)
applyMatcapsAndRimLighting(i, pbr);
#endif