Shader \"Custom\/Particles\/Alpha Crunch - Alpha Blended\" {
\n\tProperties{
\n\t\t_MainTex(\"Grayscale Texture\", 2D) = \"white\" {}
\n\t}<\/p>\n\tCategory{
\n\t\tTags { \"Queue\" = \"Transparent\" \"IgnoreProjector\" = \"True\" \"RenderType\" = \"Transparent\" \"PreviewType\" = \"Plane\" }
\n\t\tBlend SrcAlpha OneMinusSrcAlpha \/\/ Alpha Blended
\n\t\tColorMask RGB
\n\t\tCull Off Lighting Off ZWrite Off<\/p>\n
\t\tSubShader {
\n\t\t\tPass {<\/p>\n
\t\t\t\tCGPROGRAM
\n\t\t\t\t#pragma vertex vert
\n\t\t\t\t#pragma fragment frag
\n\t\t\t\t#pragma target 2.0
\n\t\t\t\t#pragma multi_compile_particles
\n\t\t\t\t#pragma multi_compile_fog<\/p>\n
\t\t\t\t#include \"UnityCG.cginc\"<\/p>\n
\t\t\t\tsampler2D _MainTex;
\n\t\t\t\tfixed4 _TintColor;<\/p>\n
\t\t\t\tstruct appdata_t {
\n\t\t\t\t\tfloat4 vertex : POSITION;
\n\t\t\t\t\tfixed4 color : COLOR;
\n\t\t\t\t\tfloat4 texcoord : TEXCOORD0;
\n\t\t\t\t\tUNITY_VERTEX_INPUT_INSTANCE_ID
\n\t\t\t\t};<\/p>\n
\t\t\t\tstruct v2f {
\n\t\t\t\t\tfloat4 vertex : SV_POSITION;
\n\t\t\t\t\tfixed4 color : COLOR;
\n\t\t\t\t\tfloat2 texcoord : TEXCOORD0;
\n\t\t\t\t\tfloat2 texcoord2 : TEXCOORD1;
\n\t\t\t\t\tUNITY_FOG_COORDS(1)
\n\t\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO
\n\t\t\t\t};<\/p>\n
\t\t\t\tfloat4 _MainTex_ST;<\/p>\n
\t\t\t\tv2f vert(appdata_t v)
\n\t\t\t\t{
\n\t\t\t\t\tv2f o;
\n\t\t\t\t\tUNITY_SETUP_INSTANCE_ID(v);
\n\t\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
\n\t\t\t\t\to.vertex = UnityObjectToClipPos(v.vertex);
\n\t\t\t\t\to.color = v.color;
\n\t\t\t\t\to.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
\n\t\t\t\t\to.texcoord2.xy = v.texcoord.zw; \/\/ Copy TEXCOORD0.zw
\n\t\t\t\t\tUNITY_TRANSFER_FOG(o,o.vertex);
\n\t\t\t\t\treturn o;
\n\t\t\t\t}<\/p>\n
\t\t\t\tfixed4 frag(v2f i) : SV_Target
\n\t\t\t\t{
\n\t\t\t\t\tfixed4 texColor = i.color * tex2D(_MainTex, i.texcoord);
\n\t\t\t\t\tfixed4 col = i.color * step(i.texcoord2.x, texColor.r);
\n\t\t\t\t\tcol.rgb *= col.a;
\n\t\t\t\t\tUNITY_APPLY_FOG_COLOR(i.fogCoord, col, fixed4(0,0,0,0)); \/\/ fog towards black due to our blend mode
\n\t\t\t\t\treturn col;
\n\t\t\t\t}
\n\t\t\t\tENDCG
\n\t\t\t}
\n\t\t}
\n\t}
\n}<\/code><\/p>\n