Created
July 25, 2014 08:53
-
-
Save sugi-cho/cedc85cb9502dcf49a80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment