-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update res.
- Loading branch information
Showing
83 changed files
with
26,582 additions
and
19 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | ||
|
||
Shader "A201-Shader/基本效果/基础AlphaBlend模式_AlphaBlend" { | ||
Properties { | ||
_TintColor ("主颜色", Color) = (0.5,0.5,0.5,1) | ||
_ColorStrength ("颜色强度", Float) = 1.0 | ||
_MainTex ("粒子贴图", 2D) = "white" {} | ||
_InvFade ("顶点平滑度", Range(0.01,7.0)) = 1.0 | ||
} | ||
|
||
Category { | ||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } | ||
Blend SrcAlpha OneMinusSrcAlpha | ||
Cull Off | ||
Lighting Off | ||
ZWrite Off | ||
|
||
SubShader { | ||
Pass { | ||
|
||
|
||
CGPROGRAM | ||
#pragma vertex vert | ||
#pragma fragment frag | ||
#pragma multi_compile_particles | ||
|
||
#include "UnityCG.cginc" | ||
|
||
sampler2D _MainTex; | ||
fixed4 _TintColor; | ||
fixed _ColorStrength; | ||
|
||
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 | ||
|
||
fixed4 tex = tex2D(_MainTex, i.texcoord); | ||
fixed4 res = 2 * i.color * tex * _TintColor * _ColorStrength; | ||
res.a = saturate(res.a); | ||
return res; | ||
} | ||
ENDCG | ||
} | ||
} | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | ||
|
||
Shader "A201-Shader/特殊制作/分层纹理制作_Particle_Explosion" { | ||
Properties { | ||
_TintColorR ("Tint Color R (内部)", Color) = (0.5,0.5,0.5,1) | ||
_TintColorG ("Tint Color G (光晕)", Color) = (0.5,0.5,0.5,1) | ||
_TintColorB ("Tint Color B (阴影)", Color) = (0.5,0.5,0.5,1) | ||
_ColorStrR ("Color R 强度", Range(0.01,4.0)) = 1.0 | ||
_ColorStrG ("Color G 强度", Range(0.01,4.0)) = 1.0 | ||
_ColorStrB ("Color B 强度", Range(0.01,4.0)) = 1.0 | ||
_MainTex ("主贴图(使用RGB通道分别控制颜色)", 2D) = "white" {} | ||
_InvFade ("顶点平滑度", Range(0.01,3.0)) = 1.0 | ||
} | ||
|
||
Category {Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } | ||
Blend SrcAlpha One | ||
Cull Off | ||
Lighting Off | ||
ZWrite Off | ||
|
||
SubShader { | ||
Pass { | ||
|
||
|
||
CGPROGRAM | ||
#pragma vertex vert | ||
#pragma fragment frag | ||
#pragma multi_compile_particles | ||
|
||
#include "UnityCG.cginc" | ||
|
||
sampler2D _MainTex; | ||
fixed4 _TintColorR; | ||
fixed4 _TintColorG; | ||
fixed _ColorStrR; | ||
fixed _ColorStrG; | ||
|
||
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; | ||
fixed alpha = saturate(lerp(-0.5, 1, v.color.a)); | ||
o.color.a = alpha; | ||
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 | ||
|
||
fixed4 tex = tex2D(_MainTex, i.texcoord); | ||
return (i.color * _TintColorR * tex.r * _ColorStrR + i.color * _TintColorG * tex.g * _ColorStrG)*tex.a; | ||
} | ||
ENDCG | ||
} | ||
|
||
|
||
Pass { | ||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } | ||
Blend SrcAlpha OneMinusSrcAlpha | ||
Cull Off Lighting Off ZWrite Off | ||
CGPROGRAM | ||
#pragma vertex vert | ||
#pragma fragment frag | ||
#pragma multi_compile_particles | ||
|
||
#include "UnityCG.cginc" | ||
|
||
sampler2D _MainTex; | ||
fixed4 _TintColorB; | ||
fixed _ColorStrB; | ||
|
||
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 | ||
|
||
fixed4 tex = tex2D(_MainTex, i.texcoord); | ||
return (i.color * tex.b * _TintColorB * _ColorStrB)*tex.a; | ||
} | ||
ENDCG | ||
} | ||
} | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | ||
|
||
Shader "A201-Shader/基本效果/基础Add模式_additive" { | ||
Properties { | ||
_TintColor ("主颜色", Color) = (0.5,0.5,0.5,0.5) | ||
_MainTex ("粒子贴图", 2D) = "white" {} | ||
_ColorStrength ("颜色强度", Float) = 1.0 | ||
_InvFade ("顶点平滑度", Range(0.01,3.0)) = 1.0 | ||
} | ||
|
||
Category { | ||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } | ||
Blend SrcAlpha One | ||
Cull Off | ||
Lighting Off | ||
ZWrite Off | ||
Fog { Mode Off} | ||
|
||
SubShader { | ||
Pass { | ||
|
||
CGPROGRAM | ||
#pragma vertex vert | ||
#pragma fragment frag | ||
#pragma multi_compile_particles | ||
|
||
#include "UnityCG.cginc" | ||
|
||
sampler2D _MainTex; | ||
fixed4 _TintColor; | ||
fixed _ColorStrength; | ||
|
||
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.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord) * _ColorStrength; | ||
} | ||
ENDCG | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.