-
Notifications
You must be signed in to change notification settings - Fork 6
/
Ambient.shader
36 lines (32 loc) · 919 Bytes
/
Ambient.shader
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Shader "BASICxSHADER/Lighting/Ambient" {
SubShader {
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
// Vertex Input
struct appdata {
float4 vertex : POSITION;
};
// Vertex to Fragment
struct v2f {
float4 pos : SV_POSITION;
};
//------------------------------------------------------------------------
// Vertex Shader
//------------------------------------------------------------------------
v2f vert(appdata v) {
v2f o;
o.pos = UnityObjectToClipPos(v.vertex);
return o;
}
//------------------------------------------------------------------------
// Fragment Shader
//------------------------------------------------------------------------
fixed4 frag(v2f i) : SV_Target {
return UNITY_LIGHTMODEL_AMBIENT;
}
ENDCG
}
}
}