Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. Shader "Unlit/EyeBeacon"
  2. {
  3. Properties
  4. {
  5. }
  6. SubShader
  7. {
  8. //Tags {"RenderType"="Transparent" "Queue"="Transparent"}
  9. Tags {
  10. "RenderType"="Opaque"
  11. "Queue"="Geometry"
  12. }
  13. Cull Off
  14. Blend One One
  15.  
  16. Pass
  17. {
  18. CGPROGRAM
  19. #pragma vertex vert
  20. #pragma fragment frag
  21. // make fog work
  22. #pragma multi_compile_fog
  23.  
  24. #include "UnityCG.cginc"
  25.  
  26. struct appdata
  27. {
  28. float4 vertex : POSITION;
  29. float2 uv : TEXCOORD0;
  30. float4 color : COLOR;
  31. };
  32.  
  33. struct v2f
  34. {
  35. float2 uv : TEXCOORD0;
  36. UNITY_FOG_COORDS(1)
  37. float4 vertex : SV_POSITION;
  38. float4 color : COLOR;
  39. };
  40.  
  41. v2f vert (appdata v)
  42. {
  43. v2f o;
  44. o.vertex = v.vertex;
  45. o.color = v.color;
  46. o.uv = v.uv;
  47. UNITY_TRANSFER_FOG(o,o.vertex);
  48. return o;
  49. }
  50.  
  51. fixed4 frag (v2f i) : SV_Target
  52. {
  53. fixed4 col = i.color;
  54. col.a = i.color.r;
  55. return col;
  56. }
  57. ENDCG
  58. }
  59. }
  60. Fallback "Diffuse"
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement