outAlpha.shader 733 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Shader "Nreal/AlphaBlendEffect" {
  2. Properties{
  3. _MainTex("Base (RGB)", 2D) = "white" {}
  4. _RGBTex("Base (RGB)", 2D) = "white" {}
  5. }
  6. SubShader{
  7. Pass{
  8. ZTest Always Cull Off ZWrite Off
  9. CGPROGRAM
  10. #pragma vertex vert
  11. #pragma fragment frag
  12. #include "UnityCG.cginc"
  13. sampler2D _MainTex;
  14. sampler2D _RGBTex;
  15. struct v2f {
  16. float4 pos : SV_POSITION;
  17. half2 uv: TEXCOORD0;
  18. };
  19. v2f vert(appdata_img v) {
  20. v2f o;
  21. o.pos = UnityObjectToClipPos(v.vertex);
  22. o.uv = v.texcoord;
  23. return o;
  24. }
  25. fixed4 frag(v2f i) : SV_Target{
  26. fixed4 renderTex = tex2D(_MainTex, i.uv);
  27. return fixed4(renderTex.a, renderTex.a, renderTex.a, renderTex.a);
  28. }
  29. ENDCG
  30. }
  31. }
  32. Fallback Off
  33. }