Shader "Custom/EmissiveLaser" { Properties { _MainTex ("Texture", 2D) = "white" {} _Color("Tint Color", Color) = (1, 0, 0, 1) _Emission("Emission Strength", Float) = 5.0 _ScrollSpeed("Scroll Speed", Float) = 1.0 } SubShader { Tags { "Queue"="Transparent" "RenderType"="Transparent" } LOD 100 Blend One One // Additive blending ZWrite Off Cull Off Lighting Off Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" sampler2D _MainTex; float4 _Color; float _Emission; float _ScrollSpeed; float4 _MainTex_ST; struct appdata { float4 vertex : POSITION; float2 uv : TEXCOORD0; }; struct v2f { float2 uv : TEXCOORD0; float4 vertex : SV_POSITION; }; v2f vert(appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); float scroll = _Time.y * _ScrollSpeed; o.uv = TRANSFORM_TEX(v.uv, _MainTex) + float2(scroll, 0); return o; } fixed4 frag(v2f i) : SV_Target { fixed4 tex = tex2D(_MainTex, i.uv); return tex * _Color * _Emission; } ENDCG } } }