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.

47 lines
760 B

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