Empty.shader 945 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Shader "Hidden/VolumetricFog2/Empty"
  2. {
  3. Properties
  4. {
  5. [HideInInspector] _MainTex ("Texture", 2D) = "white" {}
  6. _Color("Color", Color) = (0.9,0.9,0.9,0.3)
  7. }
  8. SubShader
  9. {
  10. Tags { "RenderType" = "Transparent" "Queue" = "Transparent+100" }
  11. Blend SrcAlpha OneMinusSrcAlpha
  12. ZTest Always
  13. Cull Front
  14. ZWrite Off
  15. Pass
  16. {
  17. CGPROGRAM
  18. #pragma vertex vert
  19. #pragma fragment frag
  20. #include "UnityCG.cginc"
  21. half4 _Color;
  22. struct appdata
  23. {
  24. float4 vertex : POSITION;
  25. };
  26. struct v2f
  27. {
  28. float4 pos : SV_POSITION;
  29. };
  30. v2f vert(appdata v)
  31. {
  32. v2f o;
  33. o.pos = UnityObjectToClipPos(v.vertex.xyz);
  34. #if defined(UNITY_REVERSED_Z)
  35. o.pos.z = 1.0e-9f;
  36. #else
  37. o.pos.z = o.pos.w - 1.0e-6f;
  38. #endif
  39. return o;
  40. }
  41. half4 frag(v2f i) : SV_Target
  42. {
  43. return _Color;
  44. }
  45. ENDCG
  46. }
  47. }
  48. }