SubShader
{
Tags { "RenderType"="Opaque" }
Cull front
LOD 200
CGPROGRAM
#pragma surface surf Lambert vertex:vert noshadow
sampler2D _MainTex;
void vert(inout appdata_full v) {
v.vertex.xyz = v.vertex.xyz + (v.normal.xyz * 0.01);
}
struct Input
{
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o)
{
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = c.a;
}
float4 Lighting_NoLight(SurfaceOutput s, float3 lightDir, float atten) {
return float4(0, 0, 0, 1);
}
ENDCG
Cull Back
CGPROGRAM
#pragma surface surf Standard fullforwardshadows
#pragma target 3.0
sampler2D _MainTex;
struct Input
{
float2 uv_MainTex;
};
void surf(Input IN, inout SurfaceOutputStandard o)
{
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Diffuse"
}
반응형
'산대특 > 게임 그래픽 프로그래밍' 카테고리의 다른 글
[LearnShader] 프레넬을 사용해서 1Pass로 외곽선 만들기 (0) | 2024.02.21 |
---|---|
[LearnShader] NPR 렌더링 - 외곽선의 두께와 색깔을 조절해보기 (0) | 2024.02.21 |
[LearnShader] 스켈레톤에 버텍스 컬러 및 홀로그램 적용 연습해보기 (0) | 2024.02.21 |
[LearnShader] 홀로그램 만들어보기 (0) | 2024.02.20 |
[LearnShader] NormalMap 적용해보기 (0) | 2024.02.19 |