UnsupportedAreaShader.shader 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // /******************************************************************************
  2. // * File: UnsupportedAreaShader.shader
  3. // * Copyright (c) 2022 Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.
  4. // *
  5. // * Confidential and Proprietary - Qualcomm Technologies, Inc.
  6. // *
  7. // ******************************************************************************/
  8. Shader "Qualcomm/UnsupportedAreaShader"
  9. {
  10. Properties
  11. {
  12. _MainTex ("Texture", 2D) = "white" {}
  13. _Alpha ("Main Alpha", Range(0,1)) = 1
  14. }
  15. SubShader
  16. {
  17. Tags
  18. {
  19. "RenderType"="Opaque" "Queue"="Transparent"
  20. }
  21. LOD 100
  22. Pass
  23. {
  24. Blend SrcAlpha OneMinusSrcAlpha
  25. ZWrite On
  26. ZTest Always
  27. CGPROGRAM
  28. #include "UnityCG.cginc"
  29. #pragma vertex vert
  30. #pragma fragment frag
  31. #pragma multi_compile_fog
  32. sampler2D _MainTex;
  33. float4 _MainTex_ST;
  34. float _Alpha;
  35. struct appdata
  36. {
  37. float4 vertex : POSITION;
  38. float2 uv : TEXCOORD0;
  39. };
  40. struct v2f
  41. {
  42. float4 vertex : SV_POSITION;
  43. float2 uv : TEXCOORD0;
  44. };
  45. float _TimeScale;
  46. v2f vert(appdata v)
  47. {
  48. v2f o;
  49. UNITY_INITIALIZE_OUTPUT(v2f, o);
  50. o.vertex = UnityObjectToClipPos(v.vertex);
  51. o.uv = TRANSFORM_TEX(v.uv, _MainTex);
  52. return o;
  53. }
  54. fixed4 frag(v2f i) : SV_Target
  55. {
  56. fixed4 col = tex2D(_MainTex, i.uv);
  57. col.a *= _Alpha;
  58. return col;
  59. }
  60. ENDCG
  61. }
  62. }
  63. }