学习100个Unity Shader (15) ---透明+双面渲染
Shader "Example/AlphaBlendBothSided"
{
Properties
{
_Color ("Main Tint", Color) = (1, 1, 1, 1)
_MainTex ("Texture", 2D) = "white" {}
_AlphaScale ("Alpha Scale", Range(0, 1)) = 1
}
SubShader
{
Tags {"Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent"}
// Pass的先后顺序有影响
//渲染后面
Pass
{
Tags{"LightMode" = "ForwardBase"}
Cull Front
同透明图混合
}
//渲染前面
Pass
{
Tags{"LightMode" = "ForwardBase"}
Cull Back
同透明图混合
}
}
Fallback "Transparent/VertexLit"
}