Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Unlit/EyeBeacon"
- {
- Properties
- {
- }
- SubShader
- {
- //Tags {"RenderType"="Transparent" "Queue"="Transparent"}
- Tags {
- "RenderType"="Opaque"
- "Queue"="Geometry"
- }
- Cull Off
- Blend One One
- Pass
- {
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
- // make fog work
- #pragma multi_compile_fog
- #include "UnityCG.cginc"
- struct appdata
- {
- float4 vertex : POSITION;
- float2 uv : TEXCOORD0;
- float4 color : COLOR;
- };
- struct v2f
- {
- float2 uv : TEXCOORD0;
- UNITY_FOG_COORDS(1)
- float4 vertex : SV_POSITION;
- float4 color : COLOR;
- };
- v2f vert (appdata v)
- {
- v2f o;
- o.vertex = v.vertex;
- o.color = v.color;
- o.uv = v.uv;
- UNITY_TRANSFER_FOG(o,o.vertex);
- return o;
- }
- fixed4 frag (v2f i) : SV_Target
- {
- fixed4 col = i.color;
- col.a = i.color.r;
- return col;
- }
- ENDCG
- }
- }
- Fallback "Diffuse"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement