播放序列帧 shader

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值