[오전 11:15:06] Dustin Lee: Shader “Custom/NewShader2” {
Properties {
_MainTex (“Base (RGB)”, 2D) = “white” {}
}
SubShader {
Tags { “RenderType”=“Opaque” }
LOD 200
GrabPass {
Name “PREPASS”
Tags { “LightMode” = “PrePassFinal” }
}
CGPROGRAM
#pragma surface surf Lambert
sampler2D _MainTex;
sampler2D _GrabTexture;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
half4 d = tex2D (_GrabTexture, IN.uv_MainTex);
//o.Albedo = c.rgb;
o.Alpha = c.a;
o.Albedo = d.rgb;
}
ENDCG
}
FallBack “Diffuse”
}
다음 할 일 .
일반 패스 {}
서피스 셰이더
이 구조가 가동되는지 테스트 해 보자. 스승님은 되는 걸로 알고 있다고 …