Shader "Custom/17-1"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex("Texture", 2D) = "white" {}
_Cutoff("Alpha cutoff", Range(0, 1)) = 0.5
}
SubShader
{
Tags { "RenderType" = "Transparent" "Queue" = "Transparent"}
zwrite off
blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma surface surf Lambert keepalpha
struct Input
{
float2 uv_MainTex;
};
sampler2D _MainTex;
void surf(Input IN, inout SurfaceOutput o)
{
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Diffuse"
}
'Shader > Shader - SurfaceShader' 카테고리의 다른 글
18-2 (0) | 2020.04.15 |
---|---|
18-1-2Pass Alpha (0) | 2020.04.15 |
16-3-알파블렌딩 (0) | 2020.04.08 |
16-2-1깊이버퍼 출력 (0) | 2020.04.08 |
15-3-MaskMap (0) | 2020.04.08 |