title: Unity 3D double sided shader with alpha and depth masking
body: <p>I want to create a shader in Unity 3D that you can add a material to that has both depth and transparency. I have so far created a shader that appears in 'scene' mode with transparency, but when I try to preview this in my VR setup, I cannot see the backface of the image. This is a set up for Google Cardboard, so I need to have the camera inside the mesh.</p>
  
  <p>This is my code so far:</p>
  
  <pre><code>Shader "Custom/transparentDepth" {
      Properties {
          _Color ("Main Color", Color) = (1,1,1,1)
              _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
      }
      SubShader {
          Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
          LOD 200
  
          // extra pass that renders to depth buffer only
          Pass {
              ZWrite On
              ColorMask 0
          }
  
          // paste in forward rendering passes from Transparent/Diffuse
          UsePass "Transparent/Diffuse/FORWARD"
      }
  
      Fallback "Transparent/VertexLit"
  }
  </code></pre>
  
  <p>...and I can only assume the transparency is working as this is my 'scene' output:</p>
  
  <p><a href="https://i.stack.imgur.com/ADXD4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ADXD4.png" alt="enter image description here"></a></p>