Shader "Custom/alpha3"// 눈 깜빡이게
{
Properties
{
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_MaskTex ("Mask", 2D) = "white" {}
_RampTex("Ram",2D) ="white"{}
}
SubShader
{
Tags { "RenderType"="Opaque" }
CGPROGRAM
#pragma surface surf Lambert
#pragma target 3.0
sampler2D _MainTex;
sampler2D _MaskTex;
sampler2D _RampTex;
struct Input
{
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o)
{
fixed4 c = tex2D (_MainTex, IN.uv_MainTex);
float4 mask = tex2D (_MaskTex, IN.uv_MainTex);
float4 ramp = tex2D (_RampTex, float2(_Time.y,0.5));
o.Albedo =c.rgb;
o.Emission = c.rgb *mask.g*ramp.r;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Diffuse"
}
'게임개발 > 게임 그래픽 프로그래밍' 카테고리의 다른 글
Alphatest addshadow (0) | 2024.02.26 |
---|---|
Dissove (0) | 2024.02.23 |
Hologram Alpha blend (0) | 2024.02.23 |
Alphatest_Cutoff (0) | 2024.02.23 |
Cubemap Reflection 2 (0) | 2024.02.23 |