Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- Properties
- {
- [PerRendererData]_MainTex("Texture", 2D) = "white" {}
- _Color("Tint", Color) = (1,1,1,1)
- }
- SubShader
- {
- Tags
- {
- "Queue" = "Transparent"
- "IgnoreProjector" = "True"
- "RenderType" = "Transparent"
- "PreviewType" = "Plane"
- "CanUseSpriteAtlas" = "True"
- }
- Pass
- {
- Cull Off
- Lighting Off
- ZWrite Off
- Blend One OneMinusSrcAlpha
- ZTest Always
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
- #include "UnityCG.cginc"
- struct appdata
- {
- float4 vertex : POSITION;
- float2 uv : TEXCOORD0;
- float4 color : COLOR;
- };
- struct v2f
- {
- float4 vertex : SV_POSITION;
- float2 uv : TEXCOORD0;
- float4 color : COLOR;
- };
- sampler2D _MainTex;
- sampler2D_float _CameraDepthTexture;
- float _Magnitude;
- float4 _Color;
- v2f vert(appdata v)
- {
- v2f o;
- o.vertex = UnityObjectToClipPos(v.vertex);
- o.uv = v.uv;
- o.color = v.color * _Color;
- return o;
- }
- float4 frag(v2f i) : SV_Target
- {
- fixed4 col = tex2D(_MainTex,i.uv) * i.color;
- col.rgb *= col.a;
- return col;
- }
- ENDCG
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement