Shader “LordShader/AnimShader”
{
Properties
{
_MainTex(“Base (RGB)”, 2D) = “white” {}
_Rows(“Row Nums”,float) = 1
_Cols(“Column Nums”,float) = 1
_Speed(“Speed”, Range(0.01, 32)) = 12
_Size("_Size", Range(0.01, 32)) = 1
_PosX("_PosX",float) = 1
_PosY("_PosY",float) = 1
}
SubShader
{
Tags { "Queue" = "Transparent" }
CGPROGRAM
#pragma surface surf Lambert2 alpha
inline fixed4 LightingLambert2(SurfaceOutput s, fixed3 lightDir, fixed atten)
{
fixed diff = max(0, dot(s.Normal, lightDir));
fixed4 c;
c.rgb = s.Albedo;// * _LightColor0.rgb * (diff * atten * 2);
c.a = s.Alpha;
return c;
}
sampler2D _MainTex;
float _Rows;
float _Cols;
float _Speed;
float _Scale;
float2 _Pos;
float _Size;
float _PosX;
float _PosY;
struct Input
{
float2 uv_MainTex;
};
void surf(Input I