Hidden-Spine-Bones.shader 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Shader "Hidden/Spine/Bones" {
  2. Properties {
  3. _Color ("Color", Color) = (0.5,0.5,0.5,0.5)
  4. _MainTex ("Particle Texture", 2D) = "white" {}
  5. }
  6. Category {
  7. Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
  8. Blend SrcAlpha OneMinusSrcAlpha
  9. AlphaTest Greater .01
  10. ColorMask RGB
  11. Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off }
  12. SubShader {
  13. Pass {
  14. CGPROGRAM
  15. #pragma vertex vert
  16. #pragma fragment frag
  17. // #pragma multi_compile_particles
  18. #include "UnityCG.cginc"
  19. sampler2D _MainTex;
  20. fixed4 _Color;
  21. struct appdata_t {
  22. float4 vertex : POSITION;
  23. fixed4 color : COLOR;
  24. float2 texcoord : TEXCOORD0;
  25. };
  26. struct v2f {
  27. float4 vertex : SV_POSITION;
  28. fixed4 color : COLOR;
  29. float2 texcoord : TEXCOORD0;
  30. // #ifdef SOFTPARTICLES_ON
  31. // float4 projPos : TEXCOORD1;
  32. // #endif
  33. };
  34. float4 _MainTex_ST;
  35. v2f vert (appdata_t v) {
  36. v2f o;
  37. o.vertex = UnityObjectToClipPos(v.vertex);
  38. // #ifdef SOFTPARTICLES_ON
  39. // o.projPos = ComputeScreenPos (o.vertex);
  40. // COMPUTE_EYEDEPTH(o.projPos.z);
  41. // #endif
  42. o.color = v.color;
  43. o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
  44. return o;
  45. }
  46. sampler2D_float _CameraDepthTexture;
  47. fixed4 frag (v2f i) : SV_Target {
  48. return i.color * _Color * tex2D(_MainTex, i.texcoord);
  49. }
  50. ENDCG
  51. }
  52. }
  53. }
  54. }