1
0

SteamVR_ClearAll.shader 846 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //======= Copyright (c) Valve Corporation, All rights reserved. ===============
  2. // UNITY_SHADER_NO_UPGRADE
  3. Shader "Custom/SteamVR_ClearAll" {
  4. Properties
  5. {
  6. _Color ("Color", Color) = (0, 0, 0, 0)
  7. _MainTex ("Base (RGB)", 2D) = "white" {}
  8. }
  9. CGINCLUDE
  10. #include "UnityCG.cginc"
  11. float4 _Color;
  12. sampler2D _MainTex;
  13. struct v2f {
  14. float4 pos : SV_POSITION;
  15. float2 tex : TEXCOORD0;
  16. };
  17. v2f vert(appdata_base v) {
  18. v2f o;
  19. #if UNITY_VERSION >= 540
  20. o.pos = UnityObjectToClipPos(v.vertex);
  21. #else
  22. o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
  23. #endif
  24. o.tex = v.texcoord;
  25. return o;
  26. }
  27. float4 frag(v2f i) : COLOR {
  28. return _Color;
  29. }
  30. ENDCG
  31. SubShader {
  32. Tags{ "Queue" = "Background" }
  33. Pass {
  34. ZTest Always Cull Off ZWrite On
  35. Fog { Mode Off }
  36. CGPROGRAM
  37. #pragma vertex vert
  38. #pragma fragment frag
  39. ENDCG
  40. }
  41. }
  42. }