BlueGit

blue-star ggj-2020

Files

ggj-2020 / Assets / Oculus / VR / Resources / OVRMRClipPlane.shader

OVRMRClipPlane.shader

Project Import
timfa Tim Falken · pushed by timfa · 6 years ago
b77834a1 History
OVRMRClipPlane.shader 710 B Download Raw
1Shader "Oculus/OVRMRClipPlane"
2{
3 Properties
4 {
5 _Color("Chroma Key Color", Color) = (0,1,0,1)
6 _Visible("Visible", Range(0.0,1.0)) = 1.0
7 }
8 SubShader
9 {
10 Tags { "RenderType"="Opaque" }
11 LOD 100
12
13 Pass
14 {
15 CGPROGRAM
16 #pragma vertex vert
17 #pragma fragment frag
18
19 #include "UnityCG.cginc"
20
21 struct appdata
22 {
23 float4 vertex : POSITION;
24 };
25
26 struct v2f
27 {
28 float4 vertex : SV_POSITION;
29 };
30
31 fixed4 _Color;
32 fixed _Visible;
33
34 v2f vert (appdata v)
35 {
36 v2f o;
37 o.vertex = UnityObjectToClipPos(v.vertex);
38 o.vertex *= _Visible;
39 return o;
40 }
41
42 fixed4 frag (v2f i) : SV_Target
43 {
44 fixed4 col = _Color;
45 return col;
46 }
47 ENDCG
48 }
49 }
50}