SpriteBitmask.shader 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Shader "Hidden/2D-Animation-SpriteBitmask"
  2. {
  3. Properties
  4. {
  5. _MainTex("Sprite Texture", 2D) = "white" {}
  6. }
  7. SubShader
  8. {
  9. Tags
  10. {
  11. "Queue" = "Transparent"
  12. "IgnoreProjector" = "True"
  13. "RenderType" = "Opaque"
  14. "PreviewType" = "Plane"
  15. }
  16. Cull Off
  17. Lighting Off
  18. ZWrite Off
  19. Blend Off
  20. ColorMask A
  21. Pass
  22. {
  23. CGPROGRAM
  24. #pragma vertex vert
  25. #pragma fragment frag
  26. #include "UnityCG.cginc"
  27. struct appdata_t
  28. {
  29. float4 vertex : POSITION;
  30. };
  31. struct v2f
  32. {
  33. float4 vertex : SV_POSITION;
  34. };
  35. v2f vert(appdata_t IN)
  36. {
  37. v2f OUT;
  38. OUT.vertex = UnityObjectToClipPos(IN.vertex);
  39. return OUT;
  40. }
  41. fixed4 frag(v2f IN) : SV_Target
  42. {
  43. return 1;
  44. }
  45. ENDCG
  46. }
  47. }
  48. }