Shader "Custom/YokoMieru" { Properties { _MainTex("texture", 2D) = "white" {} _T ("mieru",Float) = 0 } CGINCLUDE sampler2D _MainTex; uniform half _T; struct Input { float4 vColor; float2 tex; }; void vert (inout appdata_full v, out Input o){ v.vertex.x += v.vertex.z*_T; UNITY_INITIALIZE_OUTPUT(Input,o); o.vColor = v.color; o.tex = v.texcoord.xy; } void surf (Input IN, inout SurfaceOutput o) { o.Albedo = tex2D(_MainTex, IN.tex); } ENDCG SubShader { Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM #pragma surface surf Lambert vertex:vert noforwardadd ENDCG } FallBack "Diffuse" }