| 1 | Shader "Oculus/Unlit" { |
| 2 | Properties{ |
| 3 | _Color("Main Color", Color) = (1,1,1,1) |
| 4 | } |
| 5 | |
| 6 | SubShader{ |
| 7 | Tags{ "RenderType" = "Opaque" } |
| 8 | LOD 100 |
| 9 | |
| 10 | Pass{ |
| 11 | CGPROGRAM |
| 12 | #pragma vertex vert |
| 13 | #pragma fragment frag |
| 14 | #pragma target 2.0 |
| 15 | #pragma multi_compile_fog |
| 16 | |
| 17 | #include "UnityCG.cginc" |
| 18 | |
| 19 | struct appdata_t { |
| 20 | float4 vertex : POSITION; |
| 21 | }; |
| 22 | |
| 23 | struct v2f { |
| 24 | float4 vertex : SV_POSITION; |
| 25 | UNITY_FOG_COORDS(0) |
| 26 | }; |
| 27 | |
| 28 | fixed4 _Color; |
| 29 | |
| 30 | v2f vert(appdata_t v) |
| 31 | { |
| 32 | v2f o; |
| 33 | o.vertex = UnityObjectToClipPos(v.vertex); |
| 34 | UNITY_TRANSFER_FOG(o,o.vertex); |
| 35 | return o; |
| 36 | } |
| 37 | |
| 38 | fixed4 frag(v2f i) : COLOR |
| 39 | { |
| 40 | fixed4 col = _Color; |
| 41 | UNITY_APPLY_FOG(i.fogCoord, col); |
| 42 | UNITY_OPAQUE_ALPHA(col.a); |
| 43 | return col; |
| 44 | } |
| 45 | ENDCG |
| 46 | } |
| 47 | } |
| 48 | } |