forked from zxl/LaboratoryProtection
77 lines
1.4 KiB
Plaintext
77 lines
1.4 KiB
Plaintext
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
|
|
|
Shader "InJoy/uv animation addtive" {
|
|
Properties {
|
|
_MainTex ("Base (RGB)", 2D) = "white" {}
|
|
_Speed("Speed", Vector) = (1.0, 1.0, 1.0, 1.0)
|
|
_Color("Color", Color) = (1.0, 1.0, 1.0, 1.0)
|
|
}
|
|
SubShader {
|
|
LOD 600
|
|
UsePass "InJoy/common/DEBUG"
|
|
}
|
|
|
|
SubShader {
|
|
LOD 200
|
|
Tags {"Queue" = "Transparent-1" }
|
|
Pass {
|
|
Blend SrcAlpha One
|
|
Cull Off
|
|
ZWrite Off
|
|
|
|
CGPROGRAM
|
|
#pragma vertex vs300
|
|
#pragma fragment fs300
|
|
|
|
#include "UnityCG.cginc"
|
|
|
|
sampler2D _MainTex;
|
|
float4 _MainTex_ST;
|
|
float4 _Speed;
|
|
float4 _Color;
|
|
|
|
struct appdata300
|
|
{
|
|
float4 vertex : POSITION;
|
|
float2 texcoord : TEXCOORD;
|
|
float4 color : COLOR;
|
|
};
|
|
|
|
struct v2f300
|
|
{
|
|
float4 pos : POSITION;
|
|
float4 uvs : TEXCOORD;
|
|
};
|
|
|
|
v2f300 vs300(appdata300 i)
|
|
{
|
|
v2f300 o;
|
|
o.pos = UnityObjectToClipPos(i.vertex);
|
|
o.uvs.xy = TRANSFORM_TEX(i.texcoord, _MainTex) + _Speed.xy * _Time.y;
|
|
o.uvs.w = i.color.a;
|
|
return o;
|
|
}
|
|
float4 fs300(v2f300 i) : COLOR
|
|
{
|
|
return tex2D(_MainTex, i.uvs.xy) * float4(_Color.r, _Color.g, _Color.b, _Color.a * i.uvs.w) * 2;
|
|
}
|
|
ENDCG
|
|
}
|
|
}
|
|
|
|
SubShader {
|
|
|
|
LOD 100
|
|
Tags {"Queue" = "Transparent" }
|
|
Pass {
|
|
Blend SrcAlpha OneMinusSrcAlpha
|
|
Cull Off
|
|
|
|
|
|
SetTexture [_MainTex] {
|
|
Combine texture
|
|
}
|
|
}
|
|
}
|
|
}
|