diff options
| author | yum <yum.food.vr@gmail.com> | 2023-03-23 16:32:22 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-03-23 16:52:51 -0700 |
| commit | d58d36d9ef533b526d33c511526d6e481d243c96 (patch) | |
| tree | 06fd5082841fc183246964206679c558a63aef35 /Shaders/TaSTT_lighting_template.cginc | |
| parent | 1f15133dd985442af20d42a96fbcd0007f03bd2b (diff) | |
Custom chatbox shader writes depth
This fixes issues where the transparent corners of the textbox render
in front of other materials, causing those other materials to skip
rendering.
* Update README.md with roadmap and avatar resource usage.
Diffstat (limited to 'Shaders/TaSTT_lighting_template.cginc')
| -rw-r--r-- | Shaders/TaSTT_lighting_template.cginc | 4 |
1 files changed, 3 insertions, 1 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); } } |
