这里写自定义目录标题
#Unity改变物体的透明度
unity2018.2.17f1版本
透明shader
// Upgrade NOTE: replaced ‘_Object2World’ with ‘unity_ObjectToWorld’
Shader “Unity/04-AlphaBlendBothSide” {
Properties{
_Color(“Color”, Color) = (1,1,1,1)
_MainTex(“MainTex”, 2D) = “white” {}
_AlphaScale(“Alpha Scale”, Range(0, 1)) = 1
}
SubShader{
Tags{ “Queue” = “Transparent” “IngnoreProjector” = “True” “RenderType” = “Transparent” }
LOD 200
Pass{
Tags{ “LightMode” = “ForwardBase” }
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include “Lighting.cginc”
fixed4 _Color;
sampler2D _MainTex;
float4 _MainTex_ST;
fixed _AlphaScale;
struct a2v {
float4 vertex : POSITION;
float4 normal : NORMAL;
float4 texcoord : TEXCOORD0;
};
struct v2f {
float4 position