2026-04-08 스킬시스템 진행중, 폴더구조 변경등

This commit is contained in:
2026-04-08 05:36:01 +09:00
parent 0844a07902
commit 4eca51b885
1334 changed files with 61947 additions and 14859 deletions

View File

@@ -0,0 +1,183 @@
Shader "GAPH Custom Shader/Shader_Decal"{
Properties{
[Header(Main Settings)]
[Space]
[HDR]_TintColor("TintColor",Color) = (1,1,1,1)
[Toggle(IS_USE_SECOND_TINTCOLOR)]_SecondTintColor("Is Use Second Tintcolor",int) = 0
[HDR]_TintColor2("TintColor2",Color) = (1,1,1,1)
_MainTex("MainTexture",2D) = "white" {}
_ColorFactor("Color Factor", float) = 1
[Toggle(IS_TEXTURE_ANIMATE)]_TextureAnimate("Is Texture Animate",int) = 0
_TextureAnimateSpeed("Texture Animate Speed",float) = 1.0
[Toggle(IS_NORMAL_DISTORTION)]_NormalDistortion("Is Normal Distortion",int) = 0
_NormalTex("Normal Tex",2D) = "white"{}
_NormalDistortionFactor("Normal Distortion Factor",float) = 1.0
[Toggle(IS_NORMAL_ANIMATE)]_NormalAnimate("Is Normal Animate",int) = 0
_NormalAnimateSpeed("Normal Animate Speed",float) = 1.0
[Toggle(IS_MASK_FADE)]_MaskFade("Is Mask Fade",int) = 0
_MaskTex("Mask Tex",2D) = "white"{}
_MaskCutOut("Mask CutOut",Range(0,1)) = 1
[Header(Render)]
[Space]
[Toggle]_ZWrite("ZWrite On/Off", int) = 0
[Enum(Culling Off,0, Culling Front, 1, Culling Back, 2)]_Culling("Culling",float) = 2
[Enum(UnityEngine.Rendering.BlendMode)]_BlendSrc("BlendSrc", float) = 1
[Enum(UnityEngine.Rendering.BlendMode)]_BlendDst("BlendDst", float) = 1
_ZTest1("_ZTest1", int) = 5
}
Category{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent"}
Blend[_BlendSrc][_BlendDst]
Cull Front
ZTest[_ZTest1]
ZWrite Off
SubShader{
Pass{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_instancing
#pragma shader_feature IS_USE_SECOND_TINTCOLOR
#pragma shader_feature IS_MASK_FADE
#pragma shader_feature IS_TEXTURE_ANIMATE
#pragma shader_feature IS_NORMAL_ANIMATE
#pragma shader_feature IS_NORMAL_DISTORTION
#include "UnityCG.cginc"
sampler2D _MainTex;
sampler2D _NormalTex;
sampler2D _MaskTex;
sampler2D _CameraDepthTexture;
float4 _MainTex_ST;
float4 _NormalTex_ST;
float4 _MaskTex_ST;
float4 _MainTex_NextFrame;
float _MaskCutOut;
UNITY_INSTANCING_BUFFER_START(data)
UNITY_DEFINE_INSTANCED_PROP(float4x4, _InverseTransformMatrix)
#define _InverseTransformMatrix_arr data
UNITY_DEFINE_INSTANCED_PROP(half4, _TintColor)
#define _TintColor_arr data
#ifdef IS_USE_SECOND_TINTCOLOR
UNITY_DEFINE_INSTANCED_PROP(half4, _TintColor2)
#define _TintColor2_arr data
#endif
UNITY_DEFINE_INSTANCED_PROP(half, _NormalAnimateSpeed)
#define _NormalAnimateSpeed_arr data
UNITY_DEFINE_INSTANCED_PROP(half, _TextureAnimateSpeed)
#define _TextureAnimateSpeed_arr data
UNITY_DEFINE_INSTANCED_PROP(half, _NormalDistortionFactor)
#define _NormalDistortionFactor_arr data
UNITY_DEFINE_INSTANCED_PROP(half, _ColorFactor)
#define _ColorFactor_arr data
UNITY_INSTANCING_BUFFER_END(data)
struct appdata_t {
float4 vertex : POSITION;
float4 normal : NORMAL;
half4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f {
float4 vertex : SV_POSITION;
half4 color : COLOR;
float4 screenUV : TEXCOORD0;
float3 ray : TEXCOODR1;
float2 texcoord : TEXCOORD2;
float2 texcoord2 : TEXCOORD3;
float2 texcoord3 : TEXCOORD4;
float3 normal : TEXCOORD5;
UNITY_FOG_COORDS(7)
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert(appdata_t v)
{
v2f o;
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex);
o.color = v.color;
o.ray = UnityObjectToViewPos(v.vertex) * float3(-1, -1, 1);
o.screenUV = ComputeScreenPos(o.vertex);
o.normal = UnityObjectToWorldNormal(o.vertex);
UNITY_TRANSFER_FOG(o, o.vertex);
return o;
}
half4 frag(v2f i) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(i);
i.ray = i.ray* (_ProjectionParams.z / i.ray.z);
float depth = Linear01Depth(tex2Dproj(_CameraDepthTexture,i.screenUV));
float4 vpos = float4(i.ray * depth, 1);
float3 wpos = mul(unity_CameraToWorld, vpos).xyz;
float3 opos = mul(unity_WorldToObject, float4(wpos,1)).xyz;
float3 objAbs = abs(opos);
clip(0.5f - objAbs);
i.texcoord = saturate(opos.xz + 0.5) * _MainTex_ST.xy + _MainTex_ST.zw;
i.texcoord2 = saturate(opos.xz + 0.5) * _NormalTex_ST.xy + _NormalTex_ST.zw;
i.texcoord3 = saturate(opos.xz + 0.5) * _MaskTex_ST.xy + _MaskTex_ST.zw;
#ifdef IS_NORMAL_DISTORTION
half2 distort = UnpackNormal(tex2D(_NormalTex, i.texcoord2 * 1.0f + (UNITY_ACCESS_INSTANCED_PROP(_NormalAnimateSpeed_arr, _NormalAnimateSpeed) * _Time / 20))).rg;
distort += UnpackNormal(tex2D(_NormalTex, i.texcoord2 * 1.0f - (UNITY_ACCESS_INSTANCED_PROP(_NormalAnimateSpeed_arr, _NormalAnimateSpeed)*_Time / 20) + float2(0.5f, 0.15f))).rg;
distort += UnpackNormal(tex2D(_NormalTex, i.texcoord2 * 0.5f - (UNITY_ACCESS_INSTANCED_PROP(_NormalAnimateSpeed_arr, _NormalAnimateSpeed)*_Time / 10) + float2(0.15f, 0.5f))).rg;
distort += UnpackNormal(tex2D(_NormalTex, i.texcoord2 * 0.5f - (UNITY_ACCESS_INSTANCED_PROP(_NormalAnimateSpeed_arr, _NormalAnimateSpeed)*_Time / 10) + float2(-0.5f, -0.15f))).rg;
i.texcoord.xy += distort.xy * UNITY_ACCESS_INSTANCED_PROP(_NormalDistortionFactor_arr, _NormalDistortionFactor);
#endif
#ifdef IS_TEXTURE_ANIMATE
half4 tex = tex2D(_MainTex, i.texcoord.xy - (UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed) * _Time / 10));
tex *= tex2D(_MainTex, i.texcoord.xy - (UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed) * _Time / 10) + float2(0.25f, -0.25f));
half4 tex2 = tex2D(_MainTex, i.texcoord.xy + (UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed) * _Time / 10));
tex2 *= tex2D(_MainTex, i.texcoord.xy + (UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed) * _Time / 10) + float2(0.15f, -0.15f));
tex = (tex + tex2) / 1.5f;
#else
half4 tex = tex2D(_MainTex, i.texcoord);
#endif
#ifdef IS_MASK_FADE
half mask_a =pow( saturate(tex2D(_MaskTex, i.texcoord3) - (1-_MaskCutOut)),1.5f);
#else
half mask_a = tex.a * _MaskCutOut;
#endif
#ifdef IS_USE_SECOND_TINTCOLOR
half4 res = tex * UNITY_ACCESS_INSTANCED_PROP(_TintColor2_arr, _TintColor2) * UNITY_ACCESS_INSTANCED_PROP(_ColorFactor_arr, _ColorFactor);
half alpha = res.a * i.color.a * mask_a * UNITY_ACCESS_INSTANCED_PROP(_ColorFactor_arr, _ColorFactor) * UNITY_ACCESS_INSTANCED_PROP(_TintColor2_arr, _TintColor2).a;
#else
half4 res = tex * UNITY_ACCESS_INSTANCED_PROP(_TintColor_arr, _TintColor) * UNITY_ACCESS_INSTANCED_PROP(_ColorFactor_arr, _ColorFactor);
half alpha = res.a * i.color.a * mask_a * UNITY_ACCESS_INSTANCED_PROP(_ColorFactor_arr, _ColorFactor) * UNITY_ACCESS_INSTANCED_PROP(_TintColor_arr, _TintColor).a;
#endif
res.a = alpha;
if (dot(vpos, i.vertex) != 0)
return res;
else
return 0;
}
ENDCG
}
}
}
}

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 416d9dd6e46c1c5408e8ed3f0d48c1bc
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 171146
packageName: 100 Special Skills Effects Pack
packageVersion: 26.2
assetPath: Assets/SpecialSkillsEffectsPack/Shader_ForEffects/Shader_Decal.shader
uploadId: 865912

View File

@@ -0,0 +1,124 @@
Shader "GAPH Custom Shader/Distortion Effect" {
Properties {
_TintColor ("Tint Color", Color) = (1,1,1,1)
_Mask ("Mask",2D) = "black"{}
_NormalMap ("Normalmap", 2D) = "bump" {}
_DistortFactor ("Distortion", Float) = 10
_InvFade ("Soft Particles Factor", Range(0,10)) = 1.0
}
SubShader{
GrabPass{
"_GrabTexture"
}
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Cull Off
Lighting Off
ZWrite Off
Pass{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_particles
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
float2 texcoord: TEXCOORD0;
fixed4 color : COLOR;
};
struct v2f {
float4 vertex : POSITION;
float4 uvgrab : TEXCOORD0;
float2 uvnormal : TEXCOORD1;
float2 uvmask : TEXCOORD2;
fixed4 color : COLOR;
#ifdef SOFTPARTICLES_ON
float4 projPos : TEXCOORD3;
#endif
};
fixed4 _TintColor;
sampler2D _Mask;
sampler2D _NormalMap;
sampler2D _GrabTexture;
float _DistortFactor;
float _ColorFactor;
float4 _NormalMap_ST;
float4 _Mask_ST;
float4 _GrabTexture_TexelSize;
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;
#if UNITY_UV_STARTS_AT_TOP
float scale = -1.0;
#else
float scale = 1.0;
#endif
//Set uvgrab value
o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y * scale) + o.vertex.w) * 0.5;
o.uvgrab.zw = o.vertex.zw;
o.uvnormal = TRANSFORM_TEX( v.texcoord, _NormalMap );
o.uvmask = TRANSFORM_TEX(v.texcoord,_Mask);
UNITY_TRANSFER_FOG(o, o.vertex);
return o;
}
sampler2D _CameraDepthTexture;
float _InvFade;
half4 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
//Set normal tex
half2 normal = UnpackNormal(tex2D(_NormalMap, i.uvnormal)).rg;
//Set distort factor using normal, GrabTexture
half2 distortValue = normal * _DistortFactor * _GrabTexture_TexelSize.xy;
//Amplify distort offset factor if graphic API is DX11 or METAL.
//OpenGLCore or OpenGL don't need this
#if defined(SHADER_API_D3D11) || defined(SHADER_API_METAL)
distortValue *= 10;
#endif
//Add new distort data to original grab value
i.uvgrab.xy = (distortValue * i.uvgrab.z) + i.uvgrab.xy;
//Sample GrabTexture using updated grab value
half4 distort = tex2Dproj(_GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
half4 mask = tex2D(_Mask, i.uvmask);
half4 res = distort;
//Compose all
res.a = _TintColor.a * i.color.a * mask.a;
UNITY_APPLY_FOG(i.fogCoord, res);
return res;
}
ENDCG
}
}
}

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: d5fe0e4073f9dee4dbe96b37559868ea
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 171146
packageName: 100 Special Skills Effects Pack
packageVersion: 26.2
assetPath: Assets/SpecialSkillsEffectsPack/Shader_ForEffects/Shader_DistortionEffect.shader
uploadId: 865912

View File

@@ -0,0 +1,565 @@
Shader "GAPH Custom Shader/Shader_IntegradedEffect"
{
Properties {
[Header(Main)]
[Space]
[HDR]_TintColor("Color",Color) = (1,1,1,1)
[Toggle(IS_USE_SECOND_COLOR)]_SecondColor("Is use second color",int) = 0
[HDR]_TintColor2("Color2",Color) = (1,1,1,1)
_MainTex ("Main Tex", 2D) = "white" {}
_ColorFactor("Color Factor", float) = 1
[Toggle(IS_TEXTURE_ANIMATE)]_TextureAnimate("Is Texture Animate",int) = 0
_TextureAnimateSpeed("Texture Animate Speed",float) = 1.0
_TextureAnimateStyle("Texture Animate Style", Range(0,2)) = 1
[Toggle(IS_TEXTURE_ANIMATE_ADVANCED)]_TextureAnimateAdvanced("Is Texture Animate Advanced",int) = 0 //Need to check 'Is Texture Animate'
_MaxIndex("Texture Mix Count",int) = 2
[Toggle(IS_TEXTURE_BLEND)]_TextureBlend("Is Texture Blend",int) = 0
[Toggle(IS_UNITY_PARTICLE_INSTANCING_ENABLED)]_ParticleInstancing("Is Unity Paticle Instancing Enable",int) = 0
[Toggle(IS_ALL_TEXTURE_STRAIGHT_MOVE)]_MixedMove("Is All Texture Straight Move",int) = 0
_TexPosMove("xPosMove", Range(-1,1)) = 0
[Toggle(IS_USE_ROTATE_UV)]_IsRotateAngle("Is Rotate Angle", int) = 0
_RotateAngle("RotateAngle", Range(-1,1)) = 0
[Header(Soft Particle)]
[Space]
[Toggle(IS_SOFT_PARTICLES)]_SoftParticle("Is Soft Particles",int) = 1
_InvFade("Soft Particle Factor",float) = 1
[Header(Normal)]
[Space]
[Toggle(IS_NORMAL_DISTORTION)]_NormalDistortion("Is Normal Distortion",int) = 0
_NormalTex("Normal Tex",2D) = "white"{}
_NormalDistortionFactor("Normal Distortion Factor",float) = 1.0
[Toggle(IS_NORMAL_ANIMATE)]_NormalAnimate("Is Normal Animate",int) = 0
_NormalAnimateSpeed("Normal Animate Speed",float) = 1.0
[Toggle(IS_TEXTURE_NOISE)]_TextureNoise("Is Texture Noise", int)= 0
_NoiseNormal("Noise Normal",2D) = "white"{}
_NoiseNormalFactor("NoiseNormalFactor",float) = 1.0
[Header(Mask Fade)]
[Space]
[Toggle(IS_MASK_FADE)]_MaskFade("Is Mask Fade",int) = 0
[Toggle(IS_USE_TEXANIMATION)]_UseTexAnimation("Is UseTexAnimation",int) = 0
_FixedMaskTex("Fixed Mask Tex",2D) = "white"{}
_MaskTex("Mask Tex",2D) = "white"{}
_MaskOffsetFactor("Mask Offset Factor",float) = 1.0
_MaskDistortion("Mask Distortion Tex",2D) = "white"{}
_MaskAnimatedSpeed("_MaskAnimatedSpeed",float) = 1.0
_MaskCutOut("Mask CutOut",Range(0,1)) = 1
[Header(Render)]
[Space]
[Toggle]_ZWrite("ZWrite On/Off", int) = 0
[Enum(Culling Off,0, Culling Front, 1, Culling Back, 2)]_Culling("Culling",float) = 2
[Enum(UnityEngine.Rendering.BlendMode)]_BlendSrc("BlendSrc", float) = 1
[Enum(UnityEngine.Rendering.BlendMode)]_BlendDst("BlendDst", float) = 1
_ZTest2("_ZTest2", int) = 2
[Header(VertexAnimation)]
[Space]
[Toggle(IS_VERTEXANIMATION)]_VertexAnimation("Is Vertex Animation", int) = 0
_NoiseTex("Vertex Animation Noise Map",2D) = "black"{}
_NoiseValue("Noise Value", Vector) = (1,1,1,0)
_NoiseScale("Noise Scale", float) = 1
[Header(RimLight)]
[Space]
[Toggle(IS_RIMLIGHT)]_RimLight("Is Rim Light",int) = 0
[HDR]_RimColor("RimColor",Color) = (1,1,1,1)
_RimScale("Rim Light Power",float) = 1
_RimStrength("Rim Light Strength",float) = 1
[Header(Impact)]
[Space]
[Toggle(IS_IMPACT)]_Impact("Is Impact",int) = 0
_ImpactSize("Impact Size",float) = 0.5
_ImpactFactor("Impact Factor",float) = 1
[Header(Texcoord)]
[Space]
[Toggle(IS_TEXCOORD_MOVE)]_TexcoordMove("Is Texcoord Move",int) = 0
_xTexcoordMove("xTexcoordMove", Range(-1,1)) = 0
_yTexcoordMove("yTexcoordMove", Range(-1,1)) = 0
_TexcoordMoveStrength("TexcoordMoveStrength",float) = 0
[Toggle(IS_TEXCOORD_MOVE_USING_CUSTOM)]_TexcoordMoveUsingCustom("Is Texcoord Move Using Custom",int) = 0
[Header(LinePass)]
[Space]
[Toggle(IS_LINEPASS)]_LinePass("Is LinePass", int) = 0
_TexLength("TexLength",Range(0,1)) = 1.0
_LinePassTex("LinePassTex", 2D) = "white" {}
}
Category{
Tags { "Queue" = "Transparent" "RenderType" = "Transparent" }
Blend[_BlendSrc][_BlendDst]
Cull [_Culling]
ZWrite[_ZWrite]
Lighting Off
ZTest[_ZTest2]
SubShader {
Pass{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_particles
#pragma multi_compile_fog
#pragma multi_compile_instancing
#pragma shader_feature IS_SOFT_PARTICLES
#pragma shader_feature IS_USE_SECOND_COLOR
#pragma shader_feature IS_NORMAL_DISTORTION
#pragma shader_feature IS_TEXCOORD_MOVE_USING_CUSTOM
#pragma shader_feature IS_TEXTURE_NOISE
#pragma shader_feature IS_MASK_FADE
#pragma shader_feature IS_TEXTURE_BLEND
#pragma shader_feature IS_TEXTURE_ANIMATE
#pragma shader_feature IS_TEXTURE_ANIMATE_ADVANCED
#pragma shader_feature IS_ALL_TEXTURE_STRAIGHT_MOVE
#pragma shader_feature IS_TEXCOORD_MOVE
#pragma shader_feature IS_NORMAL_ANIMATE
#pragma shader_feature IS_VERTEXANIMATION
#pragma shader_feature IS_RIMLIGHT
#pragma shader_feature IS_IMPACT
#pragma shader_feature UNITY_PARTICLE_INSTANCING_ENABLED
#pragma shader_feature IS_LINEPASS
#pragma shader_feature IS_USE_TEXANIMATION
#pragma shader_feature IS_USE_ROTATE_UV
#include "UnityCG.cginc"
#include "UnityStandardParticleInstancing.cginc"
sampler2D _MainTex;
half4 _MainTex_ST;
sampler2D _CameraDepthTexture;
#ifdef IS_TEXTURE_ANIMATE_ADVANCED
int _MaxIndex;
#endif
#ifdef IS_NORMAL_DISTORTION
sampler2D _NormalTex;
half4 _NormalTex_ST;
half _NormalDistortionFactor;
#endif
#ifdef IS_TEXTURE_NOISE
sampler2D _NoiseNormal;
half4 _NoiseNormal_ST;
half _NoiseNormalFactor;
#endif
#ifdef IS_MASK_FADE
sampler2D _FixedMaskTex;
half4 _FixedMaskTex_ST;
sampler2D _MaskTex;
half4 _MaskTex_ST;
half _MaskOffsetFactor;
sampler2D _MaskDistortion;
half4 _MaskDistortion_ST;
#endif
half _MaskCutOut;
#ifdef IS_ALL_TEXTURE_STRAIGHT_MOVE
half _TexPosMove;
#endif
#ifdef IS_VERTEXANIMATION
sampler2D _NoiseTex;
half4 _NoiseTex_ST;
half _NoiseScale;
#endif
#ifdef IS_RIMLIGHT
half _RimScale;
half _RimStrength;
#endif
#ifdef IS_IMPACT
half _ImpactSize;
half _ImpactFactor;
int _PointSize;
fixed4 _Points[30];
#endif
#ifdef IS_TEXCOORD_MOVE
half _xTexcoordMove;
half _yTexcoordMove;
half _TexcoordMoveStrength;
#endif
#ifdef IS_LINEPASS
sampler2D _LinePassTex;
half4 _LinePassTex_ST;
half _TexLength;
half _TexLength2;
#endif
#ifdef IS_USE_ROTATE_UV
half _RotateAngle;
#endif
UNITY_INSTANCING_BUFFER_START(data)
UNITY_DEFINE_INSTANCED_PROP(half4, _TintColor)
#define _TintColor_arr data
#ifdef IS_USE_SECOND_COLOR
UNITY_DEFINE_INSTANCED_PROP(half4, _TintColor2)
#define _TintColor2_arr data
#endif
UNITY_DEFINE_INSTANCED_PROP(half, _ColorFactor)
#define _ColorFactor_arr data
#ifdef IS_RIMLIGHT
UNITY_DEFINE_INSTANCED_PROP(half4,_RimColor)
#define _RimColor_arr data
#endif
#ifdef IS_VERTEXANIMATION
UNITY_DEFINE_INSTANCED_PROP(half4,_NoiseValue)
#define _NoiseValue_arr data
#endif
#ifdef IS_TEXTURE_ANIMATE
UNITY_DEFINE_INSTANCED_PROP(half, _TextureAnimateSpeed)
#define _TextureAnimateSpeed_arr data
UNITY_DEFINE_INSTANCED_PROP(int, _TextureAnimateStyle)
#define _TextureAnimateStyle_arr data
#endif
#ifdef IS_NORMAL_ANIMATE
UNITY_DEFINE_INSTANCED_PROP(half, _NormalAnimateSpeed)
#define _NormalAnimateSpeed_arr data
#endif
#ifdef IS_MASK_FADE
UNITY_DEFINE_INSTANCED_PROP(half,_MaskAnimatedSpeed)
#define _MaskAnimatedSpeed_arr data
#endif
UNITY_INSTANCING_BUFFER_END(data)
half _InvFade;
struct appdata_t {
float4 vertex : POSITION;
float3 normal : NORMAL;
half4 color : COLOR;
#ifdef IS_TEXTURE_BLEND
half4 texcoord : TEXCOORD0;
half texcoordBlend : TEXCOORD1;
#else
half4 texcoord : TEXCOORD0;
#ifdef IS_TEXCOORD_MOVE_USING_CUSTOM
half2 texcoord2 : TEXCOORD1;
#endif
#endif
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f {
float4 vertex : SV_POSITION;
half4 color : COLOR;
half2 maintex : TEXCOORD0;
#ifdef IS_TEXTURE_BLEND
half3 maintexBlend : TEXCOORD1;
#endif
#ifdef IS_NORMAL_DISTORTION
half2 normaltex : TEXCOORD2;
#endif
#ifdef IS_MASK_FADE
half2 fixedmasktex : TEXCOORD3;
half2 masktex : TEXCOORD4;
half2 masknormaltex: TEXCOORD5;
#endif
#ifdef IS_TEXTURE_NOISE
half2 noisetex : TEXCOORD6;
#endif
#ifdef SOFTPARTICLES_ON
half4 projPos : TEXCOORD7;
#endif
UNITY_FOG_COORDS(8)
#ifdef IS_RIMLIGHT
half3 viewDir : TEXCOORD9;
half3 normal : TEXCOORD10;
#endif
#ifdef IS_IMPACT
float3 worldPos : TEXCOORD11;
#endif
#ifdef IS_LINEPASS
float2 linepasscoord : TEXCOORD12;
#endif
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
v2f vert (appdata_t i)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(i);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_TRANSFER_INSTANCE_ID(i, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#ifdef IS_VERTEXANIMATION
float4 Noise = mul(UNITY_MATRIX_M, i.vertex) * UNITY_ACCESS_INSTANCED_PROP(_NoiseValue_arr, _NoiseValue) * float4(0.1f, 0.1f, 1.5f, 1);
//Set noiseTex with normal tex using time & scale info. time is for animate vertex
float4 NoiseTex = tex2Dlod(_NoiseTex, Noise + float4(float3(_Time.x / 2, _Time.y / 2, _Time.z * 2) * _NoiseScale * 10, 0));
//NoiseTex *= tex2Dlod(_NoiseTex, Noise - float4(float3(_Time.x / 2, _Time.y / 2, _Time.z * 2) * _NoiseScale * 10, 0));
i.vertex = i.vertex * UNITY_ACCESS_INSTANCED_PROP(_NoiseValue_arr, _NoiseValue).w +
//Add changed noise info with normal value to original object vertex.
(saturate(NoiseTex) - 0.5f) * (
//Additionally trigonometric value to original object vertex.
sin((i.vertex.x + _Time * UNITY_ACCESS_INSTANCED_PROP(_NoiseValue_arr, _NoiseValue).x)* UNITY_ACCESS_INSTANCED_PROP(_NoiseValue_arr, _NoiseValue).y) +
cos((i.vertex.y + _Time * UNITY_ACCESS_INSTANCED_PROP(_NoiseValue_arr, _NoiseValue).x)* UNITY_ACCESS_INSTANCED_PROP(_NoiseValue_arr, _NoiseValue).y) +
sin((i.vertex.z + _Time * UNITY_ACCESS_INSTANCED_PROP(_NoiseValue_arr, _NoiseValue).x)* UNITY_ACCESS_INSTANCED_PROP(_NoiseValue_arr, _NoiseValue).y)
)* UNITY_ACCESS_INSTANCED_PROP(_NoiseValue_arr, _NoiseValue).z*_NoiseScale * 10;
#endif
o.vertex = UnityObjectToClipPos(i.vertex);
half4 originaltex = i.texcoord;
#ifdef IS_TEXCOORD_MOVE
#ifdef IS_TEXCOORD_MOVE_USING_CUSTOM
i.texcoord.y += i.texcoord2.y;
#else
i.texcoord.x += _Time * _xTexcoordMove * _TexcoordMoveStrength;
i.texcoord.y += _Time * _yTexcoordMove * _TexcoordMoveStrength;
#endif
#endif
#ifdef IS_UNITY_PARTICLE_INSTANCING_ENABLED //GPU Rendering
#ifdef IS_TEXTURE_BLEND
vertInstancingUVs(i.texcoord.xy, o.maintex, o.,maintexBlend);
#else
vertInstancingUVs(i.texcoord, o.maintex);
o.maintex = TRANSFORM_TEX(o.texcoord, _MainTex);
#endif
#else
#ifdef IS_TEXTURE_BLEND
o.maintex = i.texcoord.xy;
o.maintexBlend.xy = i.texcoord.zw;
o.maintexBlend.z = i.texcoordBlend;
#else
o.maintex = TRANSFORM_TEX(i.texcoord, _MainTex);
#endif
#endif
#ifdef IS_NORMAL_DISTORTION
o.normaltex = TRANSFORM_TEX(i.texcoord, _NormalTex);
#endif
#ifdef IS_MASK_FADE
half4 masktexcoord;
#ifdef IS_USE_TEXANIMATION
masktexcoord = i.texcoord;
#else
masktexcoord = originaltex;
#endif
o.fixedmasktex = TRANSFORM_TEX(masktexcoord, _FixedMaskTex);
o.masktex = TRANSFORM_TEX(masktexcoord, _MaskTex);
o.masknormaltex = TRANSFORM_TEX(masktexcoord, _MaskDistortion);
#endif
#ifdef IS_TEXTURE_NOISE
o.noisetex = TRANSFORM_TEX(i.texcoord, _NoiseNormal);
#endif
#ifdef IS_SOFTPARTICLES
#ifdef SOFTPARTICLES_ON
o.projPos = ComputeNonStereoScreenPos(o.vertex);
COMPUTE_EYEDEPTH(o.projPos.z);
#endif
#endif
#ifdef IS_RIMLIGHT
o.viewDir = WorldSpaceViewDir(i.vertex);
o.normal = UnityObjectToWorldNormal(i.vertex);
#endif
#ifdef IS_IMPACT
o.worldPos = i.vertex;
#endif
#ifdef IS_LINEPASS
half4 originaltexcoord = i.texcoord;
float length = i.texcoord.z;
length = lerp(1.0f, 3.0f, length);
i.texcoord.x *= length;
float length2 = i.texcoord.w * _TexLength * 2;
length2 = lerp(1, 0, length2);
i.texcoord.x -= length2;
i.texcoord.x = clamp(i.texcoord.x, 0, 1);
i.texcoord.y = clamp(i.texcoord.y, 0, 1);
o.linepasscoord = TRANSFORM_TEX(i.texcoord, _LinePassTex);
i.texcoord = originaltexcoord;
#endif
#ifdef IS_USE_ROTATE_UV
float2 center = float2(0.5, 0.5);
float cosA = cos(_RotateAngle);
float sinA = sin(_RotateAngle);
float2x2 rt = float2x2(cosA, -sinA, sinA, cosA);
//main_tex uv
float2 uv = o.maintex - center;
o.maintex = mul(rt, uv);
o.maintex += uv;
#endif
o.color = i.color;
UNITY_TRANSFER_FOG(o, o.vertex);
return o;
}
half4 frag(v2f i): SV_Target
{
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
#ifdef IS_SOFTPARTICLES
half sceneZ = LinearEyeDepth(UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos))));
half partZ = i.projPos.z;
half fade = saturate(_InvFade * (sceneZ - partZ));
i.color.a *= fade;
#endif
#ifdef IS_TEXTURE_NOISE
half2 noiseTex = tex2D(_NoiseNormal, i.noisetex);
half2 offset = (noiseTex * 2 - 1) * _NoiseNormalFactor;
i.maintex.xy += offset;
#endif
#ifdef IS_NORMAL_DISTORTION
#ifdef IS_NORMAL_ANIMATE
//Mixed Distort Move
#ifdef IS_ALL_TEXTURE_STRAIGHT_MOVE
half2 distort = UnpackNormal(tex2D(_NormalTex, i.normaltex +(float(UNITY_ACCESS_INSTANCED_PROP(_NormalAnimateSpeed_arr, _NormalAnimateSpeed)) * _Time / 10)*_TexPosMove)).rg;
distort *= UnpackNormal(tex2D(_NormalTex, i.normaltex +((float(UNITY_ACCESS_INSTANCED_PROP(_NormalAnimateSpeed_arr, _NormalAnimateSpeed))*_Time / 10) + float2(0.5f, 0.15f))*_TexPosMove)).rg;
distort *= UnpackNormal(tex2D(_NormalTex, i.normaltex +((float(UNITY_ACCESS_INSTANCED_PROP(_NormalAnimateSpeed_arr, _NormalAnimateSpeed))*_Time / 10) + float2(0.15f, 0.5f))*_TexPosMove)).rg;
#else
half2 distort = UnpackNormal(tex2D(_NormalTex, i.normaltex - (float(UNITY_ACCESS_INSTANCED_PROP(_NormalAnimateSpeed_arr, _NormalAnimateSpeed)) * _Time / 10))).rg;
distort *= UnpackNormal(tex2D(_NormalTex, i.normaltex + (float(UNITY_ACCESS_INSTANCED_PROP(_NormalAnimateSpeed_arr, _NormalAnimateSpeed))*_Time / 10) - float2(-0.25f, -0.15f))).rg;
#endif
#else
half2 distort = UnpackNormal(tex2D(_NormalTex, i.normaltex)).rg;
#endif
#ifdef IS_TEXTURE_BLEND
i.maintex.xy += distort.xy* _NormalDistortionFactor;
i.maintexBlend.xy += distort.xy* _NormalDistortionFactor;
#else
i.maintex.xy += distort.xy* _NormalDistortionFactor;
#endif
#endif
#ifdef IS_TEXTURE_ANIMATE
#ifdef IS_ALL_TEXTURE_STRAIGHT_MOVE
half4 tex = tex2D(_MainTex, i.maintex.xy + (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10)*_TexPosMove);
tex *= tex2D(_MainTex, i.maintex.xy + ((float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10) + float2(0.25f, -0.25f))*_TexPosMove);
half4 tex2 = tex2D(_MainTex, i.maintex.xy + ((float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10) + float2(-0.5f, 0.5f))*_TexPosMove) * 2.5f;
tex = (tex) / 1.5f;
#else
#ifdef IS_TEXTURE_ANIMATE_ADVANCED
half4 tex = half4(1, 1, 1, 1);
half reversefactor = -1;
for (uint j = 1; j < uint(_MaxIndex); j++) {
half movefactor = ( uint(j) / _MaxIndex);
half timefactor;
reversefactor *= -1;
timefactor = (_Time.x + movefactor) *reversefactor;
tex *= tex2D(_MainTex, i.maintex + movefactor + (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed))) * float2(timefactor, 0) );
tex *= tex2D(_MainTex, i.maintex + movefactor + (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed))) * float2(0, timefactor));
}
tex = saturate(pow(tex, 1.0f/_MaxIndex));
#else
half4 tex = half4(0, 0, 0, 0);
if (UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateStyle_arr, _TextureAnimateStyle) == 0)
{
tex = tex2D(_MainTex, i.maintex.xy - (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10));
tex *= tex2D(_MainTex, i.maintex.xy - (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10) + float2(0.25f, -0.25f));
half4 tex2 = tex2D(_MainTex, i.maintex.xy + (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10));
tex2 *= tex2D(_MainTex, i.maintex.xy + (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10) + float2(0.15f, -0.15f));
tex = (tex + tex2) / 1.5f;
}
else if (UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateStyle_arr, _TextureAnimateStyle) == 1)
{
tex = tex2D(_MainTex, i.maintex.xy - (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10));
tex *= tex2D(_MainTex, i.maintex.xy - (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10) + float2(-0.25f, -0.25f));
half4 tex2 = tex2D(_MainTex, i.maintex.xy + (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10));
tex2 *= tex2D(_MainTex, i.maintex.xy + (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10) + float2(0.15f, -0.15f));
tex *= tex2 * 3.5f;
}
else
{
tex = tex2D(_MainTex, i.maintex.xy - (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10) + float2(0.25f, -0.25f));
half4 tex2 = tex2D(_MainTex, i.maintex.xy + (float(UNITY_ACCESS_INSTANCED_PROP(_TextureAnimateSpeed_arr, _TextureAnimateSpeed)) * _Time / 10) + float2(0.15f, -0.15f));
tex = (tex * tex2)*1.25f + (tex + tex2)*0.5f;
}
#endif
#endif
#else
half4 tex = tex2D(_MainTex, i.maintex);
#ifdef IS_TEXTURE_BLEND
half4 tex2 = tex2D(_MainTex, i.maintexBlend.xy);
tex = lerp(tex, tex2, i.maintexBlend.z);
#endif
#endif
#ifdef IS_MASK_FADE
half fixed_mask = tex2D(_FixedMaskTex, i.fixedmasktex);
#ifdef IS_ALL_TEXTURE_STRAIGHT_MOVE
half2 mask_noise = tex2D(_MaskDistortion, i.masknormaltex.xy + ((float(UNITY_ACCESS_INSTANCED_PROP(_MaskAnimatedSpeed_arr, _MaskAnimatedSpeed)) * _Time / 5) + float2(0.25f, 0.25f))*_TexPosMove);
mask_noise *= tex2D(_MaskDistortion, i.masknormaltex.xy + ((float(UNITY_ACCESS_INSTANCED_PROP(_MaskAnimatedSpeed_arr, _MaskAnimatedSpeed)) * _Time / 4) - float2(0.25f, 0.25f))*_TexPosMove);
mask_noise *= tex2D(_MaskDistortion, i.masknormaltex.xy + ((float(UNITY_ACCESS_INSTANCED_PROP(_MaskAnimatedSpeed_arr, _MaskAnimatedSpeed))* _Time / 20) - float2(0.25f, 0.25f))*_TexPosMove);
half2 mask_offset = mask_noise * _MaskOffsetFactor;
#else
half2 mask_noise = tex2D(_MaskDistortion, i.masknormaltex.xy - (float(UNITY_ACCESS_INSTANCED_PROP(_MaskAnimatedSpeed_arr, _MaskAnimatedSpeed)) * _Time / 10) + float2(0.25f, 0.25f));
mask_noise *= tex2D(_MaskDistortion, i.masknormaltex.xy + (float(UNITY_ACCESS_INSTANCED_PROP(_MaskAnimatedSpeed_arr, _MaskAnimatedSpeed)) * _Time / 10) - float2(0.5f, 0.5f));
half2 mask_offset = mask_noise * _MaskOffsetFactor;
#endif
i.masktex.xy += mask_offset;
#ifdef IS_USE_SECOND_COLOR
half mask_a = saturate(tex2D(_MaskTex, i.masktex) - (1- saturate(i.color.a*_MaskCutOut))) * fixed_mask * (float(UNITY_ACCESS_INSTANCED_PROP(_TintColor2_arr, _TintColor2).a));
#else
half mask_a = saturate(tex2D(_MaskTex, i.masktex) - (1 - saturate(i.color.a*_MaskCutOut))) * fixed_mask * (float(UNITY_ACCESS_INSTANCED_PROP(_TintColor_arr, _TintColor).a));
#endif
#else
#ifdef IS_USE_SECOND_COLOR
half mask_a = tex.a *_MaskCutOut * i.color.a * float(UNITY_ACCESS_INSTANCED_PROP(_TintColor2_arr, _TintColor2).a);
#else
half mask_a = tex.a *_MaskCutOut * i.color.a * float(UNITY_ACCESS_INSTANCED_PROP(_TintColor_arr, _TintColor).a);
#endif
#endif
#ifdef IS_USE_SECOND_COLOR
half4 res = tex * float4(i.color.rgb, 1) * float4(UNITY_ACCESS_INSTANCED_PROP(_TintColor2_arr, _TintColor2).rgb, 1) * float(UNITY_ACCESS_INSTANCED_PROP(_ColorFactor_arr, _ColorFactor));
#else
half4 res = tex * float4(i.color.rgb,1) * float4(UNITY_ACCESS_INSTANCED_PROP(_TintColor_arr, _TintColor).rgb,1) * float(UNITY_ACCESS_INSTANCED_PROP(_ColorFactor_arr, _ColorFactor));
#endif
half alpha = mask_a * float(UNITY_ACCESS_INSTANCED_PROP(_ColorFactor_arr, _ColorFactor));
res.a = saturate(pow(alpha, 2.0f));
#ifdef IS_RIMLIGHT
half rim = 1.0 - saturate(dot(normalize(i.viewDir), i.normal));
res.rgb += float3(UNITY_ACCESS_INSTANCED_PROP(_RimColor_arr, _RimColor).rgb * pow(rim, _RimScale) * _RimStrength);
#endif
#ifdef IS_IMPACT
float3 objPos =i.worldPos;
float Impact_alpha = 0.0f;
for (unsigned int index = 0; index < _Points.Length; ++index)
{
float Impact = pow(saturate(frac(1.0 - saturate((_Points[index].w*_ImpactSize) - distance(_Points[index].xyz, objPos.xyz))))*saturate(1.0 - _Points[index].w),2);
Impact_alpha += Impact * _ImpactFactor;
Impact_alpha = pow(Impact_alpha, 1.1f);
}
res.a += Impact_alpha * 5.0f;
#endif
#ifdef IS_LINEPASS
half4 linepasstex = tex2D(_LinePassTex, i.linepasscoord.xy);
return res *= linepasstex;
#endif
UNITY_APPLY_FOG_COLOR(i.fogCoord, res, half4(0, 0, 0, 0));
return res;
}
ENDCG
}
}
}
}

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 1d58a8e283100ea4f8435e923e54553e
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 171146
packageName: 100 Special Skills Effects Pack
packageVersion: 26.2
assetPath: Assets/SpecialSkillsEffectsPack/Shader_ForEffects/Shader_IntegratedEffect.shader
uploadId: 865912