summaryrefslogtreecommitdiffstats
path: root/Shaders
diff options
context:
space:
mode:
Diffstat (limited to 'Shaders')
-rw-r--r--Shaders/TaSTT_lighting_template.cginc4
-rw-r--r--Shaders/TaSTT_template.shader9
2 files changed, 9 insertions, 4 deletions
diff --git a/Shaders/TaSTT_lighting_template.cginc b/Shaders/TaSTT_lighting_template.cginc
index da3a2ec..ad488cc 100644
--- a/Shaders/TaSTT_lighting_template.cginc
+++ b/Shaders/TaSTT_lighting_template.cginc
@@ -524,9 +524,10 @@ float prng(float2 v)
return res * res;
}
-fixed4 frag(v2f i) : SV_Target
+fixed4 frag(v2f i, out float depth : SV_DepthLessEqual) : SV_Target
{
float2 uv = i.uv.zw;
+ depth = 1.0;
// Fix text orientation
uv.y = 0.5 - uv.y;
@@ -546,6 +547,7 @@ fixed4 frag(v2f i) : SV_Target
return light(i, margin_effect(i));
}
if (InMarginRounding(uv, uv_margin, Margin_Rounding_Scale, /*interior=*/false)) {
+ depth = 0.0;
return fixed4(0, 0, 0, 0);
}
}
diff --git a/Shaders/TaSTT_template.shader b/Shaders/TaSTT_template.shader
index e92a1bd..823eb67 100644
--- a/Shaders/TaSTT_template.shader
+++ b/Shaders/TaSTT_template.shader
@@ -55,9 +55,11 @@
"LightMode" = "ForwardBase"
}
Blend SrcAlpha OneMinusSrcAlpha
+ ZWrite On
+ ZTest LEqual
CGPROGRAM
- #pragma target 3.0
+ #pragma target 5.0
#pragma multi_compile _ VERTEXLIGHT_ON
@@ -76,10 +78,11 @@
"Queue"="AlphaTest+499"
}
Blend One One
- ZWrite Off
+ ZWrite On
+ ZTest LEqual
CGPROGRAM
- #pragma target 3.0
+ #pragma target 5.0
#pragma multi_compile_fwdadd