第一次提交

This commit is contained in:
tangbin
2025-06-14 13:46:24 +08:00
commit 1f3323e115
3765 changed files with 3447853 additions and 0 deletions

View File

@@ -0,0 +1,132 @@
// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "Shader/ADD_Top3"
{
Properties
{
_Cutoff( "Mask Clip Value", Float ) = 0.61
_MainTex("MainTex", 2D) = "white" {}
_MaskTex("MaskTex", 2D) = "white" {}
[HDR]_MainColor("MainColor", Color) = (1,1,1,1)
_StartFrame("StartFrame", Float) = 0
_Rows("Rows", Float) = 0
_Colums("Colums", Float) = 0
_UVtiling("UVtiling", Vector) = (1,1,0,0)
_Speed("Speed", Float) = 1
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Opaque" "Queue" = "Overlay+0" "IsEmissive" = "true" }
Cull Off
ZWrite Off
ZTest Always
Blend One One
CGPROGRAM
#pragma target 3.5
#pragma surface surf Unlit keepalpha noshadow
struct Input
{
float4 vertexColor : COLOR;
float2 uv_texcoord;
};
uniform sampler2D _MainTex;
uniform float2 _UVtiling;
uniform float _Colums;
uniform float _Rows;
uniform float _Speed;
uniform float _StartFrame;
uniform float4 _MainColor;
uniform sampler2D _MaskTex;
uniform float4 _MaskTex_ST;
uniform float _Cutoff = 0.61;
inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
{
return half4 ( 0, 0, 0, s.Alpha );
}
void surf( Input i , inout SurfaceOutput o )
{
float2 uv_TexCoord18 = i.uv_texcoord * _UVtiling;
// *** BEGIN Flipbook UV Animation vars ***
// Total tiles of Flipbook Texture
float fbtotaltiles19 = _Colums * _Rows;
// Offsets for cols and rows of Flipbook Texture
float fbcolsoffset19 = 1.0f / _Colums;
float fbrowsoffset19 = 1.0f / _Rows;
// Speed of animation
float fbspeed19 = _Time[ 1 ] * _Speed;
// UV Tiling (col and row offset)
float2 fbtiling19 = float2(fbcolsoffset19, fbrowsoffset19);
// UV Offset - calculate current tile linear index, and convert it to (X * coloffset, Y * rowoffset)
// Calculate current tile linear index
float fbcurrenttileindex19 = round( fmod( fbspeed19 + _StartFrame, fbtotaltiles19) );
fbcurrenttileindex19 += ( fbcurrenttileindex19 < 0) ? fbtotaltiles19 : 0;
// Obtain Offset X coordinate from current tile linear index
float fblinearindextox19 = round ( fmod ( fbcurrenttileindex19, _Colums ) );
// Multiply Offset X by coloffset
float fboffsetx19 = fblinearindextox19 * fbcolsoffset19;
// Obtain Offset Y coordinate from current tile linear index
float fblinearindextoy19 = round( fmod( ( fbcurrenttileindex19 - fblinearindextox19 ) / _Colums, _Rows ) );
// Reverse Y to get tiles from Top to Bottom
fblinearindextoy19 = (int)(_Rows-1) - fblinearindextoy19;
// Multiply Offset Y by rowoffset
float fboffsety19 = fblinearindextoy19 * fbrowsoffset19;
// UV Offset
float2 fboffset19 = float2(fboffsetx19, fboffsety19);
// Flipbook UV
half2 fbuv19 = uv_TexCoord18 * fbtiling19 + fboffset19;
// *** END Flipbook UV Animation vars ***
float4 tex2DNode5 = tex2D( _MainTex, fbuv19 );
o.Emission = ( ( i.vertexColor * tex2DNode5 * _MainColor ) * ( i.vertexColor.a * tex2DNode5.a * _MainColor.a ) ).rgb;
o.Alpha = 1;
float2 uv_MaskTex = i.uv_texcoord * _MaskTex_ST.xy + _MaskTex_ST.zw;
clip( tex2D( _MaskTex, uv_MaskTex ).a - _Cutoff );
}
ENDCG
}
CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=18100
7;8;1539;933;1064.165;-66.8938;1;True;True
Node;AmplifyShaderEditor.Vector2Node;20;-1783.463,-424.1539;Float;False;Property;_UVtiling;UVtiling;7;0;Create;True;0;0;False;0;False;1,1;1,1;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
Node;AmplifyShaderEditor.RangedFloatNode;16;-1522.849,0.1635742;Float;False;Property;_StartFrame;StartFrame;4;0;Create;True;0;0;False;0;False;0;13;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.TextureCoordinatesNode;18;-1533.441,-411.0771;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.RangedFloatNode;21;-1536.463,-84.15393;Float;False;Property;_Speed;Speed;8;0;Create;True;0;0;False;0;False;1;21;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;14;-1574.849,-275.8364;Float;False;Property;_Colums;Colums;6;0;Create;True;0;0;False;0;False;0;5;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;15;-1559.849,-174.8364;Float;False;Property;_Rows;Rows;5;0;Create;True;0;0;False;0;False;0;5;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.TFHCFlipBookUVAnimation;19;-1208.668,-208.2096;Inherit;False;0;0;6;0;FLOAT2;0,0;False;1;FLOAT;2;False;2;FLOAT;2;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;3;FLOAT2;0;FLOAT;1;FLOAT;2
Node;AmplifyShaderEditor.ColorNode;8;-790.2756,227.9162;Float;False;Property;_MainColor;MainColor;3;1;[HDR];Create;True;0;0;False;0;False;1,1,1,1;0.8228907,0.8679245,0.8253925,0.5019608;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.VertexColorNode;7;-767.0244,-148.2174;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SamplerNode;5;-877.3242,23.68254;Inherit;True;Property;_MainTex;MainTex;1;0;Create;True;0;0;False;0;False;-1;None;36586ed798fe0ee4e8d725795ae2b78b;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;3;-465.6368,145.5975;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;2;-468.2368,-22.10244;Inherit;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.SamplerNode;26;-721.8311,479.8636;Inherit;True;Property;_MaskTex;MaskTex;2;0;Create;True;0;0;False;0;False;-1;None;fb185c9c5e307f249a3f54b1e3ad18f1;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;1;-263.6312,46.83092;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;-52.04386,-11.12805;Float;False;True;-1;3;ASEMaterialInspector;0;0;Unlit;Shader/ADD_Top3;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Off;2;False;-1;7;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.61;True;False;0;True;Opaque;;Overlay;All;14;all;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;False;4;1;False;-1;1;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;0;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
WireConnection;18;0;20;0
WireConnection;19;0;18;0
WireConnection;19;1;14;0
WireConnection;19;2;15;0
WireConnection;19;3;21;0
WireConnection;19;4;16;0
WireConnection;5;1;19;0
WireConnection;3;0;7;4
WireConnection;3;1;5;4
WireConnection;3;2;8;4
WireConnection;2;0;7;0
WireConnection;2;1;5;0
WireConnection;2;2;8;0
WireConnection;1;0;2;0
WireConnection;1;1;3;0
WireConnection;0;2;1;0
WireConnection;0;10;26;4
ASEEND*/
//CHKSM=E42E46E6B02571535AC269A2D5D260CABFBBDC33

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 195db8f2e518c9a43b827a7e936fa7f9
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,185 @@
// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "AX_ASEWater_Alpha"
{
Properties
{
_Glossiness("Glossiness", Range( 0 , 1)) = 0
_NormalMap("NormalMap", 2D) = "bump" {}
_UV1Tiling("UV1Tiling", Float) = 0.5
_UV2Tiling("UV2Tiling", Float) = 0.5
_UV1Ani("UV1Ani", Vector) = (0.5,1,0,0)
_UV2Ani("UV2Ani", Vector) = (1,0.5,0,0)
_Normal1Str("Normal1Str", Range( 0 , 2)) = 1
_Normal2Str("Normal2Str", Range( 0 , 2)) = 1
_NormalBleedStr("NormalBleedStr", Range( 0 , 1)) = 0.5
_AddColor("AddColor", Color) = (0,0,0,0)
_AlphaMask("AlphaMask", 2D) = "gray" {}
_MainTex("MainTex", 2D) = "black" {}
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" }
Cull Off
CGPROGRAM
#include "UnityStandardUtils.cginc"
#include "UnityShaderVariables.cginc"
#pragma target 3.0
#pragma surface surf Standard alpha:fade keepalpha noshadow
struct Input
{
float3 worldPos;
INTERNAL_DATA
float2 uv_texcoord;
};
uniform sampler2D _NormalMap;
uniform float _Normal1Str;
uniform float2 _UV1Ani;
uniform float _UV1Tiling;
uniform float _Normal2Str;
uniform float2 _UV2Ani;
uniform float _UV2Tiling;
uniform float _NormalBleedStr;
uniform float4 _AddColor;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform float _Glossiness;
uniform sampler2D _AlphaMask;
uniform float4 _AlphaMask_ST;
void surf( Input i , inout SurfaceOutputStandard o )
{
float3 ase_worldPos = i.worldPos;
float2 appendResult14 = (float2(ase_worldPos.x , ase_worldPos.z));
float2 WorldUV17 = ( appendResult14 / 1.0 );
float2 panner25 = ( _Time.x * _UV1Ani + ( WorldUV17 * _UV1Tiling ));
float2 _UV142 = panner25;
float2 panner26 = ( _Time.x * _UV2Ani + ( WorldUV17 * _UV2Tiling ));
float2 _UV243 = panner26;
float3 lerpResult55 = lerp( UnpackScaleNormal( tex2D( _NormalMap, _UV142 ), _Normal1Str ) , UnpackScaleNormal( tex2D( _NormalMap, _UV243 ), _Normal2Str ) , _NormalBleedStr);
float3 _Normal11 = lerpResult55;
o.Normal = _Normal11;
float4 color61 = IsGammaSpace() ? float4(0,0.3679245,0.07802074,0) : float4(0,0.1114872,0.006943853,0);
float4 color62 = IsGammaSpace() ? float4(0.01900144,0.5754717,0.1416895,0) : float4(0.0014707,0.2906642,0.01775288,0);
float3 ase_worldViewDir = normalize( UnityWorldSpaceViewDir( ase_worldPos ) );
float fresnelNdotV60 = dot( half3(0,0,0), ase_worldViewDir );
float fresnelNode60 = ( 0.0 + 1.0 * pow( 1.0 - fresnelNdotV60, 1.336 ) );
float4 lerpResult63 = lerp( color61 , color62 , fresnelNode60);
float4 _Color8 = lerpResult63;
float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
o.Albedo = ( _Color8 * _AddColor * tex2D( _MainTex, uv_MainTex ) ).rgb;
o.Smoothness = _Glossiness;
float2 uv_AlphaMask = i.uv_texcoord * _AlphaMask_ST.xy + _AlphaMask_ST.zw;
o.Alpha = ( _AddColor.a * tex2D( _AlphaMask, uv_AlphaMask ).a );
}
ENDCG
}
CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=18100
0;0;1920;1019;132.0311;-228.1922;1;True;True
Node;AmplifyShaderEditor.CommentaryNode;21;-581.5485,-423.2776;Inherit;False;969.6892;330.4077;WorldUV;5;13;16;15;14;17;;1,1,1,1;0;0
Node;AmplifyShaderEditor.WorldPosInputsNode;13;-471.0061,-316.7304;Float;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
Node;AmplifyShaderEditor.DynamicAppendNode;14;-239.267,-320.7257;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.RangedFloatNode;16;-257.9126,-188.8738;Float;False;Constant;_UVScale;UV Scale;1;0;Create;True;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleDivideOpNode;15;-15.51847,-299.4166;Inherit;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.CommentaryNode;22;-599.8488,-39.30635;Inherit;False;1259.341;575.7091;UV1 && 2;17;25;32;33;23;37;19;24;36;26;40;41;18;31;30;38;42;43;;1,1,1,1;0;0
Node;AmplifyShaderEditor.RegisterLocalVarNode;17;133.6477,-296.9228;Float;False;WorldUV;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.GetLocalVarNode;18;-553.2344,23.28997;Inherit;False;17;WorldUV;1;0;OBJECT;0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.WireNode;40;-373.4544,176.6533;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.WireNode;31;-374.7862,-7.140162;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.WireNode;32;-179.0073,-5.808331;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.RangedFloatNode;36;-309.5089,255.5815;Float;False;Property;_UV2Tiling;UV2Tiling;3;0;Create;True;0;0;False;0;False;0.5;0.12;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;19;-317.4987,23.29001;Float;False;Property;_UV1Tiling;UV1Tiling;2;0;Create;True;0;0;False;0;False;0.5;0.15;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.WireNode;41;-159.0296,240.5814;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.Vector2Node;24;-320.1638,100.5365;Float;False;Property;_UV1Ani;UV1Ani;4;0;Create;True;0;0;False;0;False;0.5,1;-1,1;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
Node;AmplifyShaderEditor.TimeNode;23;-565.2219,293.6529;Inherit;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;30;-132.3748,20.84636;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;38;-103.0741,273.8952;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.Vector2Node;37;-318.8315,344.4825;Float;False;Property;_UV2Ani;UV2Ani;5;0;Create;True;0;0;False;0;False;1,0.5;0.7,-0.7;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
Node;AmplifyShaderEditor.WireNode;33;-16.52298,99.40674;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.CommentaryNode;58;-590.6478,1455.601;Inherit;False;1255.664;562.6063;Color;6;59;60;61;62;63;8;;1,1,1,1;0;0
Node;AmplifyShaderEditor.PannerNode;26;90.04159,306.9712;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
Node;AmplifyShaderEditor.PannerNode;25;88.71041,29.94914;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
Node;AmplifyShaderEditor.RegisterLocalVarNode;42;361.26,49.28922;Float;False;_UV1;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.RegisterLocalVarNode;43;356.4601,405.403;Float;False;_UV2;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.GetLocalVarNode;59;-572.8547,1843.887;Inherit;False;-1;;1;0;OBJECT;0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.CommentaryNode;44;-597.9501,597.8091;Inherit;False;1259.653;812.7613;Normal Map;10;45;46;47;48;53;54;55;56;11;52;;1,1,1,1;0;0
Node;AmplifyShaderEditor.ColorNode;62;-347.0926,1688.329;Float;False;Constant;_ColorShallow;ColorShallow;2;0;Create;True;0;0;False;0;False;0.01900144,0.5754717,0.1416895,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.GetLocalVarNode;45;-549.3221,707.0388;Inherit;False;42;_UV1;1;0;OBJECT;0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.RangedFloatNode;53;-553.2796,1153.345;Float;False;Property;_Normal1Str;Normal1Str;6;0;Create;True;0;0;False;0;False;1;0.48;0;2;0;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;54;-554.8792,1250.946;Float;False;Property;_Normal2Str;Normal2Str;7;0;Create;True;0;0;False;0;False;1;1;0;2;0;1;FLOAT;0
Node;AmplifyShaderEditor.TexturePropertyNode;52;-569.8863,901.1433;Float;True;Property;_NormalMap;NormalMap;1;0;Create;True;0;0;False;0;False;None;None;True;bump;Auto;Texture2D;-1;0;1;SAMPLER2D;0
Node;AmplifyShaderEditor.ColorNode;61;-347.122,1515.136;Float;False;Constant;_ColorDeep;ColorDeep;2;0;Create;True;0;0;False;0;False;0,0.3679245,0.07802074,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.GetLocalVarNode;46;-547.0048,796.5462;Inherit;False;43;_UV2;1;0;OBJECT;0;False;1;FLOAT2;0
Node;AmplifyShaderEditor.FresnelNode;60;-138.0549,1845.402;Inherit;False;Standard;WorldNormal;ViewDir;False;False;5;0;FLOAT3;0,0,1;False;4;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;1.336;False;1;FLOAT;0
Node;AmplifyShaderEditor.SamplerNode;47;-160.5684,693.0186;Inherit;True;Property;_NormalMap1Input;NormalMap1(Input);1;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;True;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.RangedFloatNode;56;-167.6795,1252.546;Float;False;Property;_NormalBleedStr;NormalBleedStr;8;0;Create;True;0;0;False;0;False;0.5;0.443;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.LerpOp;63;148.2771,1622.7;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.SamplerNode;48;-162.4713,988.3076;Inherit;True;Property;_NormalMap2Input;NormalMap2(Input);2;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;True;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.LerpOp;55;237.1201,897.3455;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.RegisterLocalVarNode;8;383.4643,1619.956;Float;False;_Color;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.SamplerNode;69;698.5896,124.4992;Inherit;True;Property;_MainTex;MainTex;11;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;black;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SamplerNode;67;693.3245,599.9091;Inherit;True;Property;_AlphaMask;AlphaMask;10;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;gray;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.ColorNode;64;693.2429,427.8032;Float;False;Property;_AddColor;AddColor;9;0;Create;True;0;0;False;0;False;0,0,0,0;0,0,0,0.3294118;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.GetLocalVarNode;7;693.8083,333.5148;Inherit;False;8;_Color;1;0;OBJECT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.RegisterLocalVarNode;11;441.1202,891.3295;Float;False;_Normal;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.RangedFloatNode;12;792.968,892.5743;Float;False;Property;_Glossiness;Glossiness;0;0;Create;True;0;0;False;0;False;0;0.565;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.GetLocalVarNode;9;794.9682,809.2741;Inherit;False;11;_Normal;1;0;OBJECT;0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;65;961.7228,353.9237;Inherit;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;68;1079.327,602.3066;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;1364.823,569.4403;Float;False;True;-1;2;ASEMaterialInspector;0;0;Standard;AX_ASEWater_Alpha;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;False;False;False;False;False;False;Off;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Transparent;0.5;True;False;0;False;Transparent;;Transparent;All;14;all;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;False;2;5;False;-1;10;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;16;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
WireConnection;14;0;13;1
WireConnection;14;1;13;3
WireConnection;15;0;14;0
WireConnection;15;1;16;0
WireConnection;17;0;15;0
WireConnection;40;0;18;0
WireConnection;31;0;18;0
WireConnection;32;0;31;0
WireConnection;41;0;40;0
WireConnection;30;0;32;0
WireConnection;30;1;19;0
WireConnection;38;0;41;0
WireConnection;38;1;36;0
WireConnection;33;0;24;0
WireConnection;26;0;38;0
WireConnection;26;2;37;0
WireConnection;26;1;23;1
WireConnection;25;0;30;0
WireConnection;25;2;33;0
WireConnection;25;1;23;1
WireConnection;42;0;25;0
WireConnection;43;0;26;0
WireConnection;60;0;59;0
WireConnection;47;0;52;0
WireConnection;47;1;45;0
WireConnection;47;5;53;0
WireConnection;63;0;61;0
WireConnection;63;1;62;0
WireConnection;63;2;60;0
WireConnection;48;0;52;0
WireConnection;48;1;46;0
WireConnection;48;5;54;0
WireConnection;55;0;47;0
WireConnection;55;1;48;0
WireConnection;55;2;56;0
WireConnection;8;0;63;0
WireConnection;11;0;55;0
WireConnection;65;0;7;0
WireConnection;65;1;64;0
WireConnection;65;2;69;0
WireConnection;68;0;64;4
WireConnection;68;1;67;4
WireConnection;0;0;65;0
WireConnection;0;1;9;0
WireConnection;0;4;12;0
WireConnection;0;9;68;0
ASEEND*/
//CHKSM=15EB37CD2AA5071EAB1DC34DB29AB322D35E6C11

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f7f5bb75403e29443bcab91aea34f68d
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using UnityEngine;
using System.Collections;
public class Delay : MonoBehaviour {
public float delayTime = 1.0f;
// Use this for initialization
void Start () {
gameObject.SetActiveRecursively(false);
Invoke("DelayFunc", delayTime);
}
void DelayFunc()
{
gameObject.SetActiveRecursively(true);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bbdf49af501329649b063b1d5a79633d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,111 @@
// Made with
// Available
Shader "Shader/Fresnel"
{
Properties
{
[HDR]_OutColor("OutColor", Color) = (0.2218858,0.419401,0.5588235,0)
[HDR]_InColor("InColor", Color) = (0.8235294,0.8235294,0.8235294,0)
[Toggle]_ColorInvert("Color-Invert", Float) = 1
_ColorPower("Color-Power", Range( 0 , 30)) = 6.318185
_ColorScale("Color-Scale", Range( 0 , 2)) = 1.430902
[Toggle]_OpaFreInvert("Opa-Fre-Invert", Float) = 1
_OpaPower("Opa-Power", Range( 0 , 30)) = 6.318185
_OpaScale("Opa-Scale", Range( 0 , 2)) = 1.430902
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "IsEmissive" = "true" }
Cull Back
CGPROGRAM
#pragma target 3.0
#pragma surface surf Unlit alpha:fade keepalpha noshadow
struct Input
{
float3 worldPos;
float3 worldNormal;
float4 vertexColor : COLOR;
};
uniform float4 _InColor;
uniform float4 _OutColor;
uniform float _ColorInvert;
uniform float _ColorScale;
uniform float _ColorPower;
uniform float _OpaFreInvert;
uniform float _OpaScale;
uniform float _OpaPower;
inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
{
return half4 ( 0, 0, 0, s.Alpha );
}
void surf( Input i , inout SurfaceOutput o )
{
float3 ase_worldPos = i.worldPos;
float3 ase_worldViewDir = normalize( UnityWorldSpaceViewDir( ase_worldPos ) );
float3 ase_worldNormal = i.worldNormal;
float fresnelNdotV45 = dot( ase_worldNormal, ase_worldViewDir );
float fresnelNode45 = ( 0.0 + _ColorScale * pow( 1.0 - fresnelNdotV45, _ColorPower ) );
float4 lerpResult90 = lerp( _InColor , _OutColor , lerp(saturate( ( 1.0 - fresnelNode45 ) ),saturate( fresnelNode45 ),_ColorInvert));
o.Emission = lerpResult90.rgb;
float fresnelNdotV97 = dot( ase_worldNormal, ase_worldViewDir );
float fresnelNode97 = ( 0.0 + _OpaScale * pow( 1.0 - fresnelNdotV97, _OpaPower ) );
o.Alpha = ( lerp(saturate( ( 1.0 - fresnelNode97 ) ),saturate( fresnelNode97 ),_OpaFreInvert) * i.vertexColor.a );
}
ENDCG
}
CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=16400
1995;359;1906;1004;1307.273;1062.658;3.112691;True;False
Node;AmplifyShaderEditor.CommentaryNode;94;-342.2705,752.6075;Float;False;1777.752;850.882;Comment;6;100;99;98;97;96;95;;1,1,1,1;0;0
Node;AmplifyShaderEditor.CommentaryNode;67;-333.5637,-217.9295;Float;False;1777.752;850.882;Comment;6;51;50;48;45;47;46;;1,1,1,1;0;0
Node;AmplifyShaderEditor.RangedFloatNode;95;-159.3706,952.251;Float;False;Property;_OpaScale;Opa-Scale;7;0;Create;True;0;0;False;0;1.430902;2;0;2;0;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;96;-183.3571,1086.995;Float;False;Property;_OpaPower;Opa-Power;6;0;Create;True;0;0;False;0;6.318185;1.1;0;30;0;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;46;-150.6637,-18.28638;Float;False;Property;_ColorScale;Color-Scale;4;0;Create;True;0;0;False;0;1.430902;1.69;0;2;0;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;47;-166.9729,79.78004;Float;False;Property;_ColorPower;Color-Power;3;0;Create;True;0;0;False;0;6.318185;30;0;30;0;1;FLOAT;0
Node;AmplifyShaderEditor.FresnelNode;97;205.8207,911.3311;Float;True;Standard;WorldNormal;ViewDir;False;5;0;FLOAT3;0,0,1;False;4;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;5;False;1;FLOAT;0
Node;AmplifyShaderEditor.FresnelNode;45;214.5276,-59.2061;Float;True;Standard;WorldNormal;ViewDir;False;5;0;FLOAT3;0,0,1;False;4;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;5;False;1;FLOAT;0
Node;AmplifyShaderEditor.OneMinusNode;98;690.1237,805.5938;Float;True;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.OneMinusNode;48;698.8306,-164.9433;Float;True;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SaturateNode;99;923.3312,1032.406;Float;True;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SaturateNode;100;917.3685,802.9636;Float;True;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SaturateNode;50;926.0754,-167.5736;Float;True;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SaturateNode;51;932.0386,61.86871;Float;True;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.ToggleSwitchNode;52;1646.193,746.6812;Float;True;Property;_OpaFreInvert;Opa-Fre-Invert;5;0;Create;True;0;0;False;0;1;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.VertexColorNode;103;1718.173,1021.97;Float;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.ColorNode;91;1639.59,-207.9972;Float;False;Property;_InColor;InColor;1;1;[HDR];Create;True;0;0;False;0;0.8235294,0.8235294,0.8235294,0;0.1544118,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.ToggleSwitchNode;93;1628.945,189.0848;Float;True;Property;_ColorInvert;Color-Invert;2;0;Create;True;0;0;False;0;1;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.ColorNode;92;1643.045,-25.10366;Float;False;Property;_OutColor;OutColor;0;1;[HDR];Create;True;0;0;False;0;0.2218858,0.419401,0.5588235,0;1.862,1.201047,0.4928824,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.LerpOp;90;2054.805,141.316;Float;True;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;101;2032.478,856.6017;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;2632.043,322.6477;Float;False;True;2;Float;ASEMaterialInspector;0;0;Unlit;E3DEffect/Fresnel/E3D-Fre;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;False;False;False;False;False;False;Back;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Transparent;0.5;True;False;0;False;Transparent;;Transparent;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;False;2;5;False;-1;10;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
WireConnection;97;2;95;0
WireConnection;97;3;96;0
WireConnection;45;2;46;0
WireConnection;45;3;47;0
WireConnection;98;0;97;0
WireConnection;48;0;45;0
WireConnection;99;0;97;0
WireConnection;100;0;98;0
WireConnection;50;0;48;0
WireConnection;51;0;45;0
WireConnection;52;0;100;0
WireConnection;52;1;99;0
WireConnection;93;0;50;0
WireConnection;93;1;51;0
WireConnection;90;0;91;0
WireConnection;90;1;92;0
WireConnection;90;2;93;0
WireConnection;101;0;52;0
WireConnection;101;1;103;4
WireConnection;0;2;90;0
WireConnection;0;9;101;0
ASEEND*/
//CHKSM=8B868DA9DA70DFDB5F3BC612C5399AFCEF6CB269

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3402bdf211b92f64881bbc28cdb4af10
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,114 @@
// Shader created with Shader Forge v1.38
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:1,grmd:0,uamb:False,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:0,nrsp:0,vomd:1,spxs:False,tesm:0,olmd:1,culm:2,bsrc:0,bdst:7,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:35135,y:32442,varname:node_0,prsc:2|emission-8282-OUT,alpha-2453-OUT,refract-14-OUT;n:type:ShaderForge.SFN_Multiply,id:14,x:34895,y:32726,varname:node_14,prsc:2|A-16-OUT,B-6401-A,C-4651-OUT;n:type:ShaderForge.SFN_ComponentMask,id:16,x:34702,y:32651,varname:node_16,prsc:2,cc1:0,cc2:1,cc3:-1,cc4:-1|IN-25-RGB;n:type:ShaderForge.SFN_Tex2d,id:25,x:34459,y:32582,ptovrint:False,ptlb:Refraction,ptin:_Refraction,varname:_Refraction,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:a62081ff6e02478489ab84d5399e2c1b,ntxv:0,isnm:False;n:type:ShaderForge.SFN_VertexColor,id:6401,x:34458,y:32829,varname:node_6401,prsc:2;n:type:ShaderForge.SFN_Slider,id:4651,x:34397,y:33053,ptovrint:True,ptlb:Refraction Intensity,ptin:_RefractionIntensity,varname:_RefractionIntensity,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.5,max:0.5;n:type:ShaderForge.SFN_Clamp,id:5272,x:32650,y:33603,varname:node_5272,prsc:2|MIN-8142-OUT,MAX-4797-OUT;n:type:ShaderForge.SFN_ValueProperty,id:4797,x:32213,y:33674,ptovrint:False,ptlb:node_7492_copy,ptin:_node_7492_copy,varname:_node_7492_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1;n:type:ShaderForge.SFN_ValueProperty,id:8142,x:32213,y:33590,ptovrint:False,ptlb:node_547_copy,ptin:_node_547_copy,varname:_node_547_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0;n:type:ShaderForge.SFN_Multiply,id:2453,x:34879,y:32932,varname:node_2453,prsc:2|A-25-RGB,B-6401-A,C-4651-OUT;n:type:ShaderForge.SFN_Multiply,id:8282,x:34699,y:32449,varname:node_8282,prsc:2|A-25-RGB,B-6401-RGB;proporder:25-4651;pass:END;sub:END;*/
Shader "Shader/Niu_qu_x" {
Properties {
_Refraction ("Refraction", 2D) = "white" {}
_RefractionIntensity ("Refraction Intensity", Range(0, 0.5)) = 0.5
[HideInInspector]_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
}
SubShader {
Tags {
"IgnoreProjector"="True"
"Queue"="Transparent"
"RenderType"="Transparent"
}
LOD 200
GrabPass{ }
Pass {
Name "FORWARD"
Tags {
"LightMode"="ForwardBase"
}
Blend One OneMinusSrcAlpha
Cull Off
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_FORWARDBASE
#include "UnityCG.cginc"
#pragma multi_compile_fwdbase
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu
#pragma target 3.0
uniform sampler2D _GrabTexture;
uniform sampler2D _Refraction; uniform float4 _Refraction_ST;
uniform float _RefractionIntensity;
struct VertexInput {
float4 vertex : POSITION;
float2 texcoord0 : TEXCOORD0;
float4 vertexColor : COLOR;
};
struct VertexOutput {
float4 pos : SV_POSITION;
float2 uv0 : TEXCOORD0;
float4 vertexColor : COLOR;
float4 projPos : TEXCOORD1;
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.uv0 = v.texcoord0;
o.vertexColor = v.vertexColor;
o.pos = UnityObjectToClipPos( v.vertex );
o.projPos = ComputeScreenPos (o.pos);
COMPUTE_EYEDEPTH(o.projPos.z);
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
float4 _Refraction_var = tex2D(_Refraction,TRANSFORM_TEX(i.uv0, _Refraction));
float2 sceneUVs = (i.projPos.xy / i.projPos.w) + (_Refraction_var.rgb.rg*i.vertexColor.a*_RefractionIntensity);
float4 sceneColor = tex2D(_GrabTexture, sceneUVs);
////// Lighting:
////// Emissive:
float3 emissive = (_Refraction_var.rgb*i.vertexColor.rgb);
float3 finalColor = emissive;
return fixed4(lerp(sceneColor.rgb, finalColor,(_Refraction_var.rgb*i.vertexColor.a*_RefractionIntensity)),1);
}
ENDCG
}
Pass {
Name "ShadowCaster"
Tags {
"LightMode"="ShadowCaster"
}
Offset 1, 1
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_SHADOWCASTER
#include "UnityCG.cginc"
#include "Lighting.cginc"
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_shadowcaster
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal d3d11_9x xboxone ps4 psp2 n3ds wiiu
#pragma target 3.0
struct VertexInput {
float4 vertex : POSITION;
};
struct VertexOutput {
V2F_SHADOW_CASTER;
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.pos = UnityObjectToClipPos( v.vertex );
TRANSFER_SHADOW_CASTER(o)
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
}
FallBack "Diffuse"
CustomEditor "ShaderForgeMaterialInspector"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b015cfde42714a541af1eb96638a79b7
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,199 @@
//using Assets.Script.Base;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(ParticleSystem))]
public class ParticleMove : MonoBehaviour
{
[Tooltip("移动类型point为到目标位置Circle为绕目标旋转")]
public MoveTypeEnum MoveType;
[Tooltip("point时为目标位置Circle时为圆心点")]
public Transform TargetPosition;
[Tooltip("角度为90270分别顺逆时间转")]
[Range(0, 360)]
public float P = 1;
public float MoveTime;
private float Speed;
float Distance;
ParticleSystem particleSys;
ParticleSystem.Particle[] particleArray;
public enum MoveTypeEnum
{
Point,
Circle
//以后需要啥加啥先这2种
}
void Start()
{
particleSys = GetComponent<ParticleSystem>();
if (particleArray == null || particleArray.Length < particleSys.main.maxParticles)
particleArray = new ParticleSystem.Particle[particleSys.main.maxParticles];
//////Debug.Log((P2 - P1).magnitude);
}
void LateUpdate()
{
//if (TargetPosition == null)
//{
// if (m_Target != null)
// {
// TargetPosition = m_Target.transform;
// }
//}
if (TargetPosition != null)
{
MoveFunc();
}
}
void MoveFunc()
{
var numParticlesAlive = particleSys.GetParticles(particleArray);
for (int i = 0; i < numParticlesAlive; i++)
{
if (particleSys.shape.shapeType == ParticleSystemShapeType.SkinnedMeshRenderer || particleSys.shape.shapeType == ParticleSystemShapeType.MeshRenderer)
{
MainMoveFuncByMesh(i);
}
else
{
MainMoveFunc(i);
}
}
particleSys.SetParticles(particleArray, numParticlesAlive);
}
void MainMoveFunc(int i)
{
if (MoveType == MoveTypeEnum.Point)
{
if (particleSys.main.simulationSpace == ParticleSystemSimulationSpace.Local)
{
//realyPos.position = transform.TransformPoint(particleArray[i].position);
Vector3 normalize = (transform.InverseTransformPoint(TargetPosition.position) - particleArray[i].position).normalized;
Distance = (transform.InverseTransformPoint(TargetPosition.position) - particleArray[i].position).magnitude;
Speed = Distance / MoveTime;
// particleArray[i].position = new Vector3(particleArray[i].position.x*normalize.x, particleArray[i].position.y * normalize.z, particleArray[i].position.z * normalize.y) * Speed ;
particleArray[i].position += normalize * Speed;
}
if (particleSys.main.simulationSpace == ParticleSystemSimulationSpace.World)
{
movePointByWorld(i);
}
}
if (MoveType == MoveTypeEnum.Circle)
{
if (particleSys.main.simulationSpace == ParticleSystemSimulationSpace.Local)
{
Vector3 normalize = (transform.InverseTransformPoint(TargetPosition.position) - particleArray[i].position).normalized;
Distance = (transform.InverseTransformPoint(TargetPosition.position) - particleArray[i].position).magnitude;
Speed = Distance / MoveTime;
Vector2 v21 = RotationMatrix(new Vector2(normalize.x, normalize.y), P);
particleArray[i].position += new Vector3(v21.x, v21.y, normalize.z) * Speed;
}
if (particleSys.main.simulationSpace == ParticleSystemSimulationSpace.World)
{
moveCircleByWorld(i);
}
}
}
void MainMoveFuncByMesh(int i)
{
if (MoveType == MoveTypeEnum.Point)
{
if (particleSys.main.simulationSpace == ParticleSystemSimulationSpace.Local)
{
//particleSys.simulationSpace = ParticleSystemSimulationSpace.World;
ParticleSystem.MainModule mainModule = particleSys.main;
mainModule.simulationSpace = ParticleSystemSimulationSpace.World;
}
if (particleSys.main.simulationSpace == ParticleSystemSimulationSpace.World)
{
movePointByWorld(i);
}
}
if (MoveType == MoveTypeEnum.Circle)
{
if (particleSys.main.simulationSpace == ParticleSystemSimulationSpace.Local)
{
//particleSys.simulationSpace = ParticleSystemSimulationSpace.World;
ParticleSystem.MainModule mainModule = particleSys.main;
mainModule.simulationSpace = ParticleSystemSimulationSpace.World;
}
if (particleSys.main.simulationSpace == ParticleSystemSimulationSpace.World)
{
moveCircleByWorld(i);
}
}
}
void moveCircleByWorld(int i)
{
Vector3 normalize = (TargetPosition.position - particleArray[i].position).normalized;
Distance = (TargetPosition.position - particleArray[i].position).magnitude;
Speed = Distance / MoveTime;
Vector2 v21 = RotationMatrix(new Vector2(normalize.x, normalize.z), P);
particleArray[i].position += new Vector3(v21.x, normalize.y, v21.y) * Speed;
}
void movePointByWorld(int i)
{
//这行只是测试初始点位置用的
//realyPos.position = transform.InverseTransformPoint(particleArray[i].position).normalized;
Vector3 Devil = TargetPosition.position - particleArray[i].position;
if (Mathf.Abs(Devil.x) >= 0.01f && Mathf.Abs(Devil.y) >= 0.01f && Mathf.Abs(Devil.z) >= 0.01f)
{
Vector3 normalize = Devil.normalized;
Distance = (TargetPosition.position - particleArray[i].position).magnitude;
Speed = Distance / MoveTime;
particleArray[i].position += normalize * Speed;
}
}
private Vector2 RotationMatrix(Vector2 v, float angle)
{
var x = v.x;
var y = v.y;
var sin = Mathf.Sin(Mathf.PI * angle / 180);
var cos = Mathf.Cos(Mathf.PI * angle / 180);
var newX = x * cos + y * sin;
var newY = x * -sin + y * cos;
return new Vector2((float)newX, (float)newY);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 44df4cd05c55d934a9cb551c4cf5d5cd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,92 @@
//
//
Shader "Shader/Rj"
{
Properties
{
_MainTex("MainTex", 2D) = "white" {}
_NoiseTex("NoiseTex", 2D) = "white" {}
_NoiseSpeed("NoiseSpeed", Vector) = (1,1,0,0)
_NoisePower("NoisePower", Range( 0 , 1)) = 0
_Alpha("Alpha", Range( 0 , 1)) = 0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "IsEmissive" = "true" }
Cull Back
CGPROGRAM
#include "UnityShaderVariables.cginc"
#pragma target 3.0
#pragma surface surf Unlit alpha:fade keepalpha noshadow
struct Input
{
float2 uv_texcoord;
float4 vertexColor : COLOR;
};
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform sampler2D _NoiseTex;
uniform float2 _NoiseSpeed;
uniform float4 _NoiseTex_ST;
uniform float _NoisePower;
uniform float _Alpha;
inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
{
return half4 ( 0, 0, 0, s.Alpha );
}
void surf( Input i , inout SurfaceOutput o )
{
float2 uv0_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
float2 uv0_NoiseTex = i.uv_texcoord * _NoiseTex_ST.xy + _NoiseTex_ST.zw;
float2 panner18 = ( _Time.y * _NoiseSpeed + uv0_NoiseTex);
float4 tex2DNode1 = tex2D( _MainTex, ( float4( uv0_MainTex, 0.0 , 0.0 ) + ( tex2D( _NoiseTex, panner18 ) * _NoisePower ) ).rg );
o.Emission = ( tex2DNode1 * i.vertexColor ).rgb;
o.Alpha = ( tex2DNode1.a * i.vertexColor.a * _Alpha );
}
ENDCG
}
CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=17500
1962;26;1906;1004;2432.647;535.2386;1;True;False
Node;AmplifyShaderEditor.TextureCoordinatesNode;16;-1922.365,-227.7986;Inherit;False;0;20;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.Vector2Node;17;-1873.365,-76.79874;Inherit;False;Property;_NoiseSpeed;NoiseSpeed;2;0;Create;True;0;0;False;0;1,1;0.1,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
Node;AmplifyShaderEditor.SimpleTimeNode;15;-1889.365,98.20135;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
Node;AmplifyShaderEditor.PannerNode;18;-1610.366,-60.79875;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
Node;AmplifyShaderEditor.SamplerNode;20;-1410.366,-83.79874;Inherit;True;Property;_NoiseTex;NoiseTex;1;0;Create;True;0;0;False;0;-1;None;1044185bb74b29a49b3d75455fa2098b;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.RangedFloatNode;19;-1422.366,136.2014;Inherit;False;Property;_NoisePower;NoisePower;3;0;Create;True;0;0;False;0;0;0.03;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;21;-1090.5,-18.80687;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.TextureCoordinatesNode;22;-1225.31,-229.8289;Inherit;False;0;1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleAddOpNode;23;-904.3657,-96.79873;Inherit;False;2;2;0;FLOAT2;0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.SamplerNode;1;-752,-78;Inherit;True;Property;_MainTex;MainTex;0;0;Create;True;0;0;False;0;-1;None;d12eebc40a67eb149a5650795cb8cb63;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.VertexColorNode;2;-658.3046,169.159;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.RangedFloatNode;24;-754.4072,353.3641;Inherit;False;Property;_Alpha;Alpha;4;0;Create;True;0;0;False;0;0;0.94;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;14;-331,215;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;3;-313.3067,23.87469;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;0,0;Float;False;True;-1;2;ASEMaterialInspector;0;0;Unlit;E3DEffect/BackGroundE3DEffect/BackGround2;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;False;False;False;False;False;False;Back;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Transparent;0.5;True;False;0;False;Transparent;;Transparent;All;14;all;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;False;2;5;False;-1;10;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
WireConnection;18;0;16;0
WireConnection;18;2;17;0
WireConnection;18;1;15;0
WireConnection;20;1;18;0
WireConnection;21;0;20;0
WireConnection;21;1;19;0
WireConnection;23;0;22;0
WireConnection;23;1;21;0
WireConnection;1;1;23;0
WireConnection;14;0;1;4
WireConnection;14;1;2;4
WireConnection;14;2;24;0
WireConnection;3;0;1;0
WireConnection;3;1;2;0
WireConnection;0;2;3;0
WireConnection;0;9;14;0
ASEEND*/
//CHKSM=8BBFDF51A1F8B59954ED64FE15DCA9215624B4C0

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 45a66df4f7681b947b7991f5104ce5a1
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,234 @@
// Shader created with Shader Forge v1.38
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:2,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:4013,x:32719,y:32712,varname:node_4013,prsc:2|diff-8031-OUT,emission-747-OUT,alpha-1624-OUT,clip-2902-OUT;n:type:ShaderForge.SFN_Tex2d,id:8753,x:32119,y:32536,ptovrint:False,ptlb:Texture,ptin:_Texture,varname:node_8753,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:a5bc3a675049c4941bcbfd66b39a675e,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:9325,x:31477,y:32697,ptovrint:False,ptlb:RongJie,ptin:_RongJie,varname:node_9325,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:a62081ff6e02478489ab84d5399e2c1b,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Divide,id:2902,x:32402,y:33060,varname:node_2902,prsc:2|A-9325-B,B-7140-OUT;n:type:ShaderForge.SFN_Color,id:611,x:31942,y:32739,ptovrint:False,ptlb:texrure_color,ptin:_texrure_color,varname:node_611,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Multiply,id:747,x:32430,y:32537,varname:node_747,prsc:2|A-8753-RGB,B-611-RGB,C-8753-A;n:type:ShaderForge.SFN_Fresnel,id:2609,x:31842,y:32315,varname:node_2609,prsc:2|NRM-505-OUT,EXP-7998-OUT;n:type:ShaderForge.SFN_NormalVector,id:505,x:31308,y:32245,prsc:2,pt:False;n:type:ShaderForge.SFN_Slider,id:7998,x:31204,y:32465,ptovrint:False,ptlb:fanwei,ptin:_fanwei,varname:node_7998,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:2.312539,max:10;n:type:ShaderForge.SFN_Color,id:6536,x:31775,y:32182,ptovrint:False,ptlb:glow_color,ptin:_glow_color,varname:node_6536,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Multiply,id:2535,x:32092,y:32256,varname:node_2535,prsc:2|A-2609-OUT,B-6536-RGB,C-1911-OUT;n:type:ShaderForge.SFN_Slider,id:1911,x:31704,y:32503,ptovrint:False,ptlb:liangdu,ptin:_liangdu,varname:node_1911,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.9401709,max:5;n:type:ShaderForge.SFN_Color,id:2684,x:32129,y:32385,ptovrint:False,ptlb:texrure_color2,ptin:_texrure_color2,varname:node_2684,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Multiply,id:1142,x:32370,y:32333,varname:node_1142,prsc:2|A-8753-RGB,B-2684-RGB;n:type:ShaderForge.SFN_Add,id:8031,x:32539,y:32229,varname:node_8031,prsc:2|A-2535-OUT,B-1142-OUT;n:type:ShaderForge.SFN_Multiply,id:1624,x:32395,y:32692,varname:node_1624,prsc:2|A-8753-A,B-4633-OUT;n:type:ShaderForge.SFN_Slider,id:4633,x:32067,y:32919,ptovrint:False,ptlb:opacity,ptin:_opacity,varname:node_4633,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:1,max:1;n:type:ShaderForge.SFN_VertexColor,id:3537,x:31050,y:32736,varname:node_3537,prsc:2;n:type:ShaderForge.SFN_Slider,id:1178,x:31380,y:33140,ptovrint:False,ptlb:qiangdu,ptin:_qiangdu,varname:node_1178,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:1,cur:1,max:3;n:type:ShaderForge.SFN_Multiply,id:7140,x:31817,y:33067,varname:node_7140,prsc:2|A-3537-A,B-1178-OUT;proporder:8753-9325-611-7998-6536-1911-2684-4633-1178;pass:END;sub:END;*/
Shader "Shader/Rong_jie_alpha" {
Properties {
_Texture ("Texture", 2D) = "white" {}
_RongJie ("RongJie", 2D) = "white" {}
_texrure_color ("texrure_color", Color) = (1,1,1,1)
_fanwei ("fanwei", Range(0, 10)) = 2.312539
_glow_color ("glow_color", Color) = (1,1,1,1)
_liangdu ("liangdu", Range(0, 5)) = 0.9401709
_texrure_color2 ("texrure_color2", Color) = (1,1,1,1)
_opacity ("opacity", Range(0, 1)) = 1
_qiangdu ("qiangdu", Range(1, 10)) = 1
[HideInInspector]_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
}
SubShader {
Tags {
"IgnoreProjector"="True"
"Queue"="Transparent"
"RenderType"="Transparent"
}
Pass {
Name "FORWARD"
Tags {
"LightMode"="ForwardBase"
}
Blend SrcAlpha OneMinusSrcAlpha
Cull Off
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_FORWARDBASE
#include "UnityCG.cginc"
#pragma multi_compile_fwdbase
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal
#pragma target 3.0
uniform float4 _LightColor0;
uniform sampler2D _Texture; uniform float4 _Texture_ST;
uniform sampler2D _RongJie; uniform float4 _RongJie_ST;
uniform float4 _texrure_color;
uniform float _fanwei;
uniform float4 _glow_color;
uniform float _liangdu;
uniform float4 _texrure_color2;
uniform float _opacity;
uniform float _qiangdu;
struct VertexInput {
float4 vertex : POSITION;
float3 normal : NORMAL;
float2 texcoord0 : TEXCOORD0;
float4 vertexColor : COLOR;
};
struct VertexOutput {
float4 pos : SV_POSITION;
float2 uv0 : TEXCOORD0;
float4 posWorld : TEXCOORD1;
float3 normalDir : TEXCOORD2;
float4 vertexColor : COLOR;
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.uv0 = v.texcoord0;
o.vertexColor = v.vertexColor;
o.normalDir = UnityObjectToWorldNormal(v.normal);
o.posWorld = mul(unity_ObjectToWorld, v.vertex);
float3 lightColor = _LightColor0.rgb;
o.pos = UnityObjectToClipPos( v.vertex );
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
i.normalDir = normalize(i.normalDir);
i.normalDir *= faceSign;
float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz);
float3 normalDirection = i.normalDir;
float4 _RongJie_var = tex2D(_RongJie,TRANSFORM_TEX(i.uv0, _RongJie));
clip((_RongJie_var.b/(i.vertexColor.a*_qiangdu)) - 0.5);
float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz);
float3 lightColor = _LightColor0.rgb;
////// Lighting:
float attenuation = 1;
float3 attenColor = attenuation * _LightColor0.xyz;
/////// Diffuse:
float NdotL = max(0.0,dot( normalDirection, lightDirection ));
float3 directDiffuse = max( 0.0, NdotL) * attenColor;
float3 indirectDiffuse = float3(0,0,0);
indirectDiffuse += UNITY_LIGHTMODEL_AMBIENT.rgb; // Ambient Light
float4 _Texture_var = tex2D(_Texture,TRANSFORM_TEX(i.uv0, _Texture));
float3 diffuseColor = ((pow(1.0-max(0,dot(i.normalDir, viewDirection)),_fanwei)*_glow_color.rgb*_liangdu)+(_Texture_var.rgb*_texrure_color2.rgb));
float3 diffuse = (directDiffuse + indirectDiffuse) * diffuseColor;
////// Emissive:
float3 emissive = (_Texture_var.rgb*_texrure_color.rgb*_Texture_var.a);
/// Final Color:
float3 finalColor = diffuse + emissive;
return fixed4(finalColor,(_Texture_var.a*_opacity));
}
ENDCG
}
Pass {
Name "FORWARD_DELTA"
Tags {
"LightMode"="ForwardAdd"
}
Blend One One
Cull Off
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_FORWARDADD
#include "UnityCG.cginc"
#include "AutoLight.cginc"
#pragma multi_compile_fwdadd
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal
#pragma target 3.0
uniform float4 _LightColor0;
uniform sampler2D _Texture; uniform float4 _Texture_ST;
uniform sampler2D _RongJie; uniform float4 _RongJie_ST;
uniform float4 _texrure_color;
uniform float _fanwei;
uniform float4 _glow_color;
uniform float _liangdu;
uniform float4 _texrure_color2;
uniform float _opacity;
uniform float _qiangdu;
struct VertexInput {
float4 vertex : POSITION;
float3 normal : NORMAL;
float2 texcoord0 : TEXCOORD0;
float4 vertexColor : COLOR;
};
struct VertexOutput {
float4 pos : SV_POSITION;
float2 uv0 : TEXCOORD0;
float4 posWorld : TEXCOORD1;
float3 normalDir : TEXCOORD2;
float4 vertexColor : COLOR;
LIGHTING_COORDS(3,4)
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.uv0 = v.texcoord0;
o.vertexColor = v.vertexColor;
o.normalDir = UnityObjectToWorldNormal(v.normal);
o.posWorld = mul(unity_ObjectToWorld, v.vertex);
float3 lightColor = _LightColor0.rgb;
o.pos = UnityObjectToClipPos( v.vertex );
TRANSFER_VERTEX_TO_FRAGMENT(o)
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
i.normalDir = normalize(i.normalDir);
i.normalDir *= faceSign;
float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz);
float3 normalDirection = i.normalDir;
float4 _RongJie_var = tex2D(_RongJie,TRANSFORM_TEX(i.uv0, _RongJie));
clip((_RongJie_var.b/(i.vertexColor.a*_qiangdu)) - 0.5);
float3 lightDirection = normalize(lerp(_WorldSpaceLightPos0.xyz, _WorldSpaceLightPos0.xyz - i.posWorld.xyz,_WorldSpaceLightPos0.w));
float3 lightColor = _LightColor0.rgb;
////// Lighting:
float attenuation = LIGHT_ATTENUATION(i);
float3 attenColor = attenuation * _LightColor0.xyz;
/////// Diffuse:
float NdotL = max(0.0,dot( normalDirection, lightDirection ));
float3 directDiffuse = max( 0.0, NdotL) * attenColor;
float4 _Texture_var = tex2D(_Texture,TRANSFORM_TEX(i.uv0, _Texture));
float3 diffuseColor = ((pow(1.0-max(0,dot(i.normalDir, viewDirection)),_fanwei)*_glow_color.rgb*_liangdu)+(_Texture_var.rgb*_texrure_color2.rgb));
float3 diffuse = directDiffuse * diffuseColor;
/// Final Color:
float3 finalColor = diffuse;
return fixed4(finalColor * (_Texture_var.a*_opacity),0);
}
ENDCG
}
Pass {
Name "ShadowCaster"
Tags {
"LightMode"="ShadowCaster"
}
Offset 1, 1
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_SHADOWCASTER
#include "UnityCG.cginc"
#include "Lighting.cginc"
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_shadowcaster
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal
#pragma target 3.0
uniform sampler2D _RongJie; uniform float4 _RongJie_ST;
uniform float _qiangdu;
struct VertexInput {
float4 vertex : POSITION;
float2 texcoord0 : TEXCOORD0;
float4 vertexColor : COLOR;
};
struct VertexOutput {
V2F_SHADOW_CASTER;
float2 uv0 : TEXCOORD1;
float4 vertexColor : COLOR;
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.uv0 = v.texcoord0;
o.vertexColor = v.vertexColor;
o.pos = UnityObjectToClipPos( v.vertex );
TRANSFER_SHADOW_CASTER(o)
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
float4 _RongJie_var = tex2D(_RongJie,TRANSFORM_TEX(i.uv0, _RongJie));
clip((_RongJie_var.b/(i.vertexColor.a*_qiangdu)) - 0.5);
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
}
FallBack "Diffuse"
CustomEditor "ShaderForgeMaterialInspector"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: efa2fc029d0919943a82666c1d7c0975
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,120 @@
// Shader created with Shader Forge v1.38
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:2,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:4013,x:33007,y:32678,varname:node_4013,prsc:2|emission-8522-OUT,alpha-9665-OUT;n:type:ShaderForge.SFN_Append,id:3992,x:32315,y:33161,varname:node_3992,prsc:2|A-5089-OUT,B-732-OUT;n:type:ShaderForge.SFN_Multiply,id:4464,x:32558,y:33097,varname:node_4464,prsc:2|A-8475-OUT,B-3992-OUT;n:type:ShaderForge.SFN_TexCoord,id:7020,x:32558,y:32896,varname:node_7020,prsc:2,uv:0,uaff:False;n:type:ShaderForge.SFN_Add,id:9244,x:32717,y:32961,varname:node_9244,prsc:2|A-7020-UVOUT,B-4464-OUT;n:type:ShaderForge.SFN_Tex2d,id:2306,x:32466,y:32672,ptovrint:False,ptlb:node_2306,ptin:_node_2306,varname:node_2306,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:4adfe19f00720c748a9fe05744dc318d,ntxv:0,isnm:False|UVIN-9244-OUT;n:type:ShaderForge.SFN_Slider,id:5089,x:31911,y:33184,ptovrint:False,ptlb:speed_U,ptin:_speed_U,varname:node_5089,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:-2,cur:0,max:2;n:type:ShaderForge.SFN_Slider,id:732,x:31927,y:33337,ptovrint:False,ptlb:speed_V,ptin:_speed_V,varname:_speed_U_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:-2,cur:0,max:2;n:type:ShaderForge.SFN_Color,id:9165,x:32246,y:32408,ptovrint:False,ptlb:node_9165,ptin:_node_9165,varname:node_9165,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Multiply,id:8522,x:32791,y:32625,varname:node_8522,prsc:2|A-2306-RGB,B-9165-RGB;n:type:ShaderForge.SFN_Multiply,id:9665,x:32774,y:32759,varname:node_9665,prsc:2|A-9165-A,B-2306-A,C-630-A;n:type:ShaderForge.SFN_Multiply,id:578,x:32518,y:32495,varname:node_578,prsc:2|A-9165-A,B-2278-OUT;n:type:ShaderForge.SFN_Vector1,id:2278,x:32071,y:32733,varname:node_2278,prsc:2,v1:1;n:type:ShaderForge.SFN_Time,id:8827,x:31821,y:32804,varname:node_8827,prsc:2;n:type:ShaderForge.SFN_Multiply,id:8475,x:32160,y:32918,varname:node_8475,prsc:2|A-8827-T,B-4533-OUT;n:type:ShaderForge.SFN_Slider,id:4533,x:31652,y:32999,ptovrint:False,ptlb:speed_Time,ptin:_speed_Time,varname:node_4533,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.7291719,max:5;n:type:ShaderForge.SFN_VertexColor,id:630,x:31880,y:32604,varname:node_630,prsc:2;proporder:2306-5089-732-9165-4533;pass:END;sub:END;*/
Shader "Shader/Uv" {
Properties {
_node_2306 ("node_2306", 2D) = "white" {}
_speed_U ("speed_U", Range(-2, 2)) = 0
_speed_V ("speed_V", Range(-2, 2)) = 0
_node_9165 ("node_9165", Color) = (1,1,1,1)
_speed_Time ("speed_Time", Range(0, 5)) = 0.7291719
[HideInInspector]_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
}
SubShader {
Tags {
"IgnoreProjector"="True"
"Queue"="Transparent"
"RenderType"="Transparent"
}
Pass {
Name "FORWARD"
Tags {
"LightMode"="ForwardBase"
}
Blend SrcAlpha OneMinusSrcAlpha
Cull Off
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_FORWARDBASE
#include "UnityCG.cginc"
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal
#pragma target 3.0
uniform sampler2D _node_2306; uniform float4 _node_2306_ST;
uniform float _speed_U;
uniform float _speed_V;
uniform float4 _node_9165;
uniform float _speed_Time;
struct VertexInput {
float4 vertex : POSITION;
float2 texcoord0 : TEXCOORD0;
float4 vertexColor : COLOR;
};
struct VertexOutput {
float4 pos : SV_POSITION;
float2 uv0 : TEXCOORD0;
float4 vertexColor : COLOR;
UNITY_FOG_COORDS(1)
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.uv0 = v.texcoord0;
o.vertexColor = v.vertexColor;
o.pos = UnityObjectToClipPos( v.vertex );
UNITY_TRANSFER_FOG(o,o.pos);
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
////// Lighting:
////// Emissive:
float4 node_8827 = _Time;
float2 node_9244 = (i.uv0+((node_8827.g*_speed_Time)*float2(_speed_U,_speed_V)));
float4 _node_2306_var = tex2D(_node_2306,TRANSFORM_TEX(node_9244, _node_2306));
float3 emissive = (_node_2306_var.rgb*_node_9165.rgb);
float3 finalColor = emissive;
fixed4 finalRGBA = fixed4(finalColor,(_node_9165.a*_node_2306_var.a*i.vertexColor.a));
UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
return finalRGBA;
}
ENDCG
}
Pass {
Name "ShadowCaster"
Tags {
"LightMode"="ShadowCaster"
}
Offset 1, 1
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_SHADOWCASTER
#include "UnityCG.cginc"
#include "Lighting.cginc"
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_shadowcaster
#pragma multi_compile_fog
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal
#pragma target 3.0
struct VertexInput {
float4 vertex : POSITION;
};
struct VertexOutput {
V2F_SHADOW_CASTER;
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.pos = UnityObjectToClipPos( v.vertex );
TRANSFER_SHADOW_CASTER(o)
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
}
FallBack "Diffuse"
CustomEditor "ShaderForgeMaterialInspector"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 579c3959d05ec7d46bc91fe0807608bd
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,428 @@
// Shader created with Shader Forge v1.40
// Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.40;sub:START;pass:START;ps:flbk:Transparent/Cutout/Diffuse,iptp:0,cusa:False,bamd:0,cgin:,cpap:True,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:2,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:True,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:2,rntp:3,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:0,x:34000,y:32640,varname:node_0,prsc:2|diff-6303-OUT,transm-7-OUT,lwrap-6-OUT,clip-1-A,voffset-394-OUT;n:type:ShaderForge.SFN_Tex2d,id:1,x:33530,y:32478,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:66321cc856b03e245ac41ed8a53e0ecc,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Vector3,id:6,x:33572,y:33075,varname:node_6,prsc:2,v1:0.3275862,v2:0.3275862,v3:0.2911878;n:type:ShaderForge.SFN_Vector3,id:7,x:33572,y:32976,varname:node_7,prsc:2,v1:0.2824138,v2:0.3137931,v3:0.1568965;n:type:ShaderForge.SFN_VertexColor,id:389,x:32886,y:33347,varname:node_389,prsc:2;n:type:ShaderForge.SFN_NormalVector,id:391,x:33073,y:33231,prsc:2,pt:False;n:type:ShaderForge.SFN_Time,id:392,x:33073,y:33586,varname:node_392,prsc:2;n:type:ShaderForge.SFN_Sin,id:393,x:33479,y:33548,varname:node_393,prsc:2|IN-413-OUT;n:type:ShaderForge.SFN_Multiply,id:394,x:33729,y:33420,cmnt:Wind animation,varname:node_394,prsc:2|A-562-OUT,B-389-R,C-393-OUT,D-403-OUT;n:type:ShaderForge.SFN_Vector1,id:403,x:33479,y:33699,varname:node_403,prsc:2,v1:0.0015;n:type:ShaderForge.SFN_Add,id:413,x:33298,y:33548,varname:node_413,prsc:2|A-519-OUT,B-392-T;n:type:ShaderForge.SFN_Multiply,id:519,x:33073,y:33457,varname:node_519,prsc:2|A-389-B,B-520-OUT;n:type:ShaderForge.SFN_Pi,id:520,x:32919,y:33494,varname:node_520,prsc:2;n:type:ShaderForge.SFN_Add,id:561,x:33294,y:33171,varname:node_561,prsc:2|A-563-OUT,B-391-OUT;n:type:ShaderForge.SFN_Normalize,id:562,x:33479,y:33280,varname:node_562,prsc:2|IN-561-OUT;n:type:ShaderForge.SFN_Vector3,id:563,x:33073,y:33131,cmnt:Wind direction,varname:node_563,prsc:2,v1:1,v2:0.5,v3:0.5;n:type:ShaderForge.SFN_Color,id:4369,x:33501,y:32690,ptovrint:False,ptlb:node_4369,ptin:_node_4369,varname:node_4369,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Multiply,id:6303,x:33871,y:32386,varname:node_6303,prsc:2|A-4369-RGB,B-1-RGB;proporder:1-4369;pass:END;sub:END;*/
Shader "Shader/Vegetation" {
Properties {
_Diffuse ("Diffuse", 2D) = "white" {}
_node_4369 ("node_4369", Color) = (0.5,0.5,0.5,1)
[HideInInspector]_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
}
SubShader {
Tags {
"Queue"="AlphaTest"
"RenderType"="TransparentCutout"
}
Pass {
Name "FORWARD"
Tags {
"LightMode"="ForwardBase"
}
Cull Off
AlphaToMask On
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) )
#pragma multi_compile_instancing
#include "UnityCG.cginc"
#include "AutoLight.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#include "UnityStandardBRDF.cginc"
#pragma multi_compile_fwdbase_fullshadows
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
#pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE
#pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON
#pragma multi_compile_fog
#pragma target 3.0
uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST;
UNITY_INSTANCING_BUFFER_START( Props )
UNITY_DEFINE_INSTANCED_PROP( float4, _node_4369)
UNITY_INSTANCING_BUFFER_END( Props )
struct VertexInput {
float4 vertex : POSITION;
float3 normal : NORMAL;
float4 tangent : TANGENT;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
float2 texcoord2 : TEXCOORD2;
float4 vertexColor : COLOR;
};
struct VertexOutput {
float4 pos : SV_POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
float2 uv0 : TEXCOORD0;
float2 uv1 : TEXCOORD1;
float2 uv2 : TEXCOORD2;
float4 posWorld : TEXCOORD3;
float3 normalDir : TEXCOORD4;
float3 tangentDir : TEXCOORD5;
float3 bitangentDir : TEXCOORD6;
float4 vertexColor : COLOR;
LIGHTING_COORDS(7,8)
UNITY_FOG_COORDS(9)
#if defined(LIGHTMAP_ON) || defined(UNITY_SHOULD_SAMPLE_SH)
float4 ambientOrLightmapUV : TEXCOORD10;
#endif
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
UNITY_SETUP_INSTANCE_ID( v );
UNITY_TRANSFER_INSTANCE_ID( v, o );
o.uv0 = v.texcoord0;
o.uv1 = v.texcoord1;
o.uv2 = v.texcoord2;
o.vertexColor = v.vertexColor;
#ifdef LIGHTMAP_ON
o.ambientOrLightmapUV.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw;
o.ambientOrLightmapUV.zw = 0;
#elif UNITY_SHOULD_SAMPLE_SH
#endif
#ifdef DYNAMICLIGHTMAP_ON
o.ambientOrLightmapUV.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
#endif
o.normalDir = UnityObjectToWorldNormal(v.normal);
o.tangentDir = normalize( mul( unity_ObjectToWorld, float4( v.tangent.xyz, 0.0 ) ).xyz );
o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w);
float4 node_392 = _Time;
v.vertex.xyz += (normalize((float3(1,0.5,0.5)+v.normal))*o.vertexColor.r*sin(((o.vertexColor.b*3.141592654)+node_392.g))*0.0015);
o.posWorld = mul(unity_ObjectToWorld, v.vertex);
float3 lightColor = _LightColor0.rgb;
o.pos = UnityObjectToClipPos( v.vertex );
UNITY_TRANSFER_FOG(o,o.pos);
TRANSFER_VERTEX_TO_FRAGMENT(o)
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
UNITY_SETUP_INSTANCE_ID( i );
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
i.normalDir = normalize(i.normalDir);
i.normalDir *= faceSign;
float3x3 tangentTransform = float3x3( i.tangentDir, i.bitangentDir, i.normalDir);
float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz);
float3 normalDirection = i.normalDir;
float3 viewReflectDirection = reflect( -viewDirection, normalDirection );
float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(i.uv0, _Diffuse));
clip(_Diffuse_var.a - 0.5);
float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz);
float3 lightColor = _LightColor0.rgb;
////// Lighting:
float attenuation = LIGHT_ATTENUATION(i);
float3 attenColor = attenuation * _LightColor0.xyz;
/////// GI Data:
UnityLight light;
#ifdef LIGHTMAP_OFF
light.color = lightColor;
light.dir = lightDirection;
light.ndotl = LambertTerm (normalDirection, light.dir);
#else
light.color = half3(0.f, 0.f, 0.f);
light.ndotl = 0.0f;
light.dir = half3(0.f, 0.f, 0.f);
#endif
UnityGIInput d;
d.light = light;
d.worldPos = i.posWorld.xyz;
d.worldViewDir = viewDirection;
d.atten = attenuation;
#if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON)
d.ambient = 0;
d.lightmapUV = i.ambientOrLightmapUV;
#else
d.ambient = i.ambientOrLightmapUV;
#endif
Unity_GlossyEnvironmentData ugls_en_data;
ugls_en_data.roughness = 1.0 - 0;
ugls_en_data.reflUVW = viewReflectDirection;
UnityGI gi = UnityGlobalIllumination(d, 1, normalDirection, ugls_en_data );
lightDirection = gi.light.dir;
lightColor = gi.light.color;
/////// Diffuse:
float NdotL = dot( normalDirection, lightDirection );
float3 w = float3(0.3275862,0.3275862,0.2911878)*0.5; // Light wrapping
float3 NdotLWrap = NdotL * ( 1.0 - w );
float3 forwardLight = max(float3(0.0,0.0,0.0), NdotLWrap + w );
float3 backLight = max(float3(0.0,0.0,0.0), -NdotLWrap + w ) * float3(0.2824138,0.3137931,0.1568965);
NdotL = max(0.0,dot( normalDirection, lightDirection ));
float3 directDiffuse = (forwardLight+backLight) * attenColor;
float3 indirectDiffuse = float3(0,0,0);
indirectDiffuse += gi.indirect.diffuse;
float4 _node_4369_var = UNITY_ACCESS_INSTANCED_PROP( Props, _node_4369 );
float3 diffuseColor = (_node_4369_var.rgb*_Diffuse_var.rgb);
float3 diffuse = (directDiffuse + indirectDiffuse) * diffuseColor;
/// Final Color:
float3 finalColor = diffuse;
fixed4 finalRGBA = fixed4(finalColor,(_Diffuse_var.a) * 2.0 - 1.0);
UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
return finalRGBA;
}
ENDCG
}
Pass {
Name "FORWARD_DELTA"
Tags {
"LightMode"="ForwardAdd"
}
Blend One One
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) )
#pragma multi_compile_instancing
#include "UnityCG.cginc"
#include "AutoLight.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#include "UnityStandardBRDF.cginc"
#pragma multi_compile_fwdadd_fullshadows
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
#pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE
#pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON
#pragma multi_compile_fog
#pragma target 3.0
uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST;
UNITY_INSTANCING_BUFFER_START( Props )
UNITY_DEFINE_INSTANCED_PROP( float4, _node_4369)
UNITY_INSTANCING_BUFFER_END( Props )
struct VertexInput {
float4 vertex : POSITION;
float3 normal : NORMAL;
float4 tangent : TANGENT;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
float2 texcoord2 : TEXCOORD2;
float4 vertexColor : COLOR;
};
struct VertexOutput {
float4 pos : SV_POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
float2 uv0 : TEXCOORD0;
float2 uv1 : TEXCOORD1;
float2 uv2 : TEXCOORD2;
float4 posWorld : TEXCOORD3;
float3 normalDir : TEXCOORD4;
float3 tangentDir : TEXCOORD5;
float3 bitangentDir : TEXCOORD6;
float4 vertexColor : COLOR;
LIGHTING_COORDS(7,8)
UNITY_FOG_COORDS(9)
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
UNITY_SETUP_INSTANCE_ID( v );
UNITY_TRANSFER_INSTANCE_ID( v, o );
o.uv0 = v.texcoord0;
o.uv1 = v.texcoord1;
o.uv2 = v.texcoord2;
o.vertexColor = v.vertexColor;
o.normalDir = UnityObjectToWorldNormal(v.normal);
o.tangentDir = normalize( mul( unity_ObjectToWorld, float4( v.tangent.xyz, 0.0 ) ).xyz );
o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w);
float4 node_392 = _Time;
v.vertex.xyz += (normalize((float3(1,0.5,0.5)+v.normal))*o.vertexColor.r*sin(((o.vertexColor.b*3.141592654)+node_392.g))*0.0015);
o.posWorld = mul(unity_ObjectToWorld, v.vertex);
float3 lightColor = _LightColor0.rgb;
o.pos = UnityObjectToClipPos( v.vertex );
UNITY_TRANSFER_FOG(o,o.pos);
TRANSFER_VERTEX_TO_FRAGMENT(o)
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
UNITY_SETUP_INSTANCE_ID( i );
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
i.normalDir = normalize(i.normalDir);
i.normalDir *= faceSign;
float3x3 tangentTransform = float3x3( i.tangentDir, i.bitangentDir, i.normalDir);
float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz);
float3 normalDirection = i.normalDir;
float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(i.uv0, _Diffuse));
clip(_Diffuse_var.a - 0.5);
float3 lightDirection = normalize(lerp(_WorldSpaceLightPos0.xyz, _WorldSpaceLightPos0.xyz - i.posWorld.xyz,_WorldSpaceLightPos0.w));
float3 lightColor = _LightColor0.rgb;
////// Lighting:
float attenuation = LIGHT_ATTENUATION(i);
float3 attenColor = attenuation * _LightColor0.xyz;
/////// Diffuse:
float NdotL = dot( normalDirection, lightDirection );
float3 w = float3(0.3275862,0.3275862,0.2911878)*0.5; // Light wrapping
float3 NdotLWrap = NdotL * ( 1.0 - w );
float3 forwardLight = max(float3(0.0,0.0,0.0), NdotLWrap + w );
float3 backLight = max(float3(0.0,0.0,0.0), -NdotLWrap + w ) * float3(0.2824138,0.3137931,0.1568965);
NdotL = max(0.0,dot( normalDirection, lightDirection ));
float3 directDiffuse = (forwardLight+backLight) * attenColor;
float4 _node_4369_var = UNITY_ACCESS_INSTANCED_PROP( Props, _node_4369 );
float3 diffuseColor = (_node_4369_var.rgb*_Diffuse_var.rgb);
float3 diffuse = directDiffuse * diffuseColor;
/// Final Color:
float3 finalColor = diffuse;
fixed4 finalRGBA = fixed4(finalColor * 1,0);
UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
return finalRGBA;
}
ENDCG
}
Pass {
Name "ShadowCaster"
Tags {
"LightMode"="ShadowCaster"
}
Offset 1, 1
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) )
#include "UnityCG.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#include "UnityStandardBRDF.cginc"
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_shadowcaster
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
#pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE
#pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON
#pragma multi_compile_fog
#pragma target 3.0
uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST;
struct VertexInput {
float4 vertex : POSITION;
float3 normal : NORMAL;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
float2 texcoord2 : TEXCOORD2;
float4 vertexColor : COLOR;
};
struct VertexOutput {
V2F_SHADOW_CASTER;
float2 uv0 : TEXCOORD1;
float2 uv1 : TEXCOORD2;
float2 uv2 : TEXCOORD3;
float4 posWorld : TEXCOORD4;
float3 normalDir : TEXCOORD5;
float4 vertexColor : COLOR;
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.uv0 = v.texcoord0;
o.uv1 = v.texcoord1;
o.uv2 = v.texcoord2;
o.vertexColor = v.vertexColor;
o.normalDir = UnityObjectToWorldNormal(v.normal);
float4 node_392 = _Time;
v.vertex.xyz += (normalize((float3(1,0.5,0.5)+v.normal))*o.vertexColor.r*sin(((o.vertexColor.b*3.141592654)+node_392.g))*0.0015);
o.posWorld = mul(unity_ObjectToWorld, v.vertex);
o.pos = UnityObjectToClipPos( v.vertex );
TRANSFER_SHADOW_CASTER(o)
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : COLOR {
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
i.normalDir = normalize(i.normalDir);
i.normalDir *= faceSign;
float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz);
float3 normalDirection = i.normalDir;
float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(i.uv0, _Diffuse));
clip(_Diffuse_var.a - 0.5);
SHADOW_CASTER_FRAGMENT(i)
}
ENDCG
}
Pass {
Name "Meta"
Tags {
"LightMode"="Meta"
}
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_META 1
#define SHOULD_SAMPLE_SH ( defined (LIGHTMAP_OFF) && defined(DYNAMICLIGHTMAP_OFF) )
#pragma multi_compile_instancing
#include "UnityCG.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#include "UnityStandardBRDF.cginc"
#include "UnityMetaPass.cginc"
#pragma fragmentoption ARB_precision_hint_fastest
#pragma multi_compile_shadowcaster
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
#pragma multi_compile DIRLIGHTMAP_OFF DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE
#pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON
#pragma multi_compile_fog
#pragma target 3.0
uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST;
UNITY_INSTANCING_BUFFER_START( Props )
UNITY_DEFINE_INSTANCED_PROP( float4, _node_4369)
UNITY_INSTANCING_BUFFER_END( Props )
struct VertexInput {
float4 vertex : POSITION;
float3 normal : NORMAL;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
float2 texcoord2 : TEXCOORD2;
float4 vertexColor : COLOR;
};
struct VertexOutput {
float4 pos : SV_POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
float2 uv0 : TEXCOORD0;
float2 uv1 : TEXCOORD1;
float2 uv2 : TEXCOORD2;
float4 posWorld : TEXCOORD3;
float3 normalDir : TEXCOORD4;
float4 vertexColor : COLOR;
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
UNITY_SETUP_INSTANCE_ID( v );
UNITY_TRANSFER_INSTANCE_ID( v, o );
o.uv0 = v.texcoord0;
o.uv1 = v.texcoord1;
o.uv2 = v.texcoord2;
o.vertexColor = v.vertexColor;
o.normalDir = UnityObjectToWorldNormal(v.normal);
float4 node_392 = _Time;
v.vertex.xyz += (normalize((float3(1,0.5,0.5)+v.normal))*o.vertexColor.r*sin(((o.vertexColor.b*3.141592654)+node_392.g))*0.0015);
o.posWorld = mul(unity_ObjectToWorld, v.vertex);
o.pos = UnityMetaVertexPosition(v.vertex, v.texcoord1.xy, v.texcoord2.xy, unity_LightmapST, unity_DynamicLightmapST );
return o;
}
float4 frag(VertexOutput i, float facing : VFACE) : SV_Target {
UNITY_SETUP_INSTANCE_ID( i );
float isFrontFace = ( facing >= 0 ? 1 : 0 );
float faceSign = ( facing >= 0 ? 1 : -1 );
i.normalDir = normalize(i.normalDir);
i.normalDir *= faceSign;
float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz);
float3 normalDirection = i.normalDir;
UnityMetaInput o;
UNITY_INITIALIZE_OUTPUT( UnityMetaInput, o );
o.Emission = 0;
float4 _node_4369_var = UNITY_ACCESS_INSTANCED_PROP( Props, _node_4369 );
float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(i.uv0, _Diffuse));
float3 diffColor = (_node_4369_var.rgb*_Diffuse_var.rgb);
o.Albedo = diffColor;
return UnityMetaFragment( o );
}
ENDCG
}
}
FallBack "Transparent/Cutout/Diffuse"
CustomEditor "ShaderForgeMaterialInspector"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 172dbb1c8197f904c8f29274fe663406
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant: