You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
788 B

5 years ago
  1. Shader "Hidden/DepthMapQuad"
  2. {
  3. SubShader
  4. {
  5. Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "buuuh" }
  6. LOD 100
  7. ZWrite Off
  8. Blend SrcAlpha OneMinusSrcAlpha
  9. Pass
  10. {
  11. CGPROGRAM
  12. #pragma vertex vert
  13. #pragma fragment frag
  14. #include "UnityCG.cginc"
  15. struct appdata
  16. {
  17. float4 vertex : POSITION;
  18. };
  19. struct v2f
  20. {
  21. float4 vertex : SV_POSITION;
  22. };
  23. v2f vert(appdata v)
  24. {
  25. v2f o;
  26. o.vertex = UnityObjectToClipPos(v.vertex);
  27. return o;
  28. }
  29. fixed4 frag(v2f i) : SV_Target
  30. {
  31. clip(-.1);
  32. return 1;
  33. }
  34. ENDCG
  35. }
  36. }
  37. SubShader
  38. {
  39. Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Opaque" }
  40. LOD 1
  41. UsePass "Legacy Shaders/VertexLit/SHADOWCASTER"
  42. }
  43. }