Note.shader 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. Shader "DashGame/PlazaRoomStar"
  2. {
  3. Properties
  4. {
  5. _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
  6. _MainTex ("Particle Texture", 2D) = "white" {}
  7. _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
  8. }
  9. Category
  10. {
  11. Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
  12. Blend SrcAlpha OneMinusSrcAlpha
  13. Lighting Off
  14. ZWrite Off
  15. SubShader
  16. {
  17. Pass
  18. {
  19. CGPROGRAM
  20. #pragma vertex vert
  21. #pragma fragment frag
  22. #pragma target 2.0
  23. #include "UnityCG.cginc"
  24. sampler2D _MainTex;
  25. fixed4 _TintColor;
  26. struct appdata_t
  27. {
  28. float4 vertex : POSITION;
  29. fixed4 color : COLOR;
  30. float2 texcoord : TEXCOORD0;
  31. };
  32. struct v2f
  33. {
  34. float4 vertex : SV_POSITION;
  35. fixed4 color : COLOR;
  36. float2 texcoord : TEXCOORD0;
  37. };
  38. float4 _MainTex_ST;
  39. v2f vert (appdata_t v)
  40. {
  41. v2f o;
  42. o.vertex = UnityObjectToClipPos(v.vertex);
  43. o.color = v.color;
  44. o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
  45. return o;
  46. }
  47. fixed4 frag (v2f i) : SV_Target
  48. {
  49. fixed4 col = 2 * i.color * _TintColor * tex2D(_MainTex, i.texcoord);
  50. return col;
  51. }
  52. ENDCG
  53. }
  54. }
  55. }
  56. }