# Unlit transparent shader render order issue

**URL:** https://discussions.unity.com/t/unlit-transparent-shader-render-order-issue/23972
**Category:** Questions & Answers
**Created:** [June 28, 2011, 5:08pm UTC](https://discussions.unity.com/t/unlit-transparent-shader-render-order-issue/23972 "2011-06-28T17:08:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chronosapien](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/chronosapien/32/512841_2.png) [@chronosapien](https://discussions.unity.com/u/chronosapien)
#### Post date: [June 28, 2011, 5:08pm UTC](https://discussions.unity.com/t/unlit-transparent-shader-render-order-issue/23972/1 "2011-06-28T17:08:17Z")

</div>

In using the unlit transparent shader, I’ve noticed that often times it will render improperly in front of or behind certain objects. The only solution I’ve been able to find as of yet is instead using a transparent/cutout/soft edge unlit shader which does render in the proper order, but however has a different visual appearance than the unlit transparent shader. Is there a working shader that does what the unlit transparent shader does, or another fix to resolve this issue?

---

<div class="post-metadata">

### Author: ![equalsequals](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/equalsequals/32/319683_2.png) [@equalsequals](https://discussions.unity.com/u/equalsequals)
#### Post date: [June 28, 2011, 7:03pm UTC](https://discussions.unity.com/t/unlit-transparent-shader-render-order-issue/23972/2 "2011-06-28T19:03:00Z")

</div>

This shader, for performance reasons doesn’t write to the Z buffer.

If I understand you correctly, this will solve your problem:

```
Shader "Unlit/Transparent ZWrite" {
Properties {
    _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}

SubShader {
    Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}

    ZWrite On
    Blend SrcAlpha OneMinusSrcAlpha 

    Pass
    {
	    Lighting Off
	    SetTexture [_MainTex] { combine texture } 
    }
  }
}

```

Hope that helps

==
