Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. {
  2. Properties
  3. {
  4. [PerRendererData]_MainTex("Texture", 2D) = "white" {}
  5.  
  6. _Color("Tint", Color) = (1,1,1,1)
  7. }
  8. SubShader
  9. {
  10. Tags
  11. {
  12. "Queue" = "Transparent"
  13. "IgnoreProjector" = "True"
  14. "RenderType" = "Transparent"
  15. "PreviewType" = "Plane"
  16. "CanUseSpriteAtlas" = "True"
  17. }
  18. Pass
  19. {
  20. Cull Off
  21. Lighting Off
  22. ZWrite Off
  23. Blend One OneMinusSrcAlpha
  24. ZTest Always
  25.  
  26. CGPROGRAM
  27. #pragma vertex vert
  28. #pragma fragment frag
  29. #include "UnityCG.cginc"
  30.  
  31. struct appdata
  32. {
  33. float4 vertex : POSITION;
  34. float2 uv : TEXCOORD0;
  35. float4 color : COLOR;
  36. };
  37.  
  38. struct v2f
  39. {
  40. float4 vertex : SV_POSITION;
  41. float2 uv : TEXCOORD0;
  42. float4 color : COLOR;
  43. };
  44.  
  45. sampler2D _MainTex;
  46. sampler2D_float _CameraDepthTexture;
  47. float _Magnitude;
  48. float4 _Color;
  49.  
  50. v2f vert(appdata v)
  51. {
  52. v2f o;
  53.  
  54. o.vertex = UnityObjectToClipPos(v.vertex);
  55. o.uv = v.uv;
  56. o.color = v.color * _Color;
  57.  
  58. return o;
  59. }
  60.  
  61. float4 frag(v2f i) : SV_Target
  62. {
  63.  
  64. fixed4 col = tex2D(_MainTex,i.uv) * i.color;
  65. col.rgb *= col.a;
  66. return col;
  67. }
  68. ENDCG
  69. }
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement