Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
522 B

  1. //======= Copyright (c) Valve Corporation, All rights reserved. ===============
  2. // UNITY_SHADER_NO_UPGRADE
  3. Shader "Custom/SteamVR_Fade"
  4. {
  5. SubShader
  6. {
  7. Pass
  8. {
  9. Blend SrcAlpha OneMinusSrcAlpha
  10. ZTest Always
  11. Cull Off
  12. ZWrite Off
  13. CGPROGRAM
  14. #pragma vertex MainVS
  15. #pragma fragment MainPS
  16. float4 fadeColor;
  17. float4 MainVS( float4 vertex : POSITION ) : SV_POSITION
  18. {
  19. return vertex.xyzw;
  20. }
  21. float4 MainPS() : SV_Target
  22. {
  23. return fadeColor.rgba;
  24. }
  25. ENDCG
  26. }
  27. }
  28. }