UnityShader 广告牌效果+透明度测试阴影
代码:
Shader"test"{
Properties{
_MainTex("Main Tex",2D)="white"{
}
_VerticalBillboarding("Vertical Restraints",Range(0,1))=1
}
SubShader{
Tags{
"Queue" = "Transparent" "IgnoreProject" = "True" "RenderType" = "Transparent" "DisableBatching" = "True"}
Pass{
Tags{
"LightMode" = "ForwardBase" }
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
cull Off
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert
#pragma fragment frag
sampler2D _MainTex;
float4 _MainTex_ST;
float _VerticalBillboarding;
struct v2f{
float4 pos:SV_POSITION;
float2 uv:TEXCOORD0;
};
v2f vert(appdata_full v){
v2f o;
o