OVRMRClipPlane.shader 760 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Shader "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. Pass
  13. {
  14. CGPROGRAM
  15. #pragma vertex vert
  16. #pragma fragment frag
  17. #include "UnityCG.cginc"
  18. struct appdata
  19. {
  20. float4 vertex : POSITION;
  21. };
  22. struct v2f
  23. {
  24. float4 vertex : SV_POSITION;
  25. };
  26. fixed4 _Color;
  27. fixed _Visible;
  28. v2f vert (appdata v)
  29. {
  30. v2f o;
  31. o.vertex = UnityObjectToClipPos(v.vertex);
  32. o.vertex *= _Visible;
  33. return o;
  34. }
  35. fixed4 frag (v2f i) : SV_Target
  36. {
  37. fixed4 col = _Color;
  38. return col;
  39. }
  40. ENDCG
  41. }
  42. }
  43. }