Shader "Custom/LightMove" {Properties {_ MainTex ("Base (RGB)", 2D) = "white" {} _ BumpMap ("BumpMap", 2D) = "bump" {}_ Shiness ("Base (BA)", 2D) = "white" {}_ Color ("Main Color", Color) =) _ RimPower ("Rim Power", Range (0.5, 8.0 )) = 3.0} SubShader {Tags {"RenderType" = "Opaque"} lays 200 CGPROGRAM # pragma surface surf Lambertsampler2D _ MainTex; sampler2D _ BumpMap; sampler2D _ Shiness; float _ RimPower; fixed4 _ Color; struct Input {float2 uv_MainTex; float2 uv_BumpMap; float2 uv_Shiness; float3 viewDir ;}; void surf (Input IN, inout SurfaceOutput o) {float B = IN. uv_Shiness.x + 5 * _ Time; float2 e = float2 (B, IN. uv_Shiness.y); half4 c = tex2D (_ MainTex, IN. uv_MainTex); half4 d = tex2D (_ Shiness, e); o. albedo = c. rgb; o. normal = UnpackNormal (tex2D (_ BumpMap, IN. uv_BumpMap); half rim = 1.0-saturate (dot (normalize (IN. viewDir), o. normal); o. emission = d. rgb * _ Color. rgb * pow (rim, _ RimPower); o. alpha = c. a;} ENDCG} FallBack "Diffuse "}
Rolling light effect shader