This commit is contained in:
2022-04-23 21:58:16 +07:00
parent 23cc872b33
commit 4172fc94ba
872 changed files with 2796830 additions and 0 deletions

View File

@ -0,0 +1,119 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Scroll/Additive"
{
Properties
{
_MainTex ("Looped Texture + Alpha Mask", 2D) = "white" {}
_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
_ScrollSpeed ("Scroll Speed", Float) = 2.0
}
Category
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend One One
ColorMask RGB
Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
BindChannels
{
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
// ---- Fragment program cards
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_particles
#include "UnityCG.cginc"
sampler2D _MainTex;
fixed4 _TintColor;
struct appdata_t
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
#ifdef SOFTPARTICLES_ON
float4 projPos : TEXCOORD1;
#endif
};
float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
#ifdef SOFTPARTICLES_ON
o.projPos = ComputeScreenPos (o.vertex);
COMPUTE_EYEDEPTH(o.projPos.z);
#endif
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
}
sampler2D _CameraDepthTexture;
float _InvFade;
float _ScrollSpeed;
fixed4 frag (v2f i) : COLOR
{
#ifdef SOFTPARTICLES_ON
float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos))));
float partZ = i.projPos.z;
float fade = saturate (_InvFade * (sceneZ-partZ));
i.color.a *= fade;
#endif
half4 prev = tex2D(_MainTex, i.texcoord).a * i.color.a;
i.texcoord.y -= fmod(_Time*_ScrollSpeed,1);
prev.rgb *= tex2D(_MainTex, i.texcoord).rgb * i.color.rgb;
return prev;
}
ENDCG
}
}
// ---- Dual texture cards
SubShader {
Pass {
SetTexture [_MainTex] {
combine texture * primary
}
SetTexture [_MainTex] {
combine previous * previous alpha, previous
}
}
}
// ---- Single texture cards (does not do particle colors)
SubShader {
Pass {
SetTexture [_MainTex] {
combine texture * texture alpha, texture
}
}
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7439add42f7e65b4dbc36568299dde17

View File

@ -0,0 +1,40 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Transparent Diffuse"
{
Properties
{
_TintColor ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader
{
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Cull Off
LOD 200
CGPROGRAM
#pragma surface surf Lambert alpha noforwardadd alpha:fade
sampler2D _MainTex;
fixed4 _TintColor;
struct Input
{
float2 uv_MainTex;
float4 color:COLOR;
};
void surf (Input IN, inout SurfaceOutput o)
{
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb * _TintColor.rgb * IN.color.rgb;
o.Alpha = c.a * _TintColor.a * IN.color.a;
}
ENDCG
}
Fallback "Particles/Alpha Blended"
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: edb905ac1dd1f8d4688248976976eae3

View File

@ -0,0 +1,45 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Transparent Specular"
{
Properties
{
_TintColor ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 0)
_Shininess ("Shininess", Range (0.01, 1)) = 0.078125
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader
{
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Cull Off
LOD 200
CGPROGRAM
#pragma surface surf BlinnPhong alpha noforwardadd approxview alpha:fade
sampler2D _MainTex;
fixed4 _TintColor;
half _Shininess;
struct Input
{
float2 uv_MainTex;
float4 color:COLOR;
};
void surf (Input IN, inout SurfaceOutput o)
{
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb * _TintColor.rgb * IN.color.rgb;
o.Alpha = c.a * _TintColor.a * IN.color.a;
o.Specular = _Shininess;
o.Gloss = c.rgb + 0.1;
}
ENDCG
}
Fallback "Particles/Alpha Blended"
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b3ceb26205c43c94e95f75d80c0868e1

View File

@ -0,0 +1,72 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Alpha Blended (No Soft Particles)"
{
Properties
{
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
_MainTex ("Particle Texture", 2D) = "white" {}
_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
}
Category
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Cull Off Lighting Off ZWrite Off
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_particles
#pragma multi_compile_fog
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_ST;
fixed4 _TintColor;
struct appdata_t
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_FOG_COORDS(1)
};
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
UNITY_TRANSFER_FOG(o,o.vertex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
fixed4 col = 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord);
UNITY_APPLY_FOG(i.fogCoord, col);
return col;
}
ENDCG
}
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1f056903eb75cee4591fce095534ce2e
timeCreated: 1432360643
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,98 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Scroll/Alpha Blended"
{
Properties
{
_MainTex ("Looped Texture + Alpha Mask", 2D) = "white" {}
_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
_ScrollSpeed ("Scroll Speed", Float) = 2.0
}
Category
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Cull Off Lighting Off ZWrite Off
BindChannels
{
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
// ---- Fragment program cards
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_particles
#include "UnityCG.cginc"
sampler2D _MainTex;
struct appdata_t
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
#ifdef SOFTPARTICLES_ON
float4 projPos : TEXCOORD1;
#endif
};
float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
#ifdef SOFTPARTICLES_ON
o.projPos = ComputeScreenPos (o.vertex);
COMPUTE_EYEDEPTH(o.projPos.z);
#endif
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
}
sampler2D _CameraDepthTexture;
float _InvFade;
float _ScrollSpeed;
fixed4 frag (v2f i) : COLOR
{
#ifdef SOFTPARTICLES_ON
float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos))));
float partZ = i.projPos.z;
float fade = saturate (_InvFade * (sceneZ-partZ));
i.color.a *= fade;
#endif
fixed4 prev = i.color.a * tex2D(_MainTex, i.texcoord).a;
i.texcoord.y -= fmod(_Time*_ScrollSpeed,1);
prev.rgb = i.color.rgb * tex2D(_MainTex, i.texcoord).rgb;
// prev.rgb = 1-prev.rgb;
return prev;
}
ENDCG
}
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 09d92980be5e5784abdd803fac1a30e4

View File

@ -0,0 +1,73 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Scroll/Multiply Soft Tint"
{
Properties
{
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
_MainTex ("Texture", 2D) = "white" {}
_ScrollSpeed ("Scroll Speed", Float) = 2.0
}
SubShader
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend DstColor SrcColor
Cull Off Lighting Off ZWrite Off Fog { Color (0.5,0.5,0.5,0.5) }
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
struct v2f
{
float4 pos : SV_POSITION;
float2 texcoord : TEXCOORD0;
fixed4 color : COLOR;
};
struct vdata
{
float4 vertex : POSITION;
half2 texcoord : TEXCOORD0;
// float3 normal : NORMAL;
// float4 texcoord : TEXCOORD0;
// float4 texcoord1 : TEXCOORD1;
fixed4 color : COLOR;
};
fixed4 _TintColor;
sampler2D _MainTex;
float _ScrollSpeed;
v2f vert (vdata v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.color = v.color;
o.texcoord = v.texcoord;
return o;
}
fixed4 frag (v2f i) : COLOR0
{
float mask = tex2D(_MainTex, i.texcoord).a * i.color.a;
i.texcoord.y -= fmod(_Time*_ScrollSpeed,1);
fixed4 tex = tex2D(_MainTex, i.texcoord);
tex.rgb *= i.color.rgb * _TintColor.rgb;
tex = lerp(fixed4(0.5,0.5,0.5,0.5), tex, mask);
return tex;
}
ENDCG
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d07d6d0a86d4865468e58eacf94364ae

View File

@ -0,0 +1,71 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Multiply Soft Tint"
{
Properties
{
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend DstColor SrcColor
Cull Off Lighting Off ZWrite Off Fog { Color (0.5,0.5,0.5,0.5) }
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
#pragma debug
struct v2f
{
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
fixed4 color : COLOR;
};
struct vdata
{
float4 vertex : POSITION;
half2 texcoord : TEXCOORD0;
// float3 normal : NORMAL;
// float4 texcoord : TEXCOORD0;
// float4 texcoord1 : TEXCOORD1;
fixed4 color : COLOR;
};
fixed4 _TintColor;
sampler2D _MainTex;
v2f vert (vdata v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.color = v.color;
o.uv = v.texcoord;
return o;
}
fixed4 frag (v2f i) : COLOR0
{
// return tex2D(_MainTex, i.uv) * i.color;
fixed4 tex = tex2D(_MainTex, i.uv);
tex.rgb *= i.color.rgb * _TintColor.rgb;
tex = lerp(fixed4(0.5,0.5,0.5,0.5), tex, tex.a * i.color.a);
return tex;
// return lerp(fixed4(1,1,1,1), i.color * tex, i.color.a);
}
ENDCG
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 60ec2dfa19167834fbf25b2bced33360

View File

@ -0,0 +1,106 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Additive Alpha8" {
Properties {
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
_MainTex ("Particle Texture (alpha)", 2D) = "white" {}
_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
}
Category {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend One One
Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
BindChannels {
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
// ---- Fragment program cards
SubShader {
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_particles
#include "UnityCG.cginc"
sampler2D _MainTex;
fixed4 _TintColor;
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
#ifdef SOFTPARTICLES_ON
float4 projPos : TEXCOORD1;
#endif
};
float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
#ifdef SOFTPARTICLES_ON
o.projPos = ComputeScreenPos (o.vertex);
COMPUTE_EYEDEPTH(o.projPos.z);
#endif
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
}
sampler2D _CameraDepthTexture;
float _InvFade;
fixed4 frag (v2f i) : COLOR
{
#ifdef SOFTPARTICLES_ON
float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos))));
float partZ = i.projPos.z;
float fade = saturate (_InvFade * (sceneZ-partZ));
i.color.a *= fade;
#endif
return 2.0 * i.color * _TintColor * (tex2D(_MainTex, i.texcoord).a * i.color.a * 2.0);
}
ENDCG
}
}
// ---- Dual texture cards
SubShader {
Pass {
SetTexture [_MainTex] {
constantColor [_TintColor]
combine constant * primary
}
SetTexture [_MainTex] {
combine texture alpha * previous DOUBLE
}
}
}
// ---- Single texture cards (does not do color tint)
SubShader {
Pass {
SetTexture [_MainTex] {
combine texture alpha * primary
}
}
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 76840267cd7c0e64292ec296b1769b24

View File

@ -0,0 +1,106 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Additive (Soft) Alpha8" {
Properties {
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
_MainTex ("Particle Texture (alpha)", 2D) = "white" {}
_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
}
Category {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend OneMinusDstColor One
Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
BindChannels {
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
// ---- Fragment program cards
SubShader {
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_particles
#include "UnityCG.cginc"
sampler2D _MainTex;
fixed4 _TintColor;
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
#ifdef SOFTPARTICLES_ON
float4 projPos : TEXCOORD1;
#endif
};
float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
#ifdef SOFTPARTICLES_ON
o.projPos = ComputeScreenPos (o.vertex);
COMPUTE_EYEDEPTH(o.projPos.z);
#endif
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
}
sampler2D _CameraDepthTexture;
float _InvFade;
fixed4 frag (v2f i) : COLOR
{
#ifdef SOFTPARTICLES_ON
float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos))));
float partZ = i.projPos.z;
float fade = saturate (_InvFade * (sceneZ-partZ));
i.color.a *= fade;
#endif
return 2.0 * i.color * _TintColor * tex2D(_MainTex, i.texcoord).a;
}
ENDCG
}
}
// ---- Dual texture cards
SubShader {
Pass {
SetTexture [_MainTex] {
constantColor [_TintColor]
combine constant * primary
}
SetTexture [_MainTex] {
combine texture alpha * previous DOUBLE
}
}
}
// ---- Single texture cards (does not do color tint)
SubShader {
Pass {
SetTexture [_MainTex] {
combine texture alpha * primary
}
}
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7da55032bc1723749a4a351ea0d98969

View File

@ -0,0 +1,107 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Multiply Alpha8" {
Properties {
_MainTex ("Particle Texture", 2D) = "white" {}
_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
}
Category {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend Zero SrcColor
Cull Off Lighting Off ZWrite Off Fog { Color (1,1,1,1) }
BindChannels {
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
// ---- Fragment program cards
SubShader {
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_particles
#include "UnityCG.cginc"
sampler2D _MainTex;
fixed4 _TintColor;
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
#ifdef SOFTPARTICLES_ON
float4 projPos : TEXCOORD1;
#endif
};
float4 _MainTex_ST;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
#ifdef SOFTPARTICLES_ON
o.projPos = ComputeScreenPos (o.vertex);
COMPUTE_EYEDEPTH(o.projPos.z);
#endif
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
}
sampler2D _CameraDepthTexture;
float _InvFade;
fixed4 frag (v2f i) : COLOR
{
#ifdef SOFTPARTICLES_ON
float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos))));
float partZ = i.projPos.z;
float fade = saturate (_InvFade * (sceneZ-partZ));
i.color.a *= fade;
#endif
half4 prev = i.color * tex2D(_MainTex, i.texcoord).a;
return prev;
}
ENDCG
}
}
// ---- Dual texture cards
SubShader {
Pass {
SetTexture [_MainTex] {
combine texture alpha * primary
}
SetTexture [_MainTex] {
constantColor (1,1,1,1)
combine previous lerp (previous) constant
}
}
}
// ---- Single texture cards (does not do particle colors)
SubShader {
Pass {
SetTexture [_MainTex] {
constantColor (1,1,1,1)
combine texture alpha lerp(texture) constant
}
}
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 27aa926a717dbfe44b4b79e7d91fa71d

View File

@ -0,0 +1,75 @@
// WarFX Shader
// (c) 2015 Jean Moreno
Shader "WFX/Scroll/Smoke"
{
Properties
{
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
_MainTex ("Texture", 2D) = "white" {}
_ScrollSpeed ("Scroll Speed", Float) = 2.0
}
SubShader
{
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend DstColor SrcAlpha
Cull Off Lighting Off ZWrite Off Fog { Color (0.5,0.5,0.5,0.5) }
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
#pragma debug
struct v2f
{
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
fixed4 color : COLOR;
};
struct vdata
{
float4 vertex : POSITION;
half2 texcoord : TEXCOORD0;
// float3 normal : NORMAL;
// float4 texcoord : TEXCOORD0;
// float4 texcoord1 : TEXCOORD1;
fixed4 color : COLOR;
};
fixed4 _TintColor;
sampler2D _MainTex;
float _ScrollSpeed;
v2f vert (vdata v)
{
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
o.color = v.color;
o.uv = v.texcoord;
return o;
}
fixed4 frag (v2f i) : COLOR0
{
float mask = tex2D(_MainTex, i.uv).a * i.color.a;
i.uv.y -= fmod(_Time*_ScrollSpeed,1);
fixed4 tex = tex2D(_MainTex, i.uv);
tex.rgb *= i.color.rgb * _TintColor.rgb;
tex.a = mask;
tex = lerp(fixed4(0.5,0.5,0.5,0.5), tex, mask);
return tex;
}
ENDCG
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 179c22242d881384a9a9b7abd22a944b