unity standard shader transparency code example
Example: unity add transparency to shader
Shader "<Name>"
{
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_Color ("Color (RGBA)", Color) = (1, 1, 1, 1)
}
SubShader
{
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Lighting On
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
Cull front
LOD 100
Pass
{
CGPROGRAM
#pragma vertex vert alpha
#pragma fragment frag alpha
#include "UnityCG.cginc"
.
.
.
.
}
ENDCG
}
}