ShowSkeleton.shader 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Shader "Hidden/ShowSkeleton"
  2. {
  3. Properties
  4. {
  5. _Color("Color", Color) = (1,1,1,1)
  6. }
  7. SubShader
  8. {
  9. Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
  10. Pass
  11. {
  12. ZWrite Off
  13. ZTest Off
  14. Cull Off
  15. CGPROGRAM
  16. #pragma vertex vert
  17. #pragma fragment frag
  18. #pragma target 2.0
  19. #pragma multi_compile _ UNITY_SINGLE_PASS_STEREO STEREO_INSTANCING_ON STEREO_MULTIVIEW_ON
  20. #include "UnityCG.cginc"
  21. struct appdata_t {
  22. float4 vertex : POSITION;
  23. float4 color : COLOR;
  24. UNITY_VERTEX_INPUT_INSTANCE_ID
  25. };
  26. struct v2f {
  27. fixed4 color : COLOR;
  28. float4 vertex : SV_POSITION;
  29. UNITY_VERTEX_OUTPUT_STEREO
  30. };
  31. float4 _Color;
  32. v2f vert(appdata_t v)
  33. {
  34. v2f o;
  35. UNITY_SETUP_INSTANCE_ID(v);
  36. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  37. o.vertex = UnityObjectToClipPos(v.vertex);
  38. o.color = v.color * _Color;
  39. return o;
  40. }
  41. fixed4 frag(v2f i) : SV_Target
  42. {
  43. return i.color;
  44. }
  45. ENDCG
  46. }
  47. }
  48. }