Shader "Custom/16-3"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType" = "Transparent" "Queue" = "Transparent"}
cull off
CGPROGRAM
#pragma surface surf Lambert alpha:fade
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"
Fallback "Legacy Shaders/Transparent/VertexLit"
}
풀 같은 자연물은 Transparent보다는 주로 AlphaTest(Cutout)쉐이더를 사용
'Shader > Shader - SurfaceShader' 카테고리의 다른 글
18-1-2Pass Alpha (0) | 2020.04.15 |
---|---|
17-1알파블렌딩 (0) | 2020.04.15 |
16-2-1깊이버퍼 출력 (0) | 2020.04.08 |
15-3-MaskMap (0) | 2020.04.08 |
Custom/15-1-Reflection (0) | 2020.04.07 |