Shader "xuhaitao/Transparent/Bumped Diffuse" {
Properties {
_Color ("Main Colorrr", Color) = (1,1,1,1)
_xxx ("Base (RGB) Trans (A)", 2D) = "white" {}
_BumpMap ("Normalmap", 2D) = "bump" {}
}
SubShader {
Tags {"Queue"="transparent" "IgnoreProjector"="true" "RenderType"="hunkxu"}
LOD 300
CGPROGRAM
#pragma surface surf Lambert alpha
sampler2D _xxx;
sampler2D _BumpMap;
fixed4 _Color;
struct Input {
float2 uv_xxx;
float2 uv_BumpMap;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_xxx, IN.uv_xxx) * _Color;
o.Albedo = c.rgb;
o.Alpha = c.a;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
}
ENDCG
}
FallBack "Transparent/Diffuse"
}
SetReplacementShader(A ,”“) ; 将场景中所有用到的材质的shader类型改成A
SetReplacementShader(A ,”RenderType”) ; 场景中Shader的RenderType数值如和srA中的RenderType值相等,则使用A渲染,否则就不渲染
总结:
这个标签值可以自己任意定义
如果不使用替代渲染,就可以完全忽略这个参数
FR:海涛高软(hunk Xu)