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.

68 lines
1.7 KiB

  1. /************************************************************************************
  2. Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
  3. See SampleFramework license.txt for license terms. Unless required by applicable law
  4. or agreed to in writing, the sample code is provided “AS IS” WITHOUT WARRANTIES OR
  5. CONDITIONS OF ANY KIND, either express or implied. See the license for specific
  6. language governing permissions and limitations under the license.
  7. ************************************************************************************/
  8. Shader "Oculus Sample/Xing Light"
  9. {
  10. Properties
  11. {
  12. _MainTex("Base (RGB) Alpha (A)", 2D) = "white" {}
  13. _Color("Tint Color", Color) = (0.5, 0.5, 0.5, 0.5)
  14. }
  15. SubShader
  16. {
  17. Tags{"Queue" = "Transparent" "RenderType" = "Transparent"
  18. "IgnoreProjector" = "True" "PreviewType" = "Plane"}
  19. LOD 100
  20. Blend SrcAlpha OneMinusSrcAlpha
  21. Cull Back
  22. Lighting Off
  23. ZWrite Off
  24. Pass
  25. {
  26. CGPROGRAM
  27. #pragma vertex vert
  28. #pragma fragment frag
  29. #include "UnityCG.cginc"
  30. struct appdata
  31. {
  32. float4 vertex : POSITION;
  33. float2 uv : TEXCOORD0;
  34. };
  35. struct v2f
  36. {
  37. float4 vertex : SV_POSITION;
  38. float2 uv : TEXCOORD0;
  39. };
  40. fixed4 _Color;
  41. sampler2D _MainTex;
  42. float4 _MainTex_ST;
  43. v2f vert (appdata v)
  44. {
  45. v2f o;
  46. o.vertex = UnityObjectToClipPos(v.vertex);
  47. o.uv = TRANSFORM_TEX(v.uv, _MainTex);
  48. return o;
  49. }
  50. fixed4 frag (v2f i) : SV_Target
  51. {
  52. return _Color * tex2D(_MainTex, i.uv);
  53. }
  54. ENDCG
  55. }
  56. }
  57. }