Shader "Custom/blink"
{
Properties
{
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_MaskTex("Albedo (RGB)", 2D) = "white" {}
_RampTex("Ramp Texture",2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Standard fullforwardshadows
#pragma target 3.0
sampler2D _MainTex;
sampler2D _MaskTex;
sampler2D _RampTex;
struct Input
{
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutputStandard o)
{
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
float4 maskColor = tex2D(_MaskTex, IN.uv_MainTex);
float4 rampColor = tex2D(_RampTex, float2(_Time.y,0.5));
o.Albedo = c.rgb;
o.Emission = c.rgb * maskColor.g * rampColor.r;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Diffuse"
}
3. blink (Shader)
반응형
'산대특 > 게임 그래픽 프로그래밍' 카테고리의 다른 글
[LearnUGUI] 흔들리는 Water Shader(물 쉐이더) 만들기 (0) | 2024.02.26 |
---|---|
[LearnShader] 알파 블렌드(Alpha blend) (0) | 2024.02.23 |
[LearnShader] 프레넬을 사용해서 1Pass로 외곽선 만들기 (0) | 2024.02.21 |
[LearnShader] NPR 렌더링 - 외곽선의 두께와 색깔을 조절해보기 (0) | 2024.02.21 |
[LearnShader] NPR 렌더링 - 2Pass로 외곽선 그리기 (0) | 2024.02.21 |