diff --git a/URP/LTY_shader_ALL3.0_URP.shader b/URP/LTY_shader_ALL3.0_URP.shader new file mode 100644 index 0000000..bc0e858 --- /dev/null +++ b/URP/LTY_shader_ALL3.0_URP.shader @@ -0,0 +1,1460 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/LTY_多功能整合URP" +{ + Properties + { + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [Enum(Add,1,Alpha,10)]_Dst("BlendMode", Float) = 1 + [Enum(UnityEngine.Rendering.CullMode)]_CullMode("CullMode", Float) = 0 + [Enum(Less or Equal,4,Always,8)]_ZTestMode("ZTest", Float) = 4 + [Enum(ON,1,OFF,0)]_Zwrite("Zwrite", Float) = 0 + _SoftParticle("SoftParticle", Range( 0 , 10)) = 0 + [Header(Main_Tex)]_Main_Tex("Main_Tex", 2D) = "white" {} + [HDR]_Main_Tex_Color("Main_Tex_Color", Color) = (1,1,1,1) + [Enum(R,0,A,1)]_Main_Tex_A_R("Main_Tex_A_R", Float) = 0 + [Enum(Normal,0,Custom,1)]_Main_Tex_Custom_ZW("Main_Tex_Custom_ZW", Float) = 0 + [Enum(Repeat,0,Clmap,1)]_Main_Tex_ClampSwitch("Main_Tex_ClampSwitch", Float) = 0 + _Main_Tex_Rotator("Main_Tex_Rotator", Range( 0 , 360)) = 0 + _Main_Tex_U_speed("Main_Tex_U_speed", Float) = 0 + _Main_Tex_V_speed("Main_Tex_V_speed", Float) = 0 + [Header(Remap_Tex)]_Remap_Tex("Remap_Tex", 2D) = "white" {} + [Enum(OFF,0,ON,1)]_Remap_Tex_Followl_Main_Tex("Remap_Tex_Followl_Main_Tex", Float) = 0 + [Enum(R,0,A,1)]_Remap_Tex_A_R("Remap_Tex_A_R", Float) = 0 + _Remap_Tex_Desaturate("Remap_Tex_Desaturate", Range( 0 , 1)) = 0 + [Enum(Repeat,0,Clmap,1)]_Remap_Tex_ClampSwitch("Remap_Tex_ClampSwitch", Float) = 0 + _Remap_Tex_Rotator("Remap_Tex_Rotator", Range( 0 , 360)) = 0 + _Remap_Tex_U_speed("Remap_Tex_U_speed", Float) = 0 + _Remap_Tex_V_speed("Remap_Tex_V_speed", Float) = 0 + [Header(Mask_Tex)]_Mask_Tex("Mask_Tex", 2D) = "white" {} + [Enum(Repeat,0,Clmap,1)]_Mask_Tex_ClampSwitch("Mask_Tex_ClampSwitch", Float) = 0 + [Enum(R,0,A,1)]_Mask_Tex_A_R("Mask_Tex_A_R", Float) = 0 + _Mask_Tex_Rotator("Mask_Tex_Rotator", Range( 0 , 360)) = 0 + _Mask_Tex_U_speed("Mask_Tex_U_speed", Float) = 0 + _Mask_Tex_V_speed("Mask_Tex_V_speed", Float) = 0 + [Header(Dissolve_Tex)]_Dissolve_Tex("Dissolve_Tex", 2D) = "white" {} + [Toggle(_DISSOLVE_SWITCH_ON)] _Dissolve_Switch("Dissolve_Switch", Float) = 0 + [Enum(R,0,A,1)]_Dissolve_Tex_A_R("Dissolve_Tex_A_R", Float) = 0 + [Enum(OFF,0,ON,1)]_Dissolve_Tex_Custom_X("Dissolve_Tex_Custom_X", Float) = 0 + _Dissolve_Tex_Rotator("Dissolve_Tex_Rotator", Range( 0 , 360)) = 0 + _Dissolve_Tex_smooth("Dissolve_Tex_smooth", Range( 0.5 , 1)) = 0.5 + _Dissolve_Tex_power("Dissolve_Tex_power", Range( 0 , 1)) = 0 + _Dissolve_Tex_U_speed("Dissolve_Tex_U_speed", Float) = 0 + _Dissolve_Tex_V_speed("Dissolve_Tex_V_speed", Float) = 0 + [Header(Distortion_Tex)]_Distortion_Tex("Distortion_Tex", 2D) = "white" {} + [Enum(OFF,0,ON,1)]_Distortion_Switch("Distortion_Switch", Float) = 0 + _Distortion_Tex_Power("Distortion_Tex_Power", Float) = 0 + _Distortion_Tex_U_speed("Distortion_Tex_U_speed", Float) = 0 + _Distortion_Tex_V_speed("Distortion_Tex_V_speed", Float) = 0 + [HDR][Header(Fresnel)]_Fresnel_Color("Fresnel_Color", Color) = (1,1,1,1) + [Toggle(_FRESNEL_SWITCH_ON)] _Fresnel_Switch("Fresnel_Switch", Float) = 0 + [Enum(Fresnel,0,Bokeh,1)]_Fresnel_Bokeh("Fresnel_Bokeh", Float) = 0 + _Fresnel_scale("Fresnel_scale", Float) = 1 + _Fresnel_power("Fresnel_power", Float) = 5 + [Header(Wpo_Tex)]_WPO_Tex("WPO_Tex", 2D) = "white" {} + [Toggle(_WPO_SWITCH_ON)] _WPO_Switch("WPO_Switch", Float) = 0 + [Enum(Normal,0,Custom,1)]_WPO_CustomSwitch_Y("WPO_CustomSwitch_Y", Float) = 0 + _WPO_tex_power("WPO_tex_power", Float) = 0 + _WPO_Tex_Direction("WPO_Tex_Direction", Vector) = (1,1,1,0) + _WPO_Tex_U_speed("WPO_Tex_U_speed", Float) = 0 + [ASEEnd]_WPO_Tex_V_speed("WPO_Tex_V_speed", Float) = 0 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull [_CullMode] + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 3.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha [_Dst], One OneMinusSrcAlpha + ZWrite [_Zwrite] + ZTest [_ZTestMode] + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + #define REQUIRE_DEPTH_TEXTURE 1 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_VERT_NORMAL + #define ASE_NEEDS_FRAG_WORLD_POSITION + #define ASE_NEEDS_FRAG_COLOR + #pragma shader_feature _WPO_SWITCH_ON + #pragma shader_feature _FRESNEL_SWITCH_ON + #pragma shader_feature _DISSOLVE_SWITCH_ON + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_texcoord4 : TEXCOORD4; + float4 ase_texcoord5 : TEXCOORD5; + float4 ase_texcoord6 : TEXCOORD6; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _Main_Tex_ST; + float4 _Mask_Tex_ST; + float4 _Fresnel_Color; + float4 _WPO_Tex_ST; + float4 _WPO_Tex_Direction; + float4 _Main_Tex_Color; + float4 _Distortion_Tex_ST; + float4 _Dissolve_Tex_ST; + float4 _Remap_Tex_ST; + float _Dissolve_Tex_Rotator; + float _Dissolve_Tex_A_R; + float _Dissolve_Tex_power; + float _Dissolve_Tex_Custom_X; + float _Remap_Tex_U_speed; + float _Remap_Tex_V_speed; + float _CullMode; + float _Remap_Tex_Rotator; + float _Remap_Tex_ClampSwitch; + float _Remap_Tex_Desaturate; + float _Main_Tex_A_R; + float _SoftParticle; + float _Mask_Tex_U_speed; + float _Mask_Tex_V_speed; + float _Mask_Tex_Rotator; + float _Mask_Tex_ClampSwitch; + float _Remap_Tex_Followl_Main_Tex; + float _Dissolve_Tex_V_speed; + float _Fresnel_Bokeh; + float _Dissolve_Tex_smooth; + float _Zwrite; + float _Dst; + float _ZTestMode; + float _WPO_tex_power; + float _WPO_CustomSwitch_Y; + float _WPO_Tex_U_speed; + float _WPO_Tex_V_speed; + float _Main_Tex_U_speed; + float _Main_Tex_V_speed; + float _Main_Tex_Custom_ZW; + float _Distortion_Tex_Power; + float _Distortion_Tex_U_speed; + float _Distortion_Tex_V_speed; + float _Distortion_Switch; + float _Main_Tex_Rotator; + float _Main_Tex_ClampSwitch; + float _Fresnel_power; + float _Fresnel_scale; + float _Mask_Tex_A_R; + float _Dissolve_Tex_U_speed; + float _Remap_Tex_A_R; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _WPO_Tex; + sampler2D _Main_Tex; + sampler2D _Distortion_Tex; + sampler2D _Dissolve_Tex; + sampler2D _Remap_Tex; + uniform float4 _CameraDepthTexture_TexelSize; + sampler2D _Mask_Tex; + + + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + float4 temp_cast_0 = (0.0).xxxx; + float4 texCoord395 = v.ase_texcoord1; + texCoord395.xy = v.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); + float lerpResult398 = lerp( _WPO_tex_power , texCoord395.y , _WPO_CustomSwitch_Y); + float2 appendResult386 = (float2(_WPO_Tex_U_speed , _WPO_Tex_V_speed)); + float2 uv_WPO_Tex = v.ase_texcoord.xy * _WPO_Tex_ST.xy + _WPO_Tex_ST.zw; + float2 panner390 = ( 1.0 * _Time.y * appendResult386 + uv_WPO_Tex); + #ifdef _WPO_SWITCH_ON + float4 staticSwitch408 = ( lerpResult398 * float4( v.ase_normal , 0.0 ) * tex2Dlod( _WPO_Tex, float4( panner390, 0, 0.0) ) * _WPO_Tex_Direction ); + #else + float4 staticSwitch408 = temp_cast_0; + #endif + float4 Vertex117 = staticSwitch408; + + float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); + o.ase_texcoord5.xyz = ase_worldNormal; + + float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); + float4 screenPos = ComputeScreenPos(ase_clipPos); + o.ase_texcoord6 = screenPos; + + o.ase_color = v.ase_color; + o.ase_texcoord3.xy = v.ase_texcoord.xy; + o.ase_texcoord4 = v.ase_texcoord1; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + o.ase_texcoord5.w = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = Vertex117.rgb; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord1 = v.ase_texcoord1; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 appendResult298 = (float2(( _Main_Tex_U_speed * _TimeParameters.x ) , ( _TimeParameters.x * _Main_Tex_V_speed ))); + float2 uv_Main_Tex = IN.ase_texcoord3.xy * _Main_Tex_ST.xy + _Main_Tex_ST.zw; + float4 texCoord288 = IN.ase_texcoord4; + texCoord288.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 ); + float2 appendResult301 = (float2(texCoord288.z , texCoord288.w)); + float2 lerpResult308 = lerp( ( frac( appendResult298 ) + uv_Main_Tex ) , ( uv_Main_Tex + appendResult301 ) , _Main_Tex_Custom_ZW); + float2 appendResult283 = (float2(_Distortion_Tex_U_speed , _Distortion_Tex_V_speed)); + float2 uv_Distortion_Tex = IN.ase_texcoord3.xy * _Distortion_Tex_ST.xy + _Distortion_Tex_ST.zw; + float2 panner286 = ( 1.0 * _Time.y * appendResult283 + uv_Distortion_Tex); + float lerpResult309 = lerp( 0.0 , ( _Distortion_Tex_Power * (-0.5 + (tex2D( _Distortion_Tex, panner286 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) ) , _Distortion_Switch); + float2 ONE214 = ( lerpResult308 + lerpResult309 ); + float cos321 = cos( ( ( _Main_Tex_Rotator * PI ) / 180.0 ) ); + float sin321 = sin( ( ( _Main_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator321 = mul( ONE214 - float2( 0.5,0.5 ) , float2x2( cos321 , -sin321 , sin321 , cos321 )) + float2( 0.5,0.5 ); + float2 lerpResult411 = lerp( rotator321 , saturate( rotator321 ) , _Main_Tex_ClampSwitch); + float4 tex2DNode1 = tex2D( _Main_Tex, lerpResult411 ); + float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition ); + ase_worldViewDir = normalize(ase_worldViewDir); + float3 ase_worldNormal = IN.ase_texcoord5.xyz; + float dotResult343 = dot( ase_worldViewDir , ase_worldNormal ); + float smoothstepResult438 = smoothstep( 0.0 , 1.0 , ( 1.0 - saturate( abs( dotResult343 ) ) )); + float temp_output_363_0 = ( pow( smoothstepResult438 , _Fresnel_power ) * ( _Fresnel_scale * 1 ) ); + float lerpResult370 = lerp( temp_output_363_0 , ( 1.0 - temp_output_363_0 ) , _Fresnel_Bokeh); + #ifdef _FRESNEL_SWITCH_ON + float staticSwitch372 = lerpResult370; + #else + float staticSwitch372 = 1.0; + #endif + float2 appendResult342 = (float2(_Dissolve_Tex_U_speed , _Dissolve_Tex_V_speed)); + float2 uv_Dissolve_Tex = IN.ase_texcoord3.xy * _Dissolve_Tex_ST.xy + _Dissolve_Tex_ST.zw; + float cos430 = cos( ( ( _Dissolve_Tex_Rotator * PI ) / 180.0 ) ); + float sin430 = sin( ( ( _Dissolve_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator430 = mul( uv_Dissolve_Tex - float2( 0.5,0.5 ) , float2x2( cos430 , -sin430 , sin430 , cos430 )) + float2( 0.5,0.5 ); + float2 panner346 = ( 1.0 * _Time.y * appendResult342 + rotator430); + float4 tex2DNode353 = tex2D( _Dissolve_Tex, panner346 ); + float lerpResult417 = lerp( tex2DNode353.r , tex2DNode353.a , _Dissolve_Tex_A_R); + float five300 = texCoord288.x; + float lerpResult351 = lerp( _Dissolve_Tex_power , five300 , _Dissolve_Tex_Custom_X); + float smoothstepResult368 = smoothstep( ( 1.0 - _Dissolve_Tex_smooth ) , _Dissolve_Tex_smooth , saturate( ( ( lerpResult417 + 1.0 ) - ( lerpResult351 * 2.0 ) ) )); + #ifdef _DISSOLVE_SWITCH_ON + float staticSwitch371 = smoothstepResult368; + #else + float staticSwitch371 = 1.0; + #endif + float4 four222 = ( staticSwitch372 * staticSwitch371 * _Fresnel_Color ); + float2 appendResult420 = (float2(_Remap_Tex_U_speed , _Remap_Tex_V_speed)); + float2 uv_Remap_Tex = IN.ase_texcoord3.xy * _Remap_Tex_ST.xy + _Remap_Tex_ST.zw; + float2 panner421 = ( 1.0 * _Time.y * appendResult420 + uv_Remap_Tex); + float2 temp_cast_0 = (0.0).xx; + float2 GAM_MAIN_Move446 = appendResult301; + float2 lerpResult448 = lerp( temp_cast_0 , GAM_MAIN_Move446 , _Remap_Tex_Followl_Main_Tex); + float cos399 = cos( ( ( _Remap_Tex_Rotator * PI ) / 180.0 ) ); + float sin399 = sin( ( ( _Remap_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator399 = mul( ( panner421 + lerpResult448 ) - float2( 0.5,0.5 ) , float2x2( cos399 , -sin399 , sin399 , cos399 )) + float2( 0.5,0.5 ); + float2 lerpResult433 = lerp( rotator399 , saturate( rotator399 ) , _Remap_Tex_ClampSwitch); + float4 tex2DNode406 = tex2D( _Remap_Tex, ( lerpResult309 + lerpResult433 ) ); + float3 desaturateInitialColor441 = tex2DNode406.rgb; + float desaturateDot441 = dot( desaturateInitialColor441, float3( 0.299, 0.587, 0.114 )); + float3 desaturateVar441 = lerp( desaturateInitialColor441, desaturateDot441.xxx, _Remap_Tex_Desaturate ); + float3 appendResult425 = (float3(desaturateVar441)); + float3 Gam258 = appendResult425; + + float lerpResult409 = lerp( tex2DNode1.r , tex2DNode1.a , _Main_Tex_A_R); + float Three217 = ( staticSwitch372 * _Fresnel_Color.a * staticSwitch371 ); + float4 screenPos = IN.ase_texcoord6; + float4 ase_screenPosNorm = screenPos / screenPos.w; + ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; + float screenDepth393 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); + float distanceDepth393 = abs( ( screenDepth393 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _SoftParticle ) ); + float soft219 = saturate( distanceDepth393 ); + float2 appendResult332 = (float2(_Mask_Tex_U_speed , _Mask_Tex_V_speed)); + float2 uv_Mask_Tex = IN.ase_texcoord3.xy * _Mask_Tex_ST.xy + _Mask_Tex_ST.zw; + float2 panner334 = ( 1.0 * _Time.y * appendResult332 + uv_Mask_Tex); + float cos335 = cos( ( ( _Mask_Tex_Rotator * PI ) / 180.0 ) ); + float sin335 = sin( ( ( _Mask_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator335 = mul( panner334 - float2( 0.5,0.5 ) , float2x2( cos335 , -sin335 , sin335 , cos335 )) + float2( 0.5,0.5 ); + float2 lerpResult413 = lerp( rotator335 , saturate( rotator335 ) , _Mask_Tex_ClampSwitch); + float4 tex2DNode327 = tex2D( _Mask_Tex, lerpResult413 ); + float lerpResult453 = lerp( tex2DNode327.r , tex2DNode327.a , _Mask_Tex_A_R); + float two215 = lerpResult453; + float lerpResult432 = lerp( tex2DNode406.r , tex2DNode406.a , _Remap_Tex_A_R); + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( IN.ase_color * ( _Main_Tex_Color * tex2DNode1 ) * four222 * float4( Gam258 , 0.0 ) ).rgb; + float Alpha = ( IN.ase_color.a * _Main_Tex_Color.a * lerpResult409 * Three217 * soft219 * two215 * lerpResult432 ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + #define REQUIRE_DEPTH_TEXTURE 1 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + #define ASE_NEEDS_VERT_NORMAL + #define ASE_NEEDS_FRAG_WORLD_POSITION + #pragma shader_feature _WPO_SWITCH_ON + #pragma shader_feature _FRESNEL_SWITCH_ON + #pragma shader_feature _DISSOLVE_SWITCH_ON + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord2 : TEXCOORD2; + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_texcoord4 : TEXCOORD4; + float4 ase_texcoord5 : TEXCOORD5; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _Main_Tex_ST; + float4 _Mask_Tex_ST; + float4 _Fresnel_Color; + float4 _WPO_Tex_ST; + float4 _WPO_Tex_Direction; + float4 _Main_Tex_Color; + float4 _Distortion_Tex_ST; + float4 _Dissolve_Tex_ST; + float4 _Remap_Tex_ST; + float _Dissolve_Tex_Rotator; + float _Dissolve_Tex_A_R; + float _Dissolve_Tex_power; + float _Dissolve_Tex_Custom_X; + float _Remap_Tex_U_speed; + float _Remap_Tex_V_speed; + float _CullMode; + float _Remap_Tex_Rotator; + float _Remap_Tex_ClampSwitch; + float _Remap_Tex_Desaturate; + float _Main_Tex_A_R; + float _SoftParticle; + float _Mask_Tex_U_speed; + float _Mask_Tex_V_speed; + float _Mask_Tex_Rotator; + float _Mask_Tex_ClampSwitch; + float _Remap_Tex_Followl_Main_Tex; + float _Dissolve_Tex_V_speed; + float _Fresnel_Bokeh; + float _Dissolve_Tex_smooth; + float _Zwrite; + float _Dst; + float _ZTestMode; + float _WPO_tex_power; + float _WPO_CustomSwitch_Y; + float _WPO_Tex_U_speed; + float _WPO_Tex_V_speed; + float _Main_Tex_U_speed; + float _Main_Tex_V_speed; + float _Main_Tex_Custom_ZW; + float _Distortion_Tex_Power; + float _Distortion_Tex_U_speed; + float _Distortion_Tex_V_speed; + float _Distortion_Switch; + float _Main_Tex_Rotator; + float _Main_Tex_ClampSwitch; + float _Fresnel_power; + float _Fresnel_scale; + float _Mask_Tex_A_R; + float _Dissolve_Tex_U_speed; + float _Remap_Tex_A_R; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _WPO_Tex; + sampler2D _Main_Tex; + sampler2D _Distortion_Tex; + sampler2D _Dissolve_Tex; + uniform float4 _CameraDepthTexture_TexelSize; + sampler2D _Mask_Tex; + sampler2D _Remap_Tex; + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + float4 temp_cast_0 = (0.0).xxxx; + float4 texCoord395 = v.ase_texcoord1; + texCoord395.xy = v.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); + float lerpResult398 = lerp( _WPO_tex_power , texCoord395.y , _WPO_CustomSwitch_Y); + float2 appendResult386 = (float2(_WPO_Tex_U_speed , _WPO_Tex_V_speed)); + float2 uv_WPO_Tex = v.ase_texcoord.xy * _WPO_Tex_ST.xy + _WPO_Tex_ST.zw; + float2 panner390 = ( 1.0 * _Time.y * appendResult386 + uv_WPO_Tex); + #ifdef _WPO_SWITCH_ON + float4 staticSwitch408 = ( lerpResult398 * float4( v.ase_normal , 0.0 ) * tex2Dlod( _WPO_Tex, float4( panner390, 0, 0.0) ) * _WPO_Tex_Direction ); + #else + float4 staticSwitch408 = temp_cast_0; + #endif + float4 Vertex117 = staticSwitch408; + + float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); + o.ase_texcoord4.xyz = ase_worldNormal; + float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); + float4 screenPos = ComputeScreenPos(ase_clipPos); + o.ase_texcoord5 = screenPos; + + o.ase_color = v.ase_color; + o.ase_texcoord2.xy = v.ase_texcoord.xy; + o.ase_texcoord3 = v.ase_texcoord1; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord2.zw = 0; + o.ase_texcoord4.w = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = Vertex117.rgb; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord1 = v.ase_texcoord1; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 appendResult298 = (float2(( _Main_Tex_U_speed * _TimeParameters.x ) , ( _TimeParameters.x * _Main_Tex_V_speed ))); + float2 uv_Main_Tex = IN.ase_texcoord2.xy * _Main_Tex_ST.xy + _Main_Tex_ST.zw; + float4 texCoord288 = IN.ase_texcoord3; + texCoord288.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); + float2 appendResult301 = (float2(texCoord288.z , texCoord288.w)); + float2 lerpResult308 = lerp( ( frac( appendResult298 ) + uv_Main_Tex ) , ( uv_Main_Tex + appendResult301 ) , _Main_Tex_Custom_ZW); + float2 appendResult283 = (float2(_Distortion_Tex_U_speed , _Distortion_Tex_V_speed)); + float2 uv_Distortion_Tex = IN.ase_texcoord2.xy * _Distortion_Tex_ST.xy + _Distortion_Tex_ST.zw; + float2 panner286 = ( 1.0 * _Time.y * appendResult283 + uv_Distortion_Tex); + float lerpResult309 = lerp( 0.0 , ( _Distortion_Tex_Power * (-0.5 + (tex2D( _Distortion_Tex, panner286 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) ) , _Distortion_Switch); + float2 ONE214 = ( lerpResult308 + lerpResult309 ); + float cos321 = cos( ( ( _Main_Tex_Rotator * PI ) / 180.0 ) ); + float sin321 = sin( ( ( _Main_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator321 = mul( ONE214 - float2( 0.5,0.5 ) , float2x2( cos321 , -sin321 , sin321 , cos321 )) + float2( 0.5,0.5 ); + float2 lerpResult411 = lerp( rotator321 , saturate( rotator321 ) , _Main_Tex_ClampSwitch); + float4 tex2DNode1 = tex2D( _Main_Tex, lerpResult411 ); + float lerpResult409 = lerp( tex2DNode1.r , tex2DNode1.a , _Main_Tex_A_R); + float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition ); + ase_worldViewDir = normalize(ase_worldViewDir); + float3 ase_worldNormal = IN.ase_texcoord4.xyz; + float dotResult343 = dot( ase_worldViewDir , ase_worldNormal ); + float smoothstepResult438 = smoothstep( 0.0 , 1.0 , ( 1.0 - saturate( abs( dotResult343 ) ) )); + float temp_output_363_0 = ( pow( smoothstepResult438 , _Fresnel_power ) * ( _Fresnel_scale * 1 ) ); + float lerpResult370 = lerp( temp_output_363_0 , ( 1.0 - temp_output_363_0 ) , _Fresnel_Bokeh); + #ifdef _FRESNEL_SWITCH_ON + float staticSwitch372 = lerpResult370; + #else + float staticSwitch372 = 1.0; + #endif + float2 appendResult342 = (float2(_Dissolve_Tex_U_speed , _Dissolve_Tex_V_speed)); + float2 uv_Dissolve_Tex = IN.ase_texcoord2.xy * _Dissolve_Tex_ST.xy + _Dissolve_Tex_ST.zw; + float cos430 = cos( ( ( _Dissolve_Tex_Rotator * PI ) / 180.0 ) ); + float sin430 = sin( ( ( _Dissolve_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator430 = mul( uv_Dissolve_Tex - float2( 0.5,0.5 ) , float2x2( cos430 , -sin430 , sin430 , cos430 )) + float2( 0.5,0.5 ); + float2 panner346 = ( 1.0 * _Time.y * appendResult342 + rotator430); + float4 tex2DNode353 = tex2D( _Dissolve_Tex, panner346 ); + float lerpResult417 = lerp( tex2DNode353.r , tex2DNode353.a , _Dissolve_Tex_A_R); + float five300 = texCoord288.x; + float lerpResult351 = lerp( _Dissolve_Tex_power , five300 , _Dissolve_Tex_Custom_X); + float smoothstepResult368 = smoothstep( ( 1.0 - _Dissolve_Tex_smooth ) , _Dissolve_Tex_smooth , saturate( ( ( lerpResult417 + 1.0 ) - ( lerpResult351 * 2.0 ) ) )); + #ifdef _DISSOLVE_SWITCH_ON + float staticSwitch371 = smoothstepResult368; + #else + float staticSwitch371 = 1.0; + #endif + float Three217 = ( staticSwitch372 * _Fresnel_Color.a * staticSwitch371 ); + float4 screenPos = IN.ase_texcoord5; + float4 ase_screenPosNorm = screenPos / screenPos.w; + ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; + float screenDepth393 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); + float distanceDepth393 = abs( ( screenDepth393 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _SoftParticle ) ); + float soft219 = saturate( distanceDepth393 ); + float2 appendResult332 = (float2(_Mask_Tex_U_speed , _Mask_Tex_V_speed)); + float2 uv_Mask_Tex = IN.ase_texcoord2.xy * _Mask_Tex_ST.xy + _Mask_Tex_ST.zw; + float2 panner334 = ( 1.0 * _Time.y * appendResult332 + uv_Mask_Tex); + float cos335 = cos( ( ( _Mask_Tex_Rotator * PI ) / 180.0 ) ); + float sin335 = sin( ( ( _Mask_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator335 = mul( panner334 - float2( 0.5,0.5 ) , float2x2( cos335 , -sin335 , sin335 , cos335 )) + float2( 0.5,0.5 ); + float2 lerpResult413 = lerp( rotator335 , saturate( rotator335 ) , _Mask_Tex_ClampSwitch); + float4 tex2DNode327 = tex2D( _Mask_Tex, lerpResult413 ); + float lerpResult453 = lerp( tex2DNode327.r , tex2DNode327.a , _Mask_Tex_A_R); + float two215 = lerpResult453; + float2 appendResult420 = (float2(_Remap_Tex_U_speed , _Remap_Tex_V_speed)); + float2 uv_Remap_Tex = IN.ase_texcoord2.xy * _Remap_Tex_ST.xy + _Remap_Tex_ST.zw; + float2 panner421 = ( 1.0 * _Time.y * appendResult420 + uv_Remap_Tex); + float2 temp_cast_0 = (0.0).xx; + float2 GAM_MAIN_Move446 = appendResult301; + float2 lerpResult448 = lerp( temp_cast_0 , GAM_MAIN_Move446 , _Remap_Tex_Followl_Main_Tex); + float cos399 = cos( ( ( _Remap_Tex_Rotator * PI ) / 180.0 ) ); + float sin399 = sin( ( ( _Remap_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator399 = mul( ( panner421 + lerpResult448 ) - float2( 0.5,0.5 ) , float2x2( cos399 , -sin399 , sin399 , cos399 )) + float2( 0.5,0.5 ); + float2 lerpResult433 = lerp( rotator399 , saturate( rotator399 ) , _Remap_Tex_ClampSwitch); + float4 tex2DNode406 = tex2D( _Remap_Tex, ( lerpResult309 + lerpResult433 ) ); + float lerpResult432 = lerp( tex2DNode406.r , tex2DNode406.a , _Remap_Tex_A_R); + + + float Alpha = ( IN.ase_color.a * _Main_Tex_Color.a * lerpResult409 * Three217 * soft219 * two215 * lerpResult432 ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + } + + CustomEditor "LTY_ShaderGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.CommentaryNode;277;-2998.344,-1601.401;Inherit;False;1344.04;453.14;UV流动;17;308;306;305;302;301;300;298;297;293;289;288;287;285;284;443;446;465;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;276;-3004.946,-1143.765;Inherit;False;1363.104;498.9412;扭曲;15;310;309;307;304;303;299;292;286;283;282;281;280;278;457;458;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;336;-4033.097,437.3795;Inherit;False;2440.182;539.9002;溶解;33;346;342;340;339;217;374;371;368;367;384;364;366;360;361;357;355;417;349;351;352;347;344;348;353;416;341;430;426;428;427;429;463;464;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;288;-2982.137,-1323.762;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;281;-2990.232,-801.7194;Inherit;False;Property;_Distortion_Tex_U_speed;Distortion_Tex_U_speed;39;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;426;-4012.473,816.7159;Inherit;False;Property;_Dissolve_Tex_Rotator;Dissolve_Tex_Rotator;31;0;Create;True;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;280;-2992.672,-726.7501;Inherit;False;Property;_Distortion_Tex_V_speed;Distortion_Tex_V_speed;40;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;301;-2746.481,-1244.668;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;428;-4013.727,890.405;Inherit;False;Constant;_Float13;Float 13;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.PiNode;427;-3785.89,822.5604;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;465;-2563.128,-1180.862;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.DynamicAppendNode;283;-2761.389,-789.2109;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.CommentaryNode;380;-2645.585,990.184;Inherit;False;2230.076;510.9691;Gam;30;406;431;442;432;258;425;441;433;435;434;399;461;450;421;460;462;420;396;391;459;419;389;448;418;385;451;447;449;381;476;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;429;-3581.36,827.6313;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;458;-2611.134,-879.364;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.CommentaryNode;378;-3814.854,-150.4367;Inherit;False;2203.762;580.8257;菲尼尔;23;438;222;375;373;372;369;370;437;436;365;363;362;359;356;354;358;350;345;343;338;337;440;439;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;446;-2068.261,-1221.425;Inherit;False;GAM_MAIN_Move;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.WorldNormalVector;337;-3801.412,58.3049;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 +Node;AmplifyShaderEditor.RangedFloatNode;451;-2423.49,1289.231;Inherit;False;Constant;_Float14;Float 14;54;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;282;-2993.48,-1081.163;Inherit;False;0;292;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.WireNode;457;-2767.974,-938.0294;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.GetLocalVarNode;447;-2641.586,1332.917;Inherit;False;446;GAM_MAIN_Move;1;0;OBJECT;;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.WireNode;464;-3469.769,714.5999;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;285;-2944.959,-1393.85;Inherit;False;Property;_Main_Tex_V_speed;Main_Tex_V_speed;12;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleTimeNode;287;-2938.566,-1466.115;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;284;-2944.966,-1538.257;Inherit;False;Property;_Main_Tex_U_speed;Main_Tex_U_speed;11;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.ViewDirInputsCoordNode;338;-3796.799,-101.4572;Inherit;False;World;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 +Node;AmplifyShaderEditor.RangedFloatNode;381;-2258.491,1210.566;Inherit;False;Property;_Remap_Tex_Rotator;Remap_Tex_Rotator;18;0;Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;449;-2635.152,1413.84;Inherit;False;Property;_Remap_Tex_Followl_Main_Tex;Remap_Tex_Followl_Main_Tex;14;1;[Enum];Create;False;0;2;OFF;0;ON;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;293;-2691.157,-1520.45;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;340;-4016.331,619.3238;Inherit;False;Property;_Dissolve_Tex_U_speed;Dissolve_Tex_U_speed;34;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;339;-4024.446,708.5041;Inherit;False;Property;_Dissolve_Tex_V_speed;Dissolve_Tex_V_speed;35;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;463;-3779.769,693.5999;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;289;-2691.335,-1418.288;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.PannerNode;286;-2672.053,-1077.006;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;341;-3990.308,495.4476;Inherit;False;0;353;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;385;-1973.169,1281.531;Inherit;False;Constant;_Float12;Float 12;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;419;-2640.778,1165.462;Inherit;False;Property;_Remap_Tex_U_speed;Remap_Tex_U_speed;19;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.PiNode;389;-2009.005,1211.771;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;448;-2284.289,1308.933;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;418;-2639.893,1238.641;Inherit;False;Property;_Remap_Tex_V_speed;Remap_Tex_V_speed;20;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.DotProductOpNode;343;-3632.246,-111.2643;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.CommentaryNode;278;-2316.67,-912.8144;Inherit;False;250.2743;263.226;映射;1;296;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.AbsOpNode;345;-3511.218,-108.0165;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;298;-2544.448,-1491.251;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.RotatorNode;430;-3767.982,498.9272;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;396;-1810.418,1262.918;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;292;-2501.396,-1105.782;Inherit;True;Property;_Distortion_Tex;Distortion_Tex;36;1;[Header];Create;True;1;Distortion_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TextureCoordinatesNode;391;-2568.245,1031.97;Inherit;False;0;406;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.WireNode;459;-2053.545,1207.278;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.DynamicAppendNode;420;-2396.364,1196.357;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.DynamicAppendNode;342;-3722.916,624.2188;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.TextureCoordinatesNode;297;-2548.713,-1402.201;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.PannerNode;346;-3555.99,503.1738;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;300;-2770.076,-1321.417;Inherit;False;five;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TFHCRemapNode;296;-2251.354,-832.7675;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;-0.5;False;4;FLOAT;0.5;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;350;-3374.849,-109.0945;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.FractNode;443;-2419.229,-1477.481;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.CommentaryNode;311;-3804.278,-629.8517;Inherit;False;1804.608;470.3787;MASK;17;215;327;413;414;325;335;324;334;331;332;333;323;322;330;329;452;453;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.WireNode;462;-1719.546,1196.278;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;460;-2192.546,1167.279;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.PannerNode;421;-2349.207,1044.887;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;299;-2205.119,-994.6426;Inherit;False;Property;_Distortion_Tex_Power;Distortion_Tex_Power;38;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;353;-3368.6,468.483;Inherit;True;Property;_Dissolve_Tex;Dissolve_Tex;27;1;[Header];Create;True;1;Dissolve_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;304;-2036.803,-726.1957;Inherit;False;Property;_Distortion_Switch;Distortion_Switch;37;1;[Enum];Create;True;0;2;OFF;0;ON;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;416;-3236.652,652.801;Inherit;False;Property;_Dissolve_Tex_A_R;Dissolve_Tex_A_R;29;1;[Enum];Create;True;0;2;R;0;A;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;347;-3413.464,790.8551;Inherit;False;300;five;1;0;OBJECT;;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;439;-3410.201,-30.82156;Inherit;False;Constant;_RimMin;RimMin;46;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;329;-3771.76,-395.7793;Inherit;False;Property;_Mask_Tex_V_speed;Mask_Tex_V_speed;26;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;440;-3407.194,50.36541;Inherit;False;Constant;_RinMax;RinMax;47;0;Create;True;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;305;-2271.222,-1467.394;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;307;-2041.886,-860.3583;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;306;-2375.935,-1241.67;Inherit;False;Property;_Main_Tex_Custom_ZW;Main_Tex_Custom_ZW;8;1;[Enum];Create;False;0;2;Normal;0;Custom;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;348;-3753.508,745.8126;Inherit;False;Property;_Dissolve_Tex_power;Dissolve_Tex_power;33;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;302;-2263.272,-1347.513;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;303;-1983.567,-942.4549;Inherit;False;Constant;_Float4;Float 4;43;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;344;-3469.378,890.2977;Inherit;False;Property;_Dissolve_Tex_Custom_X;Dissolve_Tex_Custom_X;30;1;[Enum];Create;True;0;2;OFF;0;ON;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;330;-3770.411,-470.8815;Inherit;False;Property;_Mask_Tex_U_speed;Mask_Tex_U_speed;25;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;356;-3214.303,-102.1749;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;461;-2024.545,1164.279;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;450;-2138.118,1042.852;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;322;-3765.975,-325.7947;Inherit;False;Property;_Mask_Tex_Rotator;Mask_Tex_Rotator;24;0;Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;352;-3214.908,863.3678;Inherit;False;Constant;_Float7;Float 7;11;0;Create;True;0;0;0;False;0;False;2;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;308;-2033.979,-1467.467;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.LerpOp;351;-3234.978,749.1977;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.CommentaryNode;312;-1992.634,-631.6931;Inherit;False;353.1464;462.3351;旋转;6;319;318;316;317;320;321;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.RangedFloatNode;323;-3767.229,-251.1057;Inherit;False;Constant;_Float11;Float 11;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;332;-3564.128,-453.428;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.LerpOp;309;-1854.461,-868.8378;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.PiNode;333;-3574.369,-318.2846;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;349;-3046.223,669.5835;Inherit;False;Constant;_Float3;Float 3;10;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;354;-3116.516,143.7743;Inherit;False;Property;_Fresnel_power;Fresnel_power;45;0;Create;False;0;0;0;False;0;False;5;5;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SmoothstepOpNode;438;-3042.372,-102.5467;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;331;-3774.49,-595.0944;Inherit;False;0;327;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.CommentaryNode;379;-4038.124,985.776;Inherit;False;1357.064;513.0515;顶点偏移;17;117;408;405;404;397;402;398;401;392;395;390;394;386;387;382;383;456;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.RotatorNode;399;-1982.796,1041.787;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.LerpOp;417;-2967.53,495.3727;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;358;-3117.441,228.9818;Inherit;False;Property;_Fresnel_scale;Fresnel_scale;44;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;324;-3366.821,-285.1875;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;310;-1754.733,-1106.798;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;383;-4019.97,1337.638;Inherit;False;Property;_WPO_Tex_U_speed;WPO_Tex_U_speed;51;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;316;-1991.336,-426.3635;Inherit;False;Property;_Main_Tex_Rotator;Main_Tex_Rotator;10;0;Create;True;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;357;-3065.048,748.7742;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.PannerNode;334;-3491.824,-590.861;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;355;-2780.357,492.9502;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ScaleNode;359;-2839.178,-0.1377404;Inherit;False;1;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.PowerNode;362;-2839.638,-94.73124;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;434;-1789.223,1127.729;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;435;-1828.661,1391.364;Inherit;False;Property;_Remap_Tex_ClampSwitch;Remap_Tex_ClampSwitch;17;1;[Enum];Create;False;0;2;Repeat;0;Clmap;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;382;-4020.07,1417.905;Inherit;False;Property;_WPO_Tex_V_speed;WPO_Tex_V_speed;52;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;363;-2682.291,-88.52399;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;386;-3819.563,1351.923;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;318;-1945.801,-271.8814;Inherit;False;Constant;_Float6;Float 6;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleSubtractOpNode;360;-2672.912,492.6289;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;387;-4015.871,1207.07;Inherit;False;0;397;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;361;-2817.052,752.7044;Inherit;False;Property;_Dissolve_Tex_smooth;Dissolve_Tex_smooth;32;0;Create;True;0;0;0;False;0;False;0.5;0.5;0.5;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RotatorNode;335;-3315.981,-590.5401;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.PiNode;317;-1807.319,-472.5045;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;433;-1640.485,1051.195;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;214;-1595.006,-1038.089;Inherit;False;ONE;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;476;-1414.547,1056.547;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;320;-1758.598,-284.0762;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;392;-3580.795,1020.401;Inherit;False;Property;_WPO_tex_power;WPO_tex_power;49;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;366;-2543.004,491.4722;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;319;-1978.921,-596.9757;Inherit;False;214;ONE;1;0;OBJECT;;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SaturateNode;325;-3147.291,-490.8478;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.PannerNode;390;-3678.016,1328.524;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;394;-3676.302,1136.529;Inherit;False;Property;_WPO_CustomSwitch_Y;WPO_CustomSwitch_Y;48;1;[Enum];Create;True;0;2;Normal;0;Custom;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;437;-2406.976,-57.97628;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.CommentaryNode;384;-2471.202,843.675;Inherit;False;864.7548;118.4831;软粒子;4;400;393;388;219;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.OneMinusNode;364;-2546.315,578.2346;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;365;-2524.07,74.15598;Inherit;False;Property;_Fresnel_Bokeh;Fresnel_Bokeh;43;1;[Enum];Create;True;0;2;Fresnel;0;Bokeh;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;414;-3240.689,-419.8793;Inherit;False;Property;_Mask_Tex_ClampSwitch;Mask_Tex_ClampSwitch;22;1;[Enum];Create;True;0;2;Repeat;0;Clmap;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;436;-2537.125,-9.627012;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;395;-4008.534,1029.139;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.NormalVertexDataNode;401;-3424.758,1148.736;Inherit;False;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.Vector4Node;402;-3235.426,1315.685;Inherit;False;Property;_WPO_Tex_Direction;WPO_Tex_Direction;50;0;Create;True;0;0;0;False;0;False;1,1,1,0;1,1,1,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.LerpOp;413;-2961.542,-581.2285;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SmoothstepOpNode;368;-2409.182,551.9802;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;406;-1276.948,1031.885;Inherit;True;Property;_Remap_Tex;Remap_Tex;13;1;[Header];Create;False;1;Remap_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;397;-3516.793,1298.851;Inherit;True;Property;_WPO_Tex;WPO_Tex;46;1;[Header];Create;True;1;Wpo_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.CommentaryNode;272;-1519.365,-574.176;Inherit;False;317.8248;263.5372;Clamp;2;314;411;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.RangedFloatNode;367;-2390.737,477.1368;Inherit;False;Constant;_Float8;Float 8;14;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;369;-2348.08,-109.8452;Inherit;False;Constant;_Float9;Float 9;35;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;442;-1410.709,1379.211;Inherit;False;Property;_Remap_Tex_Desaturate;Remap_Tex_Desaturate;16;0;Create;False;0;2;OFF;0;ON;1;0;False;0;False;0;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;398;-3395.739,1029.807;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;370;-2354.374,-39.74646;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;388;-2457.605,883.2485;Inherit;False;Property;_SoftParticle;SoftParticle;4;0;Create;False;0;0;0;False;0;False;0;0;0;10;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RotatorNode;321;-1819.908,-592.9556;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SaturateNode;314;-1498.292,-478.201;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.StaticSwitch;372;-2097.755,-82.22703;Inherit;False;Property;_Fresnel_Switch;Fresnel_Switch;42;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;False;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;405;-3082.053,1070.546;Inherit;False;Constant;_Float5;Float 5;30;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.DepthFade;393;-2176.349,868.8671;Inherit;False;True;False;True;2;1;FLOAT3;0,0,0;False;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;327;-2778.896,-603.2476;Inherit;True;Property;_Mask_Tex;Mask_Tex;21;1;[Header];Create;True;1;Mask_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.DesaturateOpNode;441;-960.3836,1038.185;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.RangedFloatNode;452;-2664.242,-405.5811;Inherit;False;Property;_Mask_Tex_A_R;Mask_Tex_A_R;23;1;[Enum];Create;True;0;2;R;0;A;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.ColorNode;373;-2382.336,172.6049;Inherit;False;Property;_Fresnel_Color;Fresnel_Color;41;2;[HDR];[Header];Create;True;1;Fresnel;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.StaticSwitch;371;-2169.855,542.6441;Inherit;False;Property;_Dissolve_Switch;Dissolve_Switch;28;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;False;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;412;-1521.403,-214.0435;Inherit;False;Property;_Main_Tex_ClampSwitch;Main_Tex_ClampSwitch;9;1;[Enum];Create;True;0;2;Repeat;0;Clmap;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;404;-3084.891,1153.761;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;2;COLOR;0,0,0,0;False;3;FLOAT4;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.LerpOp;411;-1346.54,-529.9504;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.StaticSwitch;408;-2945.351,1125.468;Inherit;False;Property;_WPO_Switch;WPO_Switch;47;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;False;True;All;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;374;-1887.078,498.9161;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;400;-1931.391,890.4071;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;375;-1788.698,-75.74274;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.LerpOp;453;-2394.517,-570.3816;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;425;-768.143,1038.969;Inherit;False;FLOAT3;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.RangedFloatNode;410;-1040,-176;Inherit;False;Property;_Main_Tex_A_R;Main_Tex_A_R;7;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;222;-1651.099,-59.50719;Inherit;False;four;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.CommentaryNode;141;-692.8089,-329.4375;Inherit;False;468.0941;422.9443;ALPHA模式连到不透明度,ADD模式连到Emission;5;137;218;216;220;257;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.ColorNode;2;-1373.281,-753.3946;Inherit;False;Property;_Main_Tex_Color;Main_Tex_Color;6;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1.319508,1.319508,1.319508,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.WireNode;456;-2750.186,1300.194;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;215;-2183.766,-576.2316;Inherit;False;two;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;219;-1788.901,882.9451;Inherit;False;soft;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;1;-1167.583,-557.4451;Inherit;True;Property;_Main_Tex;Main_Tex;5;1;[Header];Create;False;1;Main_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RegisterLocalVarNode;217;-1790.037,699.8013;Inherit;False;Three;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;258;-598.0679,1035.221;Inherit;False;Gam;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.RangedFloatNode;431;-975.3214,1242.979;Inherit;False;Property;_Remap_Tex_A_R;Remap_Tex_A_R;15;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;257;-669.8455,-233.2664;Inherit;False;258;Gam;1;0;OBJECT;;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.LerpOp;409;-843.8145,-337.8983;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;474;-803.1,-641.7573;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.LerpOp;432;-765.6511,1118.276;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;216;-675.0829,13.15239;Inherit;False;215;two;1;0;OBJECT;;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;220;-670.8891,-67.81808;Inherit;False;219;soft;1;0;OBJECT;;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;117;-2871.313,1410.971;Inherit;False;Vertex;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.GetLocalVarNode;218;-672.8101,-144.2242;Inherit;False;217;Three;1;0;OBJECT;;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;223;-508.6807,-524.9042;Inherit;False;222;four;1;0;OBJECT;;False;1;COLOR;0 +Node;AmplifyShaderEditor.VertexColorNode;3;-1332.854,-925.3873;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;137;-350.4396,-259.8481;Inherit;False;7;7;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;118;-197.0443,-206.2741;Inherit;False;117;Vertex;1;0;OBJECT;;False;1;COLOR;0 +Node;AmplifyShaderEditor.RangedFloatNode;142;235.069,-383.7109;Inherit;False;Property;_CullMode;CullMode;1;1;[Enum];Create;False;0;0;1;UnityEngine.Rendering.CullMode;True;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;4;-147.4585,-631.1379;Inherit;False;4;4;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;FLOAT3;0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.RangedFloatNode;475;241.5474,-204.5479;Inherit;False;Property;_Zwrite;Zwrite;3;1;[Enum];Create;False;0;2;ON;1;OFF;0;0;True;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;135;228.5842,-468.7425;Inherit;False;Property;_Dst;BlendMode;0;1;[Enum];Create;False;0;2;Add;1;Alpha;10;0;True;0;False;1;10;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;477;5.423859,-468.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;478;5.423859,-468.2598;Float;False;True;-1;2;LTY_ShaderGUI;0;13;A201-Shader/URP/LTY_多功能整合URP;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;True;True;0;True;_CullMode;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;True;True;2;5;False;;10;True;_Dst;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;True;True;2;True;_Zwrite;True;3;True;_ZTestMode;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638393316110075182; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638393316092849708; Use Shadow Threshold;0;0;Receive Shadows;0;638393316099640498;GPU Instancing;0;638393316102216753;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;False;False;False;False;False;;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;479;5.423859,-468.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;480;5.423859,-468.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;481;5.423859,-468.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;482;5.423859,-468.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;483;5.423859,-468.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;484;5.423859,-468.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;485;5.423859,-468.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;486;5.423859,-468.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.RangedFloatNode;238;239.8492,-297.8818;Inherit;False;Property;_ZTestMode;ZTest;2;1;[Enum];Create;False;0;2;Less or Equal;4;Always;8;0;True;0;False;4;4;0;0;0;1;FLOAT;0 +WireConnection;301;0;288;3 +WireConnection;301;1;288;4 +WireConnection;427;0;426;0 +WireConnection;465;0;301;0 +WireConnection;283;0;281;0 +WireConnection;283;1;280;0 +WireConnection;429;0;427;0 +WireConnection;429;1;428;0 +WireConnection;458;0;283;0 +WireConnection;446;0;465;0 +WireConnection;457;0;458;0 +WireConnection;464;0;429;0 +WireConnection;293;0;284;0 +WireConnection;293;1;287;0 +WireConnection;463;0;464;0 +WireConnection;289;0;287;0 +WireConnection;289;1;285;0 +WireConnection;286;0;282;0 +WireConnection;286;2;457;0 +WireConnection;389;0;381;0 +WireConnection;448;0;451;0 +WireConnection;448;1;447;0 +WireConnection;448;2;449;0 +WireConnection;343;0;338;0 +WireConnection;343;1;337;0 +WireConnection;345;0;343;0 +WireConnection;298;0;293;0 +WireConnection;298;1;289;0 +WireConnection;430;0;341;0 +WireConnection;430;2;463;0 +WireConnection;396;0;389;0 +WireConnection;396;1;385;0 +WireConnection;292;1;286;0 +WireConnection;459;0;448;0 +WireConnection;420;0;419;0 +WireConnection;420;1;418;0 +WireConnection;342;0;340;0 +WireConnection;342;1;339;0 +WireConnection;346;0;430;0 +WireConnection;346;2;342;0 +WireConnection;300;0;288;1 +WireConnection;296;0;292;1 +WireConnection;350;0;345;0 +WireConnection;443;0;298;0 +WireConnection;462;0;396;0 +WireConnection;460;0;459;0 +WireConnection;421;0;391;0 +WireConnection;421;2;420;0 +WireConnection;353;1;346;0 +WireConnection;305;0;443;0 +WireConnection;305;1;297;0 +WireConnection;307;0;299;0 +WireConnection;307;1;296;0 +WireConnection;302;0;297;0 +WireConnection;302;1;301;0 +WireConnection;356;0;350;0 +WireConnection;461;0;462;0 +WireConnection;450;0;421;0 +WireConnection;450;1;460;0 +WireConnection;308;0;305;0 +WireConnection;308;1;302;0 +WireConnection;308;2;306;0 +WireConnection;351;0;348;0 +WireConnection;351;1;347;0 +WireConnection;351;2;344;0 +WireConnection;332;0;330;0 +WireConnection;332;1;329;0 +WireConnection;309;0;303;0 +WireConnection;309;1;307;0 +WireConnection;309;2;304;0 +WireConnection;333;0;322;0 +WireConnection;438;0;356;0 +WireConnection;438;1;439;0 +WireConnection;438;2;440;0 +WireConnection;399;0;450;0 +WireConnection;399;2;461;0 +WireConnection;417;0;353;1 +WireConnection;417;1;353;4 +WireConnection;417;2;416;0 +WireConnection;324;0;333;0 +WireConnection;324;1;323;0 +WireConnection;310;0;308;0 +WireConnection;310;1;309;0 +WireConnection;357;0;351;0 +WireConnection;357;1;352;0 +WireConnection;334;0;331;0 +WireConnection;334;2;332;0 +WireConnection;355;0;417;0 +WireConnection;355;1;349;0 +WireConnection;359;0;358;0 +WireConnection;362;0;438;0 +WireConnection;362;1;354;0 +WireConnection;434;0;399;0 +WireConnection;363;0;362;0 +WireConnection;363;1;359;0 +WireConnection;386;0;383;0 +WireConnection;386;1;382;0 +WireConnection;360;0;355;0 +WireConnection;360;1;357;0 +WireConnection;335;0;334;0 +WireConnection;335;2;324;0 +WireConnection;317;0;316;0 +WireConnection;433;0;399;0 +WireConnection;433;1;434;0 +WireConnection;433;2;435;0 +WireConnection;214;0;310;0 +WireConnection;476;0;309;0 +WireConnection;476;1;433;0 +WireConnection;320;0;317;0 +WireConnection;320;1;318;0 +WireConnection;366;0;360;0 +WireConnection;325;0;335;0 +WireConnection;390;0;387;0 +WireConnection;390;2;386;0 +WireConnection;437;0;363;0 +WireConnection;364;0;361;0 +WireConnection;436;0;363;0 +WireConnection;413;0;335;0 +WireConnection;413;1;325;0 +WireConnection;413;2;414;0 +WireConnection;368;0;366;0 +WireConnection;368;1;364;0 +WireConnection;368;2;361;0 +WireConnection;406;1;476;0 +WireConnection;397;1;390;0 +WireConnection;398;0;392;0 +WireConnection;398;1;395;2 +WireConnection;398;2;394;0 +WireConnection;370;0;437;0 +WireConnection;370;1;436;0 +WireConnection;370;2;365;0 +WireConnection;321;0;319;0 +WireConnection;321;2;320;0 +WireConnection;314;0;321;0 +WireConnection;372;1;369;0 +WireConnection;372;0;370;0 +WireConnection;393;0;388;0 +WireConnection;327;1;413;0 +WireConnection;441;0;406;0 +WireConnection;441;1;442;0 +WireConnection;371;1;367;0 +WireConnection;371;0;368;0 +WireConnection;404;0;398;0 +WireConnection;404;1;401;0 +WireConnection;404;2;397;0 +WireConnection;404;3;402;0 +WireConnection;411;0;321;0 +WireConnection;411;1;314;0 +WireConnection;411;2;412;0 +WireConnection;408;1;405;0 +WireConnection;408;0;404;0 +WireConnection;374;0;372;0 +WireConnection;374;1;373;4 +WireConnection;374;2;371;0 +WireConnection;400;0;393;0 +WireConnection;375;0;372;0 +WireConnection;375;1;371;0 +WireConnection;375;2;373;0 +WireConnection;453;0;327;1 +WireConnection;453;1;327;4 +WireConnection;453;2;452;0 +WireConnection;425;0;441;0 +WireConnection;222;0;375;0 +WireConnection;456;0;408;0 +WireConnection;215;0;453;0 +WireConnection;219;0;400;0 +WireConnection;1;1;411;0 +WireConnection;217;0;374;0 +WireConnection;258;0;425;0 +WireConnection;409;0;1;1 +WireConnection;409;1;1;4 +WireConnection;409;2;410;0 +WireConnection;474;0;2;0 +WireConnection;474;1;1;0 +WireConnection;432;0;406;1 +WireConnection;432;1;406;4 +WireConnection;432;2;431;0 +WireConnection;117;0;456;0 +WireConnection;137;0;3;4 +WireConnection;137;1;2;4 +WireConnection;137;2;409;0 +WireConnection;137;3;218;0 +WireConnection;137;4;220;0 +WireConnection;137;5;216;0 +WireConnection;137;6;432;0 +WireConnection;4;0;3;0 +WireConnection;4;1;474;0 +WireConnection;4;2;223;0 +WireConnection;4;3;257;0 +WireConnection;478;2;4;0 +WireConnection;478;3;137;0 +WireConnection;478;5;118;0 +ASEEND*/ +//CHKSM=567BA3C98F805AE55059702113032842DBC46C89 \ No newline at end of file diff --git a/URP/Soung_All_in_One.shader b/URP/Soung_All_in_One.shader new file mode 100644 index 0000000..c04deca --- /dev/null +++ b/URP/Soung_All_in_One.shader @@ -0,0 +1,861 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/通用单贴图材质" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [ASEBegin][Header(MainTex)]_MainTexU("贴图", 2D) = "white" {} + [HDR]_BaseColor("颜色", Color) = (1,1,1,1) + [Enum(UnityEngine.Rendering.CullMode)]_CullingMode("剔除模式", Float) = 0 + [Enum(AlphaBlend,10,Additive,1)]_BlendMode("混合模式", Float) = 1 + [Enum(R,0,A,1)]_SwitchP("贴图通道切换", Float) = 0 + [IntRange]_RotatorVal("贴图旋转", Range( 0 , 360)) = 0 + _TexScale("贴图缩放", Range( 0 , 5)) = 1 + _HueSwitch("色相变换", Range( 0 , 1)) = 0 + _SaturationVa("饱和度", Range( 0 , 1.5)) = 1 + [ASEEnd]_DepthFade("软粒子", Range( 0 , 1)) = 0 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull [_CullingMode] + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 4.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha [_BlendMode], One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _SURFACE_TYPE_TRANSPARENT 1 + #define _RECEIVE_SHADOWS_OFF 1 + #define ASE_SRP_VERSION 120111 + #define REQUIRE_DEPTH_TEXTURE 1 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_FRAG_COLOR + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_texcoord4 : TEXCOORD4; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainTexU_ST; + float4 _BaseColor; + float _BlendMode; + float _CullingMode; + float _DepthFade; + float _HueSwitch; + float _RotatorVal; + float _TexScale; + float _SaturationVa; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + uniform float4 _CameraDepthTexture_TexelSize; + sampler2D _MainTexU; + + + float3 HSVToRGB( float3 c ) + { + float4 K = float4( 1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0 ); + float3 p = abs( frac( c.xxx + K.xyz ) * 6.0 - K.www ); + return c.z * lerp( K.xxx, saturate( p - K.xxx ), c.y ); + } + + float3 RGBToHSV(float3 c) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 p = lerp( float4( c.bg, K.wz ), float4( c.gb, K.xy ), step( c.b, c.g ) ); + float4 q = lerp( float4( p.xyw, c.r ), float4( c.r, p.yzx ), step( p.x, c.r ) ); + float d = q.x - min( q.w, q.y ); + float e = 1.0e-10; + return float3( abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); + } + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); + float4 screenPos = ComputeScreenPos(ase_clipPos); + o.ase_texcoord3 = screenPos; + + o.ase_texcoord4.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord4.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float4 screenPos = IN.ase_texcoord3; + float4 ase_screenPosNorm = screenPos / screenPos.w; + ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; + float screenDepth74 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); + float distanceDepth74 = abs( ( screenDepth74 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _DepthFade ) ); + float temp_output_77_0 = saturate( distanceDepth74 ); + float2 uv_MainTexU = IN.ase_texcoord4.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float cos51 = cos( (0.0 + (_RotatorVal - 0.0) * (6.28 - 0.0) / (360.0 - 0.0)) ); + float sin51 = sin( (0.0 + (_RotatorVal - 0.0) * (6.28 - 0.0) / (360.0 - 0.0)) ); + float2 rotator51 = mul( uv_MainTexU - float2( 0.5,0.5 ) , float2x2( cos51 , -sin51 , sin51 , cos51 )) + float2( 0.5,0.5 ); + float2 myVarName60 = rotator51; + float4 tex2DNode1 = tex2D( _MainTexU, ( ( myVarName60 * _TexScale ) + -( _TexScale * 0.5 ) + 0.5 ) ); + float3 hsvTorgb14 = RGBToHSV( (tex2DNode1).rgb ); + float3 hsvTorgb15 = HSVToRGB( float3(( _HueSwitch + hsvTorgb14.x ),( hsvTorgb14.y * _SaturationVa ),hsvTorgb14.z) ); + float3 appendResult69 = (float3(_BaseColor.r , _BaseColor.g , _BaseColor.b)); + float3 appendResult70 = (float3(IN.ase_color.r , IN.ase_color.g , IN.ase_color.b)); + + float lerpResult5 = lerp( tex2DNode1.r , tex2DNode1.a , _SwitchP); + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( temp_output_77_0 * ( hsvTorgb15 * appendResult69 * appendResult70 ) ); + float Alpha = ( temp_output_77_0 * ( lerpResult5 * _BaseColor.a * IN.ase_color.a ) ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _SURFACE_TYPE_TRANSPARENT 1 + #define _RECEIVE_SHADOWS_OFF 1 + #define ASE_SRP_VERSION 120111 + #define REQUIRE_DEPTH_TEXTURE 1 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_texcoord2 : TEXCOORD2; + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainTexU_ST; + float4 _BaseColor; + float _BlendMode; + float _CullingMode; + float _DepthFade; + float _HueSwitch; + float _RotatorVal; + float _TexScale; + float _SaturationVa; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + uniform float4 _CameraDepthTexture_TexelSize; + sampler2D _MainTexU; + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); + float4 screenPos = ComputeScreenPos(ase_clipPos); + o.ase_texcoord2 = screenPos; + + o.ase_texcoord3.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float4 screenPos = IN.ase_texcoord2; + float4 ase_screenPosNorm = screenPos / screenPos.w; + ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; + float screenDepth74 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); + float distanceDepth74 = abs( ( screenDepth74 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _DepthFade ) ); + float temp_output_77_0 = saturate( distanceDepth74 ); + float2 uv_MainTexU = IN.ase_texcoord3.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float cos51 = cos( (0.0 + (_RotatorVal - 0.0) * (6.28 - 0.0) / (360.0 - 0.0)) ); + float sin51 = sin( (0.0 + (_RotatorVal - 0.0) * (6.28 - 0.0) / (360.0 - 0.0)) ); + float2 rotator51 = mul( uv_MainTexU - float2( 0.5,0.5 ) , float2x2( cos51 , -sin51 , sin51 , cos51 )) + float2( 0.5,0.5 ); + float2 myVarName60 = rotator51; + float4 tex2DNode1 = tex2D( _MainTexU, ( ( myVarName60 * _TexScale ) + -( _TexScale * 0.5 ) + 0.5 ) ); + float lerpResult5 = lerp( tex2DNode1.r , tex2DNode1.a , _SwitchP); + + + float Alpha = ( temp_output_77_0 * ( lerpResult5 * _BaseColor.a * IN.ase_color.a ) ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.CommentaryNode;78;-216.2518,-265.3338;Inherit;False;623.8999;141.6;深度消隐;3;75;77;74;软粒子;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;67;-700.0571,-112.3159;Inherit;False;636;414;色相与饱和度变换;6;15;66;23;64;22;14;贴图颜色;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;63;-1167.461,-252.3126;Inherit;False;267;125;公开材质属性;2;11;73;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;62;-2094.016,-535.9822;Inherit;False;909.8999;802;贴图UV变换;2;43;59;贴图UV;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;59;-2078.43,-490.1173;Inherit;False;878;362;旋转实现;6;60;42;51;56;45;55;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;43;-2077.052,-118.4895;Inherit;False;717;368;缩放实现;7;61;30;27;28;31;40;26;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.TFHCRemapNode;55;-1802.833,-297.9548;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;360;False;3;FLOAT;0;False;4;FLOAT;6.28;False;1;FLOAT;0 +Node;AmplifyShaderEditor.Vector2Node;45;-1794.614,-423.713;Inherit;False;Constant;_RotatorInt;RotatorInt;2;0;Create;True;0;0;0;False;0;False;0.5,0.5;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.RangedFloatNode;56;-2063.378,-302.1489;Inherit;False;Property;_RotatorVal;贴图旋转;5;1;[IntRange];Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RotatorNode;51;-1625.778,-443.1502;Inherit;True;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;42;-2006.142,-447.3788;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.RegisterLocalVarNode;60;-1385.931,-448.6863;Inherit;False;myVarName;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;26;-1802.383,-51.25961;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;31;-1941.921,79.18849;Inherit;False;Constant;_ScaleInt;ScaleInt;6;0;Create;True;0;0;0;False;0;False;0.5;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.NegateNode;28;-1673.974,59.80606;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;27;-1801.379,38.80581;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;30;-1555.122,34.88808;Inherit;True;3;3;0;FLOAT2;0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.GetLocalVarNode;61;-1979.031,-72.88651;Inherit;False;60;myVarName;1;0;OBJECT;;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;40;-2067.198,6.696677;Inherit;False;Property;_TexScale;贴图缩放;6;0;Create;False;0;0;0;False;0;False;1;1;0;5;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;23;-418.9601,-62.91815;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;66;-414.0571,136.6841;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.HSVToRGBNode;15;-285.4514,36.07349;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 +Node;AmplifyShaderEditor.RGBToHSVNode;14;-685.5551,10.79332;Inherit;False;1;0;FLOAT3;0,0,0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 +Node;AmplifyShaderEditor.RangedFloatNode;22;-687.9601,-67.91815;Inherit;False;Property;_HueSwitch;色相变换;7;0;Create;False;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;64;-685.0571,155.6841;Inherit;False;Property;_SaturationVa;饱和度;8;0;Create;False;0;0;0;False;0;False;1;1;0;1.5;0;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;5;-886,83;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ComponentMaskNode;17;-888.2877,5.918488;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.RangedFloatNode;6;-1044,194;Inherit;False;Property;_SwitchP;贴图通道切换;4;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.VertexColorNode;4;-648.1982,483.2492;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.DynamicAppendNode;69;-495.6907,342.3528;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;71;-279.6907,534.3528;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;68;-14.54675,321.1809;Inherit;False;3;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.RangedFloatNode;73;-1157.99,-206.2554;Inherit;False;Property;_BlendMode;混合模式;3;1;[Enum];Create;False;0;2;AlphaBlend;10;Additive;1;0;True;0;False;1;10;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;11;-1026.527,-205.0391;Inherit;False;Property;_CullingMode;剔除模式;2;1;[Enum];Create;False;0;1;Option1;0;1;UnityEngine.Rendering.CullMode;True;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.ColorNode;2;-690.1,312.6999;Inherit;False;Property;_BaseColor;颜色;1;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;1;-1174,6;Inherit;True;Property;_MainTexU;贴图;0;1;[Header];Create;False;1;MainTex;0;0;False;0;False;-1;None;8c052a69009f25a45aff9f10624768f0;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.DynamicAppendNode;70;-496.6907,507.3528;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.DepthFade;74;55.82647,-218.1649;Inherit;False;True;False;True;2;1;FLOAT3;0,0,0;False;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;77;281.3915,-219.176;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;75;-203.6087,-199.176;Inherit;False;Property;_DepthFade;软粒子;9;0;Create;False;0;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;79;577.7,-0.9000092;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;81;577.7,-0.9000092;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;82;577.7,-0.9000092;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;83;577.7,-0.9000092;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;84;577.7,-0.9000092;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;85;577.7,-0.9000092;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;86;577.7,-0.9000092;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;87;577.7,-0.9000092;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;88;577.7,-0.9000092;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;76;440.8915,-108.076;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;80;630.7,-107.9;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;A201-Shader/URP/通用单贴图材质;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;True;True;0;True;_CullingMode;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;True;True;2;5;False;;10;True;_BlendMode;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392559417034479; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392559541927181; Use Shadow Threshold;0;0;Receive Shadows;0;638392559549317359;GPU Instancing;0;638392565104932640;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;False;False;False;False;False;;False;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;89;454.1488,2.799103;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +WireConnection;55;0;56;0 +WireConnection;51;0;42;0 +WireConnection;51;1;45;0 +WireConnection;51;2;55;0 +WireConnection;60;0;51;0 +WireConnection;26;0;61;0 +WireConnection;26;1;40;0 +WireConnection;28;0;27;0 +WireConnection;27;0;40;0 +WireConnection;27;1;31;0 +WireConnection;30;0;26;0 +WireConnection;30;1;28;0 +WireConnection;30;2;31;0 +WireConnection;23;0;22;0 +WireConnection;23;1;14;1 +WireConnection;66;0;14;2 +WireConnection;66;1;64;0 +WireConnection;15;0;23;0 +WireConnection;15;1;66;0 +WireConnection;15;2;14;3 +WireConnection;14;0;17;0 +WireConnection;5;0;1;1 +WireConnection;5;1;1;4 +WireConnection;5;2;6;0 +WireConnection;17;0;1;0 +WireConnection;69;0;2;1 +WireConnection;69;1;2;2 +WireConnection;69;2;2;3 +WireConnection;71;0;5;0 +WireConnection;71;1;2;4 +WireConnection;71;2;4;4 +WireConnection;68;0;15;0 +WireConnection;68;1;69;0 +WireConnection;68;2;70;0 +WireConnection;1;1;30;0 +WireConnection;70;0;4;1 +WireConnection;70;1;4;2 +WireConnection;70;2;4;3 +WireConnection;74;0;75;0 +WireConnection;77;0;74;0 +WireConnection;76;0;77;0 +WireConnection;76;1;68;0 +WireConnection;80;2;76;0 +WireConnection;80;3;89;0 +WireConnection;89;0;77;0 +WireConnection;89;1;71;0 +ASEEND*/ +//CHKSM=1631F77CCA4E099197956721D1C061D108CC8168 \ No newline at end of file diff --git a/URP/Soung_AutoGlitch.shader b/URP/Soung_AutoGlitch.shader new file mode 100644 index 0000000..6a20732 --- /dev/null +++ b/URP/Soung_AutoGlitch.shader @@ -0,0 +1,1788 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/自动故障扰动" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [ASEBegin][HDR]_MainColor("整体颜色", Color) = (1,1,1,1) + _MainTexU1("主纹理", 2D) = "white" {} + _NoiseTex("扰动贴图", 2D) = "white" {} + [Enum(U,0,V,1)]_NoisePivot("扰动方向 (匹配偏移量设置)", Float) = 0 + _NoiseScale("扰动强度", Range( 0 , 0.1)) = 0.1 + _RB_Offset("偏移量 (RU_RV_BU_BV)", Vector) = (0.05,0,0,0) + _NoiseSpeed("扰动速率", Vector) = (1,1,0,0) + [Enum(Manual,0,Auto,1)]_NoiseMode("扰动模式", Float) = 0 + [ASEEnd]_TimeScale("自动偏移速度", Float) = 2 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull Back + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 3.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_FRAG_COLOR + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord3 : TEXCOORD3; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _NoiseTex_ST; + float4 _RB_Offset; + float4 _MainColor; + float2 _NoiseSpeed; + float _NoiseScale; + float _TimeScale; + float _NoiseMode; + float _NoisePivot; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU1; + sampler2D _NoiseTex; + + + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord3.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 texCoord11 = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); + float2 uv_NoiseTex = IN.ase_texcoord3.xy * _NoiseTex_ST.xy + _NoiseTex_ST.zw; + float2 panner9 = ( 1.0 * _Time.y * _NoiseSpeed + uv_NoiseTex); + float mulTime39 = _TimeParameters.x * _TimeScale; + float lerpResult41 = lerp( _NoiseScale , ( _NoiseScale * sin( mulTime39 ) ) , _NoiseMode); + float temp_output_48_0 = saturate( lerpResult41 ); + float temp_output_14_0 = ( (-0.5 + (tex2D( _NoiseTex, panner9 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) * temp_output_48_0 ); + float lerpResult53 = lerp( ( texCoord11.x + temp_output_14_0 ) , texCoord11.x , _NoisePivot); + float lerpResult54 = lerp( texCoord11.y , ( texCoord11.y + temp_output_14_0 ) , _NoisePivot); + float2 appendResult13 = (float2(lerpResult53 , lerpResult54)); + float4 break20 = ( (0.0 + (temp_output_48_0 - 0.0) * (1.0 - 0.0) / (0.1 - 0.0)) * _RB_Offset ); + float2 appendResult26 = (float2(break20.x , break20.y)); + float4 tex2DNode4 = tex2D( _MainTexU1, appendResult13 ); + float2 appendResult27 = (float2(break20.z , break20.w)); + float3 appendResult30 = (float3(tex2D( _MainTexU1, ( appendResult13 + appendResult26 ) ).r , tex2DNode4.g , tex2D( _MainTexU1, ( appendResult13 + appendResult27 ) ).b)); + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( IN.ase_color * float4( appendResult30 , 0.0 ) * _MainColor ).rgb; + float Alpha = ( IN.ase_color.a * tex2DNode4.a * _MainColor.a ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord2 : TEXCOORD2; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _NoiseTex_ST; + float4 _RB_Offset; + float4 _MainColor; + float2 _NoiseSpeed; + float _NoiseScale; + float _TimeScale; + float _NoiseMode; + float _NoisePivot; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU1; + sampler2D _NoiseTex; + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord2.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord2.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 texCoord11 = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 ); + float2 uv_NoiseTex = IN.ase_texcoord2.xy * _NoiseTex_ST.xy + _NoiseTex_ST.zw; + float2 panner9 = ( 1.0 * _Time.y * _NoiseSpeed + uv_NoiseTex); + float mulTime39 = _TimeParameters.x * _TimeScale; + float lerpResult41 = lerp( _NoiseScale , ( _NoiseScale * sin( mulTime39 ) ) , _NoiseMode); + float temp_output_48_0 = saturate( lerpResult41 ); + float temp_output_14_0 = ( (-0.5 + (tex2D( _NoiseTex, panner9 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) * temp_output_48_0 ); + float lerpResult53 = lerp( ( texCoord11.x + temp_output_14_0 ) , texCoord11.x , _NoisePivot); + float lerpResult54 = lerp( texCoord11.y , ( texCoord11.y + temp_output_14_0 ) , _NoisePivot); + float2 appendResult13 = (float2(lerpResult53 , lerpResult54)); + float4 tex2DNode4 = tex2D( _MainTexU1, appendResult13 ); + + + float Alpha = ( IN.ase_color.a * tex2DNode4.a * _MainColor.a ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + Pass + { + + Name "SceneSelectionPass" + Tags { "LightMode"="SceneSelectionPass" } + + Cull Off + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #define ATTRIBUTES_NEED_NORMAL + #define ATTRIBUTES_NEED_TANGENT + #define SHADERPASS SHADERPASS_DEPTHONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _NoiseTex_ST; + float4 _RB_Offset; + float4 _MainColor; + float2 _NoiseSpeed; + float _NoiseScale; + float _TimeScale; + float _NoiseMode; + float _NoisePivot; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU1; + sampler2D _NoiseTex; + + + + int _ObjectId; + int _PassValue; + + struct SurfaceDescription + { + float Alpha; + float AlphaClipThreshold; + }; + + VertexOutput VertexFunction(VertexInput v ) + { + VertexOutput o; + ZERO_INITIALIZE(VertexOutput, o); + + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + o.clipPos = TransformWorldToHClip(positionWS); + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + SurfaceDescription surfaceDescription = (SurfaceDescription)0; + + float2 texCoord11 = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); + float2 uv_NoiseTex = IN.ase_texcoord.xy * _NoiseTex_ST.xy + _NoiseTex_ST.zw; + float2 panner9 = ( 1.0 * _Time.y * _NoiseSpeed + uv_NoiseTex); + float mulTime39 = _TimeParameters.x * _TimeScale; + float lerpResult41 = lerp( _NoiseScale , ( _NoiseScale * sin( mulTime39 ) ) , _NoiseMode); + float temp_output_48_0 = saturate( lerpResult41 ); + float temp_output_14_0 = ( (-0.5 + (tex2D( _NoiseTex, panner9 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) * temp_output_48_0 ); + float lerpResult53 = lerp( ( texCoord11.x + temp_output_14_0 ) , texCoord11.x , _NoisePivot); + float lerpResult54 = lerp( texCoord11.y , ( texCoord11.y + temp_output_14_0 ) , _NoisePivot); + float2 appendResult13 = (float2(lerpResult53 , lerpResult54)); + float4 tex2DNode4 = tex2D( _MainTexU1, appendResult13 ); + + + surfaceDescription.Alpha = ( IN.ase_color.a * tex2DNode4.a * _MainColor.a ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + float alphaClipThreshold = 0.01f; + #if ALPHA_CLIP_THRESHOLD + alphaClipThreshold = surfaceDescription.AlphaClipThreshold; + #endif + clip(surfaceDescription.Alpha - alphaClipThreshold); + #endif + + half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0); + return outColor; + } + ENDHLSL + } + + + Pass + { + + Name "ScenePickingPass" + Tags { "LightMode"="Picking" } + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #define ATTRIBUTES_NEED_NORMAL + #define ATTRIBUTES_NEED_TANGENT + #define SHADERPASS SHADERPASS_DEPTHONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _NoiseTex_ST; + float4 _RB_Offset; + float4 _MainColor; + float2 _NoiseSpeed; + float _NoiseScale; + float _TimeScale; + float _NoiseMode; + float _NoisePivot; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU1; + sampler2D _NoiseTex; + + + + float4 _SelectionID; + + + struct SurfaceDescription + { + float Alpha; + float AlphaClipThreshold; + }; + + VertexOutput VertexFunction(VertexInput v ) + { + VertexOutput o; + ZERO_INITIALIZE(VertexOutput, o); + + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord.zw = 0; + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + float3 vertexValue = defaultVertexValue; + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + o.clipPos = TransformWorldToHClip(positionWS); + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + SurfaceDescription surfaceDescription = (SurfaceDescription)0; + + float2 texCoord11 = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); + float2 uv_NoiseTex = IN.ase_texcoord.xy * _NoiseTex_ST.xy + _NoiseTex_ST.zw; + float2 panner9 = ( 1.0 * _Time.y * _NoiseSpeed + uv_NoiseTex); + float mulTime39 = _TimeParameters.x * _TimeScale; + float lerpResult41 = lerp( _NoiseScale , ( _NoiseScale * sin( mulTime39 ) ) , _NoiseMode); + float temp_output_48_0 = saturate( lerpResult41 ); + float temp_output_14_0 = ( (-0.5 + (tex2D( _NoiseTex, panner9 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) * temp_output_48_0 ); + float lerpResult53 = lerp( ( texCoord11.x + temp_output_14_0 ) , texCoord11.x , _NoisePivot); + float lerpResult54 = lerp( texCoord11.y , ( texCoord11.y + temp_output_14_0 ) , _NoisePivot); + float2 appendResult13 = (float2(lerpResult53 , lerpResult54)); + float4 tex2DNode4 = tex2D( _MainTexU1, appendResult13 ); + + + surfaceDescription.Alpha = ( IN.ase_color.a * tex2DNode4.a * _MainColor.a ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + float alphaClipThreshold = 0.01f; + #if ALPHA_CLIP_THRESHOLD + alphaClipThreshold = surfaceDescription.AlphaClipThreshold; + #endif + clip(surfaceDescription.Alpha - alphaClipThreshold); + #endif + + half4 outColor = 0; + outColor = _SelectionID; + + return outColor; + } + + ENDHLSL + } + + + Pass + { + + Name "DepthNormals" + Tags { "LightMode"="DepthNormalsOnly" } + + ZTest LEqual + ZWrite On + + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #define ATTRIBUTES_NEED_NORMAL + #define ATTRIBUTES_NEED_TANGENT + #define VARYINGS_NEED_NORMAL_WS + + #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + float3 normalWS : TEXCOORD0; + float4 ase_color : COLOR; + float4 ase_texcoord1 : TEXCOORD1; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _NoiseTex_ST; + float4 _RB_Offset; + float4 _MainColor; + float2 _NoiseSpeed; + float _NoiseScale; + float _TimeScale; + float _NoiseMode; + float _NoisePivot; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU1; + sampler2D _NoiseTex; + + + + struct SurfaceDescription + { + float Alpha; + float AlphaClipThreshold; + }; + + VertexOutput VertexFunction(VertexInput v ) + { + VertexOutput o; + ZERO_INITIALIZE(VertexOutput, o); + + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord1.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord1.zw = 0; + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float3 normalWS = TransformObjectToWorldNormal(v.ase_normal); + + o.clipPos = TransformWorldToHClip(positionWS); + o.normalWS.xyz = normalWS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + SurfaceDescription surfaceDescription = (SurfaceDescription)0; + + float2 texCoord11 = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); + float2 uv_NoiseTex = IN.ase_texcoord1.xy * _NoiseTex_ST.xy + _NoiseTex_ST.zw; + float2 panner9 = ( 1.0 * _Time.y * _NoiseSpeed + uv_NoiseTex); + float mulTime39 = _TimeParameters.x * _TimeScale; + float lerpResult41 = lerp( _NoiseScale , ( _NoiseScale * sin( mulTime39 ) ) , _NoiseMode); + float temp_output_48_0 = saturate( lerpResult41 ); + float temp_output_14_0 = ( (-0.5 + (tex2D( _NoiseTex, panner9 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) * temp_output_48_0 ); + float lerpResult53 = lerp( ( texCoord11.x + temp_output_14_0 ) , texCoord11.x , _NoisePivot); + float lerpResult54 = lerp( texCoord11.y , ( texCoord11.y + temp_output_14_0 ) , _NoisePivot); + float2 appendResult13 = (float2(lerpResult53 , lerpResult54)); + float4 tex2DNode4 = tex2D( _MainTexU1, appendResult13 ); + + + surfaceDescription.Alpha = ( IN.ase_color.a * tex2DNode4.a * _MainColor.a ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + float3 normalWS = IN.normalWS; + + return half4(NormalizeNormalPerPixel(normalWS), 0.0); + } + + ENDHLSL + } + + + Pass + { + + Name "DepthNormalsOnly" + Tags { "LightMode"="DepthNormalsOnly" } + + ZTest LEqual + ZWrite On + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma exclude_renderers glcore gles gles3 + #pragma vertex vert + #pragma fragment frag + + #define ATTRIBUTES_NEED_NORMAL + #define ATTRIBUTES_NEED_TANGENT + #define ATTRIBUTES_NEED_TEXCOORD1 + #define VARYINGS_NEED_NORMAL_WS + #define VARYINGS_NEED_TANGENT_WS + + #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + float3 normalWS : TEXCOORD0; + float4 ase_color : COLOR; + float4 ase_texcoord1 : TEXCOORD1; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _NoiseTex_ST; + float4 _RB_Offset; + float4 _MainColor; + float2 _NoiseSpeed; + float _NoiseScale; + float _TimeScale; + float _NoiseMode; + float _NoisePivot; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + sampler2D _MainTexU1; + sampler2D _NoiseTex; + + + + struct SurfaceDescription + { + float Alpha; + float AlphaClipThreshold; + }; + + VertexOutput VertexFunction(VertexInput v ) + { + VertexOutput o; + ZERO_INITIALIZE(VertexOutput, o); + + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord1.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord1.zw = 0; + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float3 normalWS = TransformObjectToWorldNormal(v.ase_normal); + + o.clipPos = TransformWorldToHClip(positionWS); + o.normalWS.xyz = normalWS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + SurfaceDescription surfaceDescription = (SurfaceDescription)0; + + float2 texCoord11 = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); + float2 uv_NoiseTex = IN.ase_texcoord1.xy * _NoiseTex_ST.xy + _NoiseTex_ST.zw; + float2 panner9 = ( 1.0 * _Time.y * _NoiseSpeed + uv_NoiseTex); + float mulTime39 = _TimeParameters.x * _TimeScale; + float lerpResult41 = lerp( _NoiseScale , ( _NoiseScale * sin( mulTime39 ) ) , _NoiseMode); + float temp_output_48_0 = saturate( lerpResult41 ); + float temp_output_14_0 = ( (-0.5 + (tex2D( _NoiseTex, panner9 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) * temp_output_48_0 ); + float lerpResult53 = lerp( ( texCoord11.x + temp_output_14_0 ) , texCoord11.x , _NoisePivot); + float lerpResult54 = lerp( texCoord11.y , ( texCoord11.y + temp_output_14_0 ) , _NoisePivot); + float2 appendResult13 = (float2(lerpResult53 , lerpResult54)); + float4 tex2DNode4 = tex2D( _MainTexU1, appendResult13 ); + + + surfaceDescription.Alpha = ( IN.ase_color.a * tex2DNode4.a * _MainColor.a ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + float3 normalWS = IN.normalWS; + + return half4(NormalizeNormalPerPixel(normalWS), 0.0); + } + + ENDHLSL + } + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.PannerNode;9;-1917.814,121.3476;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;2;-2161.557,116.5701;Inherit;False;0;8;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;10;-2088.814,239.3477;Inherit;False;Property;_NoiseSpeed;扰动速率;6;0;Create;False;0;0;0;False;0;False;1,1;0.5,0.5;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.DynamicAppendNode;27;-651.9914,387.178;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.DynamicAppendNode;26;-651.9914,293.178;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.SimpleAddOpNode;28;-460.9824,153.3174;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;29;-461.4291,360.2454;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;16;-908.4456,307.7872;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0 +Node;AmplifyShaderEditor.SamplerNode;8;-1731.218,92.67458;Inherit;True;Property;_NoiseTex;扰动贴图;2;0;Create;False;0;0;0;False;0;False;-1;None;321c17a907e93294a8511c4c3de0d2b1;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;45;-1640.33,475.9615;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleTimeNode;39;-1917.55,499.9915;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SinOpNode;46;-1757.787,499.6698;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;42;-1637.397,575.9688;Inherit;False;Property;_NoiseMode;扰动模式;7;1;[Enum];Create;False;0;2;Manual;0;Auto;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TFHCRemapNode;15;-1108.842,307.9935;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0.1;False;3;FLOAT;0;False;4;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;7;-1906.621,412.3318;Inherit;False;Property;_NoiseScale;扰动强度;4;0;Create;False;0;0;0;False;0;False;0.1;0.023;0;0.1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;41;-1486.07,418.544;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;48;-1339.9,418.8646;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;14;-1244.571,122.495;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;11;-1356.975,-8.81764;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.TFHCRemapNode;31;-1434.373,123;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;-0.5;False;4;FLOAT;0.5;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;52;-1068.429,97.80939;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;13;-697.1879,16.22712;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.LerpOp;54;-881.5465,40.98477;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;53;-888.5465,-144.0152;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;12;-1020.467,-143.5107;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.BreakToComponentsNode;20;-783.982,307.2344;Inherit;False;FLOAT4;1;0;FLOAT4;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15 +Node;AmplifyShaderEditor.Vector4Node;17;-1110.394,476.3322;Inherit;False;Property;_RB_Offset;偏移量 (RU_RV_BU_BV);5;0;Create;False;0;0;0;False;0;False;0.05,0,0,0;0.05,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;55;-1128.688,-7.643436;Inherit;False;Property;_NoisePivot;扰动方向 (匹配偏移量设置);3;1;[Enum];Create;False;0;2;U;0;V;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;32;-77.57082,-199.4283;Inherit;True;Property;_TextureSample2;Texture Sample 2;5;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;3;-78.42696,182.4539;Inherit;True;Property;_TextureSample0;Texture Sample 0;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;4;-79.42696,-9.54605;Inherit;True;Property;_TextureSample1;Texture Sample 1;2;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.VertexColorNode;57;240.2148,-151.8367;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;58;496.3331,-6.130898;Inherit;True;3;3;0;COLOR;0,0,0,0;False;1;FLOAT3;0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.ColorNode;59;208.7787,165.3141;Inherit;False;Property;_MainColor;整体颜色;0;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1.414214,1.414214,1.414214,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TexturePropertyNode;5;-373.0752,-199.7612;Inherit;True;Property;_MainTexU1;主纹理;1;0;Create;False;0;0;0;False;0;False;None;8c052a69009f25a45aff9f10624768f0;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;60;715.7939,-5.987699;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;61;715.7939,-5.987699;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;A201-Shader/URP/自动故障扰动;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392578461925317; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392578429282494; Use Shadow Threshold;0;0;Receive Shadows;0;638392578443976400;GPU Instancing;0;638392578441669739;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;True;True;True;True;False;;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;62;715.7939,-5.987699;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;63;715.7939,-5.987699;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;64;715.7939,-5.987699;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;65;715.7939,-5.987699;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;66;715.7939,-5.987699;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;67;715.7939,-5.987699;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;68;715.7939,-5.987699;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;69;715.7939,-5.987699;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;70;551.2436,217.1843;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;30;272.3496,19.77707;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.RangedFloatNode;40;-2070.55,495.9915;Inherit;False;Property;_TimeScale;自动偏移速度;8;0;Create;False;0;0;0;False;0;False;2;0;0;0;0;1;FLOAT;0 +WireConnection;9;0;2;0 +WireConnection;9;2;10;0 +WireConnection;27;0;20;2 +WireConnection;27;1;20;3 +WireConnection;26;0;20;0 +WireConnection;26;1;20;1 +WireConnection;28;0;13;0 +WireConnection;28;1;26;0 +WireConnection;29;0;13;0 +WireConnection;29;1;27;0 +WireConnection;16;0;15;0 +WireConnection;16;1;17;0 +WireConnection;8;1;9;0 +WireConnection;45;0;7;0 +WireConnection;45;1;46;0 +WireConnection;39;0;40;0 +WireConnection;46;0;39;0 +WireConnection;15;0;48;0 +WireConnection;41;0;7;0 +WireConnection;41;1;45;0 +WireConnection;41;2;42;0 +WireConnection;48;0;41;0 +WireConnection;14;0;31;0 +WireConnection;14;1;48;0 +WireConnection;31;0;8;1 +WireConnection;52;0;11;2 +WireConnection;52;1;14;0 +WireConnection;13;0;53;0 +WireConnection;13;1;54;0 +WireConnection;54;0;11;2 +WireConnection;54;1;52;0 +WireConnection;54;2;55;0 +WireConnection;53;0;12;0 +WireConnection;53;1;11;1 +WireConnection;53;2;55;0 +WireConnection;12;0;11;1 +WireConnection;12;1;14;0 +WireConnection;20;0;16;0 +WireConnection;32;0;5;0 +WireConnection;32;1;28;0 +WireConnection;3;0;5;0 +WireConnection;3;1;29;0 +WireConnection;4;0;5;0 +WireConnection;4;1;13;0 +WireConnection;58;0;57;0 +WireConnection;58;1;30;0 +WireConnection;58;2;59;0 +WireConnection;61;2;58;0 +WireConnection;61;3;70;0 +WireConnection;70;0;57;4 +WireConnection;70;1;4;4 +WireConnection;70;2;59;4 +WireConnection;30;0;32;1 +WireConnection;30;1;4;2 +WireConnection;30;2;3;3 +ASEEND*/ +//CHKSM=407168FB2E2B58C75DE65956CF0834161BC5DC7A \ No newline at end of file diff --git a/URP/Soung_BaseAdd.shader b/URP/Soung_BaseAdd.shader new file mode 100644 index 0000000..5c784ca --- /dev/null +++ b/URP/Soung_BaseAdd.shader @@ -0,0 +1,140 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/个人制作/基础Addtive" +{ + Properties + { + _MainTex("贴图", 2D) = "white" {} + [HDR]_MainColor("颜色", Color) = (1,1,1,1) + + } + + SubShader + { + + + Tags { "RenderType"="Transparent" "Queue"="Transparent" } + LOD 100 + + CGINCLUDE + #pragma target 3.0 + ENDCG + Blend One One + AlphaToMask Off + Cull Back + ColorMask RGBA + ZWrite Off + ZTest LEqual + Offset 0 , 0 + + + + Pass + { + Name "Unlit" + + CGPROGRAM + + + + #ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX + //only defining to not throw compilation error over Unity 5.5 + #define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input) + #endif + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #include "UnityCG.cginc" + + + struct appdata + { + float4 vertex : POSITION; + float4 color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 vertex : SV_POSITION; + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + float3 worldPos : TEXCOORD0; + #endif + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + uniform sampler2D _MainTex; + uniform float4 _MainTex_ST; + uniform float4 _MainColor; + + + v2f vert ( appdata v ) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + + o.ase_texcoord1.xy = v.ase_texcoord.xy; + o.ase_color = v.color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord1.zw = 0; + float3 vertexValue = float3(0, 0, 0); + #if ASE_ABSOLUTE_VERTEX_POS + vertexValue = v.vertex.xyz; + #endif + vertexValue = vertexValue; + #if ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + o.vertex = UnityObjectToClipPos(v.vertex); + + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; + #endif + return o; + } + + fixed4 frag (v2f i ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + fixed4 finalColor; + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + float3 WorldPosition = i.worldPos; + #endif + float2 uv_MainTex = i.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw; + + + finalColor = ( tex2D( _MainTex, uv_MainTex ) * _MainColor * i.ase_color ); + return finalColor; + } + ENDCG + } + } + CustomEditor "ASEMaterialInspector" + + Fallback "Particles/Standard Unlit" +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.SamplerNode;1;-325.9988,-9.948395;Inherit;True;Property;_MainTex;贴图;0;0;Create;False;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TextureCoordinatesNode;2;-528.9988,14.05161;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.VertexColorNode;4;-197.9988,348.0516;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;5;-4.998779,160.0516;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.ColorNode;3;-238.9988,179.0516;Inherit;False;Property;_MainColor;颜色;1;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;120,160;Float;False;True;-1;2;ASEMaterialInspector;100;5;A201-Shader/个人制作/基础Addtive;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;True;4;1;False;;1;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;True;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;2;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;2;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;0;Particles/Standard Unlit;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;0;1;True;False;;False;0 +WireConnection;1;1;2;0 +WireConnection;5;0;1;0 +WireConnection;5;1;3;0 +WireConnection;5;2;4;0 +WireConnection;0;0;5;0 +ASEEND*/ +//CHKSM=BCA08ECCC03CBD5B835A8EC4F019B542D4D5C816 \ No newline at end of file diff --git a/URP/Soung_BaseAlphaBlend.shader b/URP/Soung_BaseAlphaBlend.shader new file mode 100644 index 0000000..e95eb2b --- /dev/null +++ b/URP/Soung_BaseAlphaBlend.shader @@ -0,0 +1,154 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/个人制作/基础AlphaBlend" +{ + Properties + { + _MainTex("贴图", 2D) = "white" {} + [HDR]_MainColor("颜色", Color) = (1,1,1,1) + + } + + SubShader + { + + + Tags { "RenderType"="Transparent" "Queue"="Transparent" } + LOD 100 + + CGINCLUDE + #pragma target 3.0 + ENDCG + Blend SrcAlpha OneMinusSrcAlpha + AlphaToMask Off + Cull Back + ColorMask RGBA + ZWrite Off + ZTest LEqual + Offset 0 , 0 + + + + Pass + { + Name "Unlit" + + CGPROGRAM + + + + #ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX + //only defining to not throw compilation error over Unity 5.5 + #define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input) + #endif + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #include "UnityCG.cginc" + #define ASE_NEEDS_FRAG_COLOR + + + struct appdata + { + float4 vertex : POSITION; + float4 color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 vertex : SV_POSITION; + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + float3 worldPos : TEXCOORD0; + #endif + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + uniform sampler2D _MainTex; + uniform float4 _MainTex_ST; + uniform float4 _MainColor; + + + v2f vert ( appdata v ) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + + o.ase_texcoord1.xy = v.ase_texcoord.xy; + o.ase_color = v.color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord1.zw = 0; + float3 vertexValue = float3(0, 0, 0); + #if ASE_ABSOLUTE_VERTEX_POS + vertexValue = v.vertex.xyz; + #endif + vertexValue = vertexValue; + #if ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + o.vertex = UnityObjectToClipPos(v.vertex); + + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; + #endif + return o; + } + + fixed4 frag (v2f i ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + fixed4 finalColor; + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + float3 WorldPosition = i.worldPos; + #endif + float2 uv_MainTex = i.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw; + float4 tex2DNode1 = tex2D( _MainTex, uv_MainTex ); + float4 appendResult6 = (float4((( tex2DNode1 * _MainColor * i.ase_color )).rgb , ( tex2DNode1.a * _MainColor.a * i.ase_color.a ))); + + + finalColor = (appendResult6).xyzw; + return finalColor; + } + ENDCG + } + } + CustomEditor "ASEMaterialInspector" + + Fallback "Mobile/Particles/Alpha Blended" +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.SamplerNode;1;-450.9988,-8.948395;Inherit;True;Property;_MainTex;贴图;0;0;Create;False;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TextureCoordinatesNode;2;-653.9988,15.05161;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.VertexColorNode;4;-322.9988,349.0516;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.ColorNode;3;-363.9988,180.0516;Inherit;False;Property;_MainColor;颜色;1;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;5;-120.9988,161.0516;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.ComponentMaskNode;7;8.00061,157.5516;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.DynamicAppendNode;6;194.0006,163.5516;Inherit;True;FLOAT4;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;8;-36.99939,396.5516;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ComponentMaskNode;9;406.0006,159.5516;Inherit;False;True;True;True;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;587,165;Float;False;True;-1;2;ASEMaterialInspector;100;5;A201-Shader/个人制作/基础AlphaBlend;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;True;2;5;False;;10;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;True;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;2;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;2;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;0;Mobile/Particles/Alpha Blended;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;0;1;True;False;;False;0 +WireConnection;1;1;2;0 +WireConnection;5;0;1;0 +WireConnection;5;1;3;0 +WireConnection;5;2;4;0 +WireConnection;7;0;5;0 +WireConnection;6;0;7;0 +WireConnection;6;3;8;0 +WireConnection;8;0;1;4 +WireConnection;8;1;3;4 +WireConnection;8;2;4;4 +WireConnection;9;0;6;0 +WireConnection;0;0;9;0 +ASEEND*/ +//CHKSM=11CE487FD1F7A30FBEBE5B00FA1E82F9F7EE2980 \ No newline at end of file diff --git a/URP/Soung_Flipbook.shader b/URP/Soung_Flipbook.shader new file mode 100644 index 0000000..bbfc062 --- /dev/null +++ b/URP/Soung_Flipbook.shader @@ -0,0 +1,833 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/序列帧材质" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [ASEBegin]_MainTex("序列帧图集", 2D) = "white" {} + _Filpval("横纵数量-速度-起始帧", Vector) = (4,4,3,0) + [Enum(UnityEngine.Rendering.CullMode)]_CullingMode("剔除模式", Float) = 0 + [HDR]_MainColor1("主颜色", Color) = (1,1,1,1) + [Enum(AlphaBlend,10,Additive,1)]_BlendMode("混合模式", Float) = 1 + _Fixval("修复阈值 (建议默认)", Range( 1 , 200)) = 200 + [ASEEnd][Enum(R,0,A,1)]_SwithcTexP("贴图通道切换", Float) = 0 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull [_CullingMode] + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 4.0 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha [_BlendMode], One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_FRAG_COLOR + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainColor1; + float4 _MainTex_ST; + float4 _Filpval; + float _BlendMode; + float _CullingMode; + float _Fixval; + float _SwithcTexP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTex; + + + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_texcoord3.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 texCoord41 = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); + float2 texCoord42 = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); + float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw; + float mulTime10 = _TimeParameters.x * 5.0; + // *** BEGIN Flipbook UV Animation vars *** + // Total tiles of Flipbook Texture + float fbtotaltiles3 = _Filpval.x * _Filpval.y; + // Offsets for cols and rows of Flipbook Texture + float fbcolsoffset3 = 1.0f / _Filpval.x; + float fbrowsoffset3 = 1.0f / _Filpval.y; + // Speed of animation + float fbspeed3 = mulTime10 * _Filpval.z; + // UV Tiling (col and row offset) + float2 fbtiling3 = float2(fbcolsoffset3, fbrowsoffset3); + // UV Offset - calculate current tile linear index, and convert it to (X * coloffset, Y * rowoffset) + // Calculate current tile linear index + float fbcurrenttileindex3 = round( fmod( fbspeed3 + _Filpval.w, fbtotaltiles3) ); + fbcurrenttileindex3 += ( fbcurrenttileindex3 < 0) ? fbtotaltiles3 : 0; + // Obtain Offset X coordinate from current tile linear index + float fblinearindextox3 = round ( fmod ( fbcurrenttileindex3, _Filpval.x ) ); + // Multiply Offset X by coloffset + float fboffsetx3 = fblinearindextox3 * fbcolsoffset3; + // Obtain Offset Y coordinate from current tile linear index + float fblinearindextoy3 = round( fmod( ( fbcurrenttileindex3 - fblinearindextox3 ) / _Filpval.x, _Filpval.y ) ); + // Reverse Y to get tiles from Top to Bottom + fblinearindextoy3 = (int)(_Filpval.y-1) - fblinearindextoy3; + // Multiply Offset Y by rowoffset + float fboffsety3 = fblinearindextoy3 * fbrowsoffset3; + // UV Offset + float2 fboffset3 = float2(fboffsetx3, fboffsety3); + // Flipbook UV + half2 fbuv3 = frac( uv_MainTex ) * fbtiling3 + fboffset3; + // *** END Flipbook UV Animation vars *** + float4 tex2DNode16 = tex2D( _MainTex, fbuv3 ); + + float lerpResult62 = lerp( tex2DNode16.r , tex2DNode16.a , _SwithcTexP); + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = (( saturate( ( ( 1.0 - saturate( texCoord41.x ) ) * ( 1.0 - saturate( texCoord41.y ) ) * saturate( texCoord42.x ) * saturate( texCoord42.y ) * _Fixval ) ) * _MainColor1 * tex2DNode16 * IN.ase_color )).rgb; + float Alpha = ( _MainColor1.a * lerpResult62 * IN.ase_color.a ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_texcoord2 : TEXCOORD2; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainColor1; + float4 _MainTex_ST; + float4 _Filpval; + float _BlendMode; + float _CullingMode; + float _Fixval; + float _SwithcTexP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTex; + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_texcoord2.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord2.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 uv_MainTex = IN.ase_texcoord2.xy * _MainTex_ST.xy + _MainTex_ST.zw; + float mulTime10 = _TimeParameters.x * 5.0; + // *** BEGIN Flipbook UV Animation vars *** + // Total tiles of Flipbook Texture + float fbtotaltiles3 = _Filpval.x * _Filpval.y; + // Offsets for cols and rows of Flipbook Texture + float fbcolsoffset3 = 1.0f / _Filpval.x; + float fbrowsoffset3 = 1.0f / _Filpval.y; + // Speed of animation + float fbspeed3 = mulTime10 * _Filpval.z; + // UV Tiling (col and row offset) + float2 fbtiling3 = float2(fbcolsoffset3, fbrowsoffset3); + // UV Offset - calculate current tile linear index, and convert it to (X * coloffset, Y * rowoffset) + // Calculate current tile linear index + float fbcurrenttileindex3 = round( fmod( fbspeed3 + _Filpval.w, fbtotaltiles3) ); + fbcurrenttileindex3 += ( fbcurrenttileindex3 < 0) ? fbtotaltiles3 : 0; + // Obtain Offset X coordinate from current tile linear index + float fblinearindextox3 = round ( fmod ( fbcurrenttileindex3, _Filpval.x ) ); + // Multiply Offset X by coloffset + float fboffsetx3 = fblinearindextox3 * fbcolsoffset3; + // Obtain Offset Y coordinate from current tile linear index + float fblinearindextoy3 = round( fmod( ( fbcurrenttileindex3 - fblinearindextox3 ) / _Filpval.x, _Filpval.y ) ); + // Reverse Y to get tiles from Top to Bottom + fblinearindextoy3 = (int)(_Filpval.y-1) - fblinearindextoy3; + // Multiply Offset Y by rowoffset + float fboffsety3 = fblinearindextoy3 * fbrowsoffset3; + // UV Offset + float2 fboffset3 = float2(fboffsetx3, fboffsety3); + // Flipbook UV + half2 fbuv3 = frac( uv_MainTex ) * fbtiling3 + fboffset3; + // *** END Flipbook UV Animation vars *** + float4 tex2DNode16 = tex2D( _MainTex, fbuv3 ); + float lerpResult62 = lerp( tex2DNode16.r , tex2DNode16.a , _SwithcTexP); + + + float Alpha = ( _MainColor1.a * lerpResult62 * IN.ase_color.a ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.CommentaryNode;2;-1217.076,-94.9817;Inherit;False;895.8669;424.9827;利用FlipBook节点实现UV动画;9;63;16;5;10;3;4;39;61;60;序列帧动画;1,1,1,1;0;0 +Node;AmplifyShaderEditor.Vector4Node;39;-1187.619,76.00105;Inherit;False;Property;_Filpval;横纵数量-速度-起始帧;1;0;Create;False;0;0;0;False;0;False;4,4,3,0;5,4,3,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.FractNode;4;-985.9224,-39.40588;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TFHCFlipBookUVAnimation;3;-842.5806,80.01262;Inherit;False;0;0;6;0;FLOAT2;0,0;False;1;FLOAT;4;False;2;FLOAT;4;False;3;FLOAT;1;False;4;FLOAT;0;False;5;FLOAT;0;False;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.SimpleTimeNode;10;-1049.014,250.3728;Inherit;False;1;0;FLOAT;5;False;1;FLOAT;0 +Node;AmplifyShaderEditor.CommentaryNode;40;-1217.292,-432.5141;Inherit;False;949.1721;309.5532;利用程序遮罩修复FlipBook出现的切边;11;51;50;49;48;47;46;45;44;43;42;41;修复遮罩;1,1,1,1;0;0 +Node;AmplifyShaderEditor.SaturateNode;43;-975.8608,-322.2154;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;44;-976.5638,-390.7091;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;45;-975.5638,-255.7093;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;46;-974.9709,-189.4721;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;47;-850.5618,-392.7091;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;48;-849.8588,-323.2154;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;50;-590.5342,-342.5231;Inherit;True;5;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;51;-395.8194,-342.6197;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;5;-1190.68,-45.85715;Inherit;False;0;16;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.SamplerNode;16;-606.9231,50.93799;Inherit;True;Property;_MainTex;序列帧图集;0;0;Create;False;0;0;0;False;0;False;-1;None;86df0f41c2203ba44b5e357e35c542fa;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;49;-851.2488,-251.5474;Inherit;False;Property;_Fixval;修复阈值 (建议默认);5;0;Create;False;0;0;0;False;0;False;200;200;1;200;0;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;62;-300.3052,127.9194;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;63;-475.705,240.7194;Inherit;False;Property;_SwithcTexP;贴图通道切换;6;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;60;-463.9806,-40.42035;Inherit;False;Property;_CullingMode;剔除模式;2;1;[Enum];Create;False;0;1;Option1;0;1;UnityEngine.Rendering.CullMode;True;0;False;0;2;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;20;-49.97579,8.474356;Inherit;True;4;4;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.ColorNode;23;-305.2325,-75.43822;Inherit;False;Property;_MainColor1;主颜色;3;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.VertexColorNode;17;-303.2951,248.1317;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.ComponentMaskNode;65;153.3945,3.61936;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;31;-48.2225,223.0971;Inherit;True;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;42;-1188.973,-258.4727;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.TextureCoordinatesNode;41;-1187.863,-377.2141;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.TemplateMultiPassMasterNode;68;650.9546,8.27742;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;70;650.9546,8.27742;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;71;650.9546,8.27742;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;72;650.9546,8.27742;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;73;650.9546,8.27742;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;74;650.9546,8.27742;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;75;650.9546,8.27742;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;76;650.9546,8.27742;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;77;650.9546,8.27742;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.RangedFloatNode;61;-604.4438,-41.63666;Inherit;False;Property;_BlendMode;混合模式;4;1;[Enum];Create;False;0;2;AlphaBlend;10;Additive;1;0;True;0;False;1;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;69;350.5446,9.850248;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;A201-Shader/URP/序列帧材质;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;True;True;0;True;_CullingMode;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;4;True;12;all;0;True;True;2;5;False;;10;True;_BlendMode;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392664051868373; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392664041128063; Use Shadow Threshold;0;0;Receive Shadows;0;638392664037853199;GPU Instancing;0;638392664035548723;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;False;False;False;False;False;;False;0 +WireConnection;4;0;5;0 +WireConnection;3;0;4;0 +WireConnection;3;1;39;1 +WireConnection;3;2;39;2 +WireConnection;3;3;39;3 +WireConnection;3;4;39;4 +WireConnection;3;5;10;0 +WireConnection;43;0;41;2 +WireConnection;44;0;41;1 +WireConnection;45;0;42;1 +WireConnection;46;0;42;2 +WireConnection;47;0;44;0 +WireConnection;48;0;43;0 +WireConnection;50;0;47;0 +WireConnection;50;1;48;0 +WireConnection;50;2;45;0 +WireConnection;50;3;46;0 +WireConnection;50;4;49;0 +WireConnection;51;0;50;0 +WireConnection;16;1;3;0 +WireConnection;62;0;16;1 +WireConnection;62;1;16;4 +WireConnection;62;2;63;0 +WireConnection;20;0;51;0 +WireConnection;20;1;23;0 +WireConnection;20;2;16;0 +WireConnection;20;3;17;0 +WireConnection;65;0;20;0 +WireConnection;31;0;23;4 +WireConnection;31;1;62;0 +WireConnection;31;2;17;4 +WireConnection;69;2;65;0 +WireConnection;69;3;31;0 +ASEEND*/ +//CHKSM=43EC3D32104E2D0CA1965BBA10E4325E373B56D7 \ No newline at end of file diff --git a/URP/Soung_FlowMap.shader b/URP/Soung_FlowMap.shader new file mode 100644 index 0000000..2c327aa --- /dev/null +++ b/URP/Soung_FlowMap.shader @@ -0,0 +1,283 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/个人制作/FlowMap软溶解" +{ + Properties + { + [Header(MainTex)]_MainTextu("主纹理", 2D) = "white" {} + [HDR]_MainTColor("主纹理颜色", Color) = (1,1,1,1) + [Enum(R,0,A,1)]_Float3("使用A通道", Float) = 0 + [Header(FlowMap (UseRnG))]_FlowMap("FlowMap贴图", 2D) = "white" {} + [Header(SoftDissolve)]_DissloveTex("溶解贴图", 2D) = "white" {} + _Dissolve("溶解进度", Range( 0 , 1)) = 0.08407054 + _SoftDis("溶解平滑度", Range( 0.5 , 1)) = 0.8216482 + [Enum(Material,0,Custom1x,1)]_UseDisOrCustom("溶解控制模式", Float) = 0 + [KeywordEnum(SquareMask,GlowMask,None)] _UseCirOrSqa("遮罩模式", Float) = 2 + _Fixval("方形遮罩强度", Range( 1 , 200)) = 13.02583 + _MaskSub("圆形遮罩范围", Range( 0 , 1)) = 0.4800681 + _Float0("圆形遮罩强度", Range( 0 , 10)) = 1.8 + [HideInInspector] _texcoord( "", 2D ) = "white" {} + + } + + SubShader + { + + + Tags { "RenderType"="Transparent" "Queue"="Transparent" } + LOD 100 + + CGINCLUDE + #pragma target 3.0 + ENDCG + Blend SrcAlpha OneMinusSrcAlpha + AlphaToMask Off + Cull Back + ColorMask RGBA + ZWrite Off + ZTest LEqual + Offset 0 , 0 + + + + Pass + { + Name "Unlit" + + CGPROGRAM + + + + #ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX + //only defining to not throw compilation error over Unity 5.5 + #define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input) + #endif + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #include "UnityCG.cginc" + #define ASE_NEEDS_FRAG_COLOR + #pragma shader_feature_local _USECIRORSQA_SQUAREMASK _USECIRORSQA_GLOWMASK _USECIRORSQA_NONE + + + struct appdata + { + float4 vertex : POSITION; + float4 color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 vertex : SV_POSITION; + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + float3 worldPos : TEXCOORD0; + #endif + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + uniform sampler2D _MainTextu; + uniform float4 _MainTextu_ST; + uniform sampler2D _FlowMap; + uniform float4 _FlowMap_ST; + uniform float _Dissolve; + uniform float _UseDisOrCustom; + uniform float4 _MainTColor; + uniform float _Float3; + uniform float _SoftDis; + uniform sampler2D _DissloveTex; + uniform float _Fixval; + uniform float _MaskSub; + uniform float _Float0; + + + v2f vert ( appdata v ) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + + o.ase_texcoord1.xyz = v.ase_texcoord.xyz; + o.ase_color = v.color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord1.w = 0; + float3 vertexValue = float3(0, 0, 0); + #if ASE_ABSOLUTE_VERTEX_POS + vertexValue = v.vertex.xyz; + #endif + vertexValue = vertexValue; + #if ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + o.vertex = UnityObjectToClipPos(v.vertex); + + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; + #endif + return o; + } + + fixed4 frag (v2f i ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + fixed4 finalColor; + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + float3 WorldPosition = i.worldPos; + #endif + float2 uv_MainTextu = i.ase_texcoord1.xyz.xy * _MainTextu_ST.xy + _MainTextu_ST.zw; + float2 uv_FlowMap = i.ase_texcoord1.xyz.xy * _FlowMap_ST.xy + _FlowMap_ST.zw; + float4 tex2DNode10 = tex2D( _FlowMap, uv_FlowMap ); + float2 appendResult12 = (float2(tex2DNode10.r , tex2DNode10.g)); + float3 texCoord27 = i.ase_texcoord1.xyz; + texCoord27.xy = i.ase_texcoord1.xyz.xy * float2( 1,1 ) + float2( 0,0 ); + float lerpResult25 = lerp( _Dissolve , texCoord27.z , _UseDisOrCustom); + float2 lerpResult9 = lerp( uv_MainTextu , appendResult12 , lerpResult25); + float4 tex2DNode1 = tex2D( _MainTextu, lerpResult9 ); + float lerpResult67 = lerp( tex2DNode1.r , tex2DNode1.a , _Float3); + float smoothstepResult20 = smoothstep( ( 1.0 - _SoftDis ) , _SoftDis , ( tex2D( _DissloveTex, lerpResult9 ).r + 1.0 + ( lerpResult25 * -2.0 ) )); + float2 texCoord46 = i.ase_texcoord1.xyz.xy * float2( 1,1 ) + float2( 0,0 ); + float2 texCoord47 = i.ase_texcoord1.xyz.xy * float2( 1,1 ) + float2( 0,0 ); + float2 texCoord29 = i.ase_texcoord1.xyz.xy * float2( 1,1 ) + float2( 0,0 ); + #if defined(_USECIRORSQA_SQUAREMASK) + float staticSwitch69 = saturate( ( ( 1.0 - saturate( texCoord46.x ) ) * ( 1.0 - saturate( texCoord46.y ) ) * saturate( texCoord47.x ) * saturate( texCoord47.y ) * _Fixval ) ); + #elif defined(_USECIRORSQA_GLOWMASK) + float staticSwitch69 = saturate( ( ( ( 1.0 - distance( texCoord29 , float2( 0.5,0.5 ) ) ) - _MaskSub ) * _Float0 ) ); + #elif defined(_USECIRORSQA_NONE) + float staticSwitch69 = 1.0; + #else + float staticSwitch69 = 1.0; + #endif + float4 appendResult5 = (float4((( tex2DNode1 * i.ase_color * _MainTColor )).rgba.rgb , ( lerpResult67 * i.ase_color.a * smoothstepResult20 * staticSwitch69 * _MainTColor.a ))); + + + finalColor = appendResult5; + return finalColor; + } + ENDCG + } + } + CustomEditor "ASEMaterialInspector" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.CommentaryNode;66;-1411.77,-222.5827;Inherit;False;573.2;367.8;只使用R/G通道运算;4;8;10;12;9;FlowMap扭动UV;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;57;-1296.104,984.3634;Inherit;False;1043.573;364.0606;圆形遮罩;9;29;30;31;34;40;37;32;71;72;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;45;-1295.367,642.7999;Inherit;False;953.0721;317.353;方框遮罩;11;51;50;56;55;54;53;52;49;48;47;46;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;16;-514.3868,288.9019;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;9;-988.5009,-48.99993;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.DynamicAppendNode;12;-1113.499,-25;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.TextureCoordinatesNode;8;-1319.499,-179.9998;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;28;-1471.126,424.6002;Inherit;False;Property;_UseDisOrCustom;溶解控制模式;7;1;[Enum];Create;False;0;2;Material;0;Custom1x;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;27;-1523.844,285.6051;Inherit;False;0;-1;3;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.LerpOp;25;-1291.228,334.0141;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;18;-715.4103,537.8694;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;17;-849.878,556.6014;Inherit;False;Constant;_Float2;Float 2;4;0;Create;True;0;0;0;False;0;False;-2;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.VertexColorNode;3;-247.6829,-45.31483;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;2;-66.68326,-69.31483;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.ComponentMaskNode;4;67.31671,-74.31483;Inherit;False;True;True;True;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.SmoothstepOpNode;20;-120.508,289.9027;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;5;344.1734,-68.77293;Inherit;True;FLOAT4;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;6;136.5168,27.58517;Inherit;True;5;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;563.5978,-68.31482;Float;False;True;-1;2;ASEMaterialInspector;100;5;A201-Shader/个人制作/FlowMap软溶解;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;True;2;5;False;;10;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;True;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;2;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;2;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;0;;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;0;1;True;False;;False;0 +Node;AmplifyShaderEditor.ColorNode;65;-287.261,118.9775;Inherit;False;Property;_MainTColor;主纹理颜色;1;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.OneMinusNode;22;-265.7416,312.6208;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;67;-515.3772,-1.12146;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;68;-661.3772,109.8785;Inherit;False;Property;_Float3;使用A通道;2;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;46;-1259.438,699.4;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.TextureCoordinatesNode;47;-1260.548,818.1416;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.SaturateNode;48;-1047.435,754.3983;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;49;-1048.138,685.905;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;52;-922.1359,683.905;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;53;-921.433,753.3984;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;56;-467.3948,733.9941;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;51;-1046.545,888.1421;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;54;-921.8232,824.0669;Inherit;False;Property;_Fixval;方形遮罩强度;9;0;Create;False;0;0;0;False;0;False;13.02583;50;1;200;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;50;-1047.138,817.905;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.DistanceOpNode;30;-1042.292,1043.851;Inherit;True;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;29;-1257.949,1043.463;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.Vector2Node;31;-1213.695,1163.215;Inherit;False;Constant;_Vector0;Vector 0;6;0;Create;True;0;0;0;False;0;False;0.5,0.5;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.SimpleSubtractOpNode;71;-706.3715,1044.008;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;32;-846.4902,1044.217;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;34;-1054.492,1258.215;Inherit;False;Property;_MaskSub;圆形遮罩范围;10;0;Create;False;0;0;0;False;0;False;0.4800681;0.4800681;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;72;-839.3715,1138.008;Inherit;False;Property;_Float0;圆形遮罩强度;11;0;Create;False;0;0;0;False;0;False;1.8;1.8;0;10;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;37;-569.4913,1044.217;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;40;-444.0715,1044.99;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;21;-537.9698,455.6991;Inherit;False;Property;_SoftDis;溶解平滑度;6;0;Create;False;0;0;0;False;0;False;0.8216482;0.667;0.5;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;15;-720.7305,452.7795;Inherit;False;Constant;_Float1;Float 1;4;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;10;-1395.499,-53.99991;Inherit;True;Property;_FlowMap;FlowMap贴图;3;1;[Header];Create;False;1;FlowMap (UseRnG);0;0;False;0;False;-1;None;d1446785ec2d6d248b8498ac06e40d06;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;1;-807.6022,-77.31483;Inherit;True;Property;_MainTextu;主纹理;0;1;[Header];Create;False;1;MainTex;0;0;False;0;False;-1;None;87dc39f413249c84b8ab834b36eb7e3e;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;55;-662.11,734.0908;Inherit;True;5;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;14;-828.6608,261.3694;Inherit;True;Property;_DissloveTex;溶解贴图;4;1;[Header];Create;False;1;SoftDissolve;0;0;False;0;False;-1;None;ace1b3ce760c86143b3bcbf4d61986f1;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.StaticSwitch;69;-141.2776,732.6913;Inherit;False;Property;_UseCirOrSqa;遮罩模式;8;0;Create;False;0;0;0;False;0;False;0;2;0;True;;KeywordEnum;3;SquareMask;GlowMask;None;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;70;-303.3882,781.2935;Inherit;False;Constant;_DefaultMask;DefaultMask;11;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;13;-1580.891,212.0363;Inherit;False;Property;_Dissolve;溶解进度;5;0;Create;False;0;0;0;False;0;False;0.08407054;0;0;1;0;1;FLOAT;0 +WireConnection;16;0;14;1 +WireConnection;16;1;15;0 +WireConnection;16;2;18;0 +WireConnection;9;0;8;0 +WireConnection;9;1;12;0 +WireConnection;9;2;25;0 +WireConnection;12;0;10;1 +WireConnection;12;1;10;2 +WireConnection;25;0;13;0 +WireConnection;25;1;27;3 +WireConnection;25;2;28;0 +WireConnection;18;0;25;0 +WireConnection;18;1;17;0 +WireConnection;2;0;1;0 +WireConnection;2;1;3;0 +WireConnection;2;2;65;0 +WireConnection;4;0;2;0 +WireConnection;20;0;16;0 +WireConnection;20;1;22;0 +WireConnection;20;2;21;0 +WireConnection;5;0;4;0 +WireConnection;5;3;6;0 +WireConnection;6;0;67;0 +WireConnection;6;1;3;4 +WireConnection;6;2;20;0 +WireConnection;6;3;69;0 +WireConnection;6;4;65;4 +WireConnection;0;0;5;0 +WireConnection;22;0;21;0 +WireConnection;67;0;1;1 +WireConnection;67;1;1;4 +WireConnection;67;2;68;0 +WireConnection;48;0;46;2 +WireConnection;49;0;46;1 +WireConnection;52;0;49;0 +WireConnection;53;0;48;0 +WireConnection;56;0;55;0 +WireConnection;51;0;47;2 +WireConnection;50;0;47;1 +WireConnection;30;0;29;0 +WireConnection;30;1;31;0 +WireConnection;71;0;32;0 +WireConnection;71;1;34;0 +WireConnection;32;0;30;0 +WireConnection;37;0;71;0 +WireConnection;37;1;72;0 +WireConnection;40;0;37;0 +WireConnection;1;1;9;0 +WireConnection;55;0;52;0 +WireConnection;55;1;53;0 +WireConnection;55;2;50;0 +WireConnection;55;3;51;0 +WireConnection;55;4;54;0 +WireConnection;14;1;9;0 +WireConnection;69;1;56;0 +WireConnection;69;0;40;0 +WireConnection;69;2;70;0 +ASEEND*/ +//CHKSM=4F420C9F20CDE4905AC5A674D261DCFD08F154C2 \ No newline at end of file diff --git a/URP/Soung_FrenrShield.shader b/URP/Soung_FrenrShield.shader new file mode 100644 index 0000000..4d087b0 --- /dev/null +++ b/URP/Soung_FrenrShield.shader @@ -0,0 +1,791 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/简易菲尼尔护盾" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [ASEBegin]_TextureSample0("流动纹理", 2D) = "white" {} + [Enum(UnityEngine.Rendering.CullMode)]_CullingMode("剔除模式", Float) = 0 + [KeywordEnum(R,A)] _Keyword0("切换贴图通道", Float) = 0 + [Enum(AlphaBlend,10,Additive,1)]_BlendMode("混合模式", Float) = 1 + [HDR]_Color0("主颜色", Color) = (1,1,1,1) + _Vector0("UV速率", Vector) = (0.5,0.5,0,0) + _Float0("整体强度", Float) = 0 + _Float1("边缘强度", Float) = 1 + [ASEEnd]_Float2("边缘范围", Float) = 5 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull [_CullingMode] + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 3.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha [_BlendMode], One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_FRAG_WORLD_POSITION + #define ASE_NEEDS_VERT_NORMAL + #define ASE_NEEDS_FRAG_COLOR + #pragma shader_feature_local _KEYWORD0_R _KEYWORD0_A + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_texcoord4 : TEXCOORD4; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _Color0; + float4 _TextureSample0_ST; + float2 _Vector0; + float _CullingMode; + float _BlendMode; + float _Float0; + float _Float1; + float _Float2; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _TextureSample0; + + + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); + o.ase_texcoord4.xyz = ase_worldNormal; + + o.ase_color = v.ase_color; + o.ase_texcoord3.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + o.ase_texcoord4.w = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 uv_TextureSample0 = IN.ase_texcoord3.xy * _TextureSample0_ST.xy + _TextureSample0_ST.zw; + float2 panner9 = ( 1.0 * _Time.y * _Vector0 + uv_TextureSample0); + float4 tex2DNode4 = tex2D( _TextureSample0, panner9 ); + float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition ); + ase_worldViewDir = normalize(ase_worldViewDir); + float3 ase_worldNormal = IN.ase_texcoord4.xyz; + float fresnelNdotV1 = dot( ase_worldNormal, ase_worldViewDir ); + float fresnelNode1 = ( _Float0 + _Float1 * pow( 1.0 - fresnelNdotV1, _Float2 ) ); + float temp_output_2_0 = saturate( fresnelNode1 ); + + #if defined(_KEYWORD0_R) + float staticSwitch5 = tex2DNode4.r; + #elif defined(_KEYWORD0_A) + float staticSwitch5 = tex2DNode4.a; + #else + float staticSwitch5 = tex2DNode4.r; + #endif + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( IN.ase_color * _Color0 * tex2DNode4.r * temp_output_2_0 ).rgb; + float Alpha = ( IN.ase_color.a * _Color0.a * staticSwitch5 * temp_output_2_0 ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + #define ASE_NEEDS_FRAG_WORLD_POSITION + #define ASE_NEEDS_VERT_NORMAL + #pragma shader_feature_local _KEYWORD0_R _KEYWORD0_A + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord2 : TEXCOORD2; + float4 ase_texcoord3 : TEXCOORD3; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _Color0; + float4 _TextureSample0_ST; + float2 _Vector0; + float _CullingMode; + float _BlendMode; + float _Float0; + float _Float1; + float _Float2; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _TextureSample0; + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); + o.ase_texcoord3.xyz = ase_worldNormal; + + o.ase_color = v.ase_color; + o.ase_texcoord2.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord2.zw = 0; + o.ase_texcoord3.w = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 uv_TextureSample0 = IN.ase_texcoord2.xy * _TextureSample0_ST.xy + _TextureSample0_ST.zw; + float2 panner9 = ( 1.0 * _Time.y * _Vector0 + uv_TextureSample0); + float4 tex2DNode4 = tex2D( _TextureSample0, panner9 ); + #if defined(_KEYWORD0_R) + float staticSwitch5 = tex2DNode4.r; + #elif defined(_KEYWORD0_A) + float staticSwitch5 = tex2DNode4.a; + #else + float staticSwitch5 = tex2DNode4.r; + #endif + float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition ); + ase_worldViewDir = normalize(ase_worldViewDir); + float3 ase_worldNormal = IN.ase_texcoord3.xyz; + float fresnelNdotV1 = dot( ase_worldNormal, ase_worldViewDir ); + float fresnelNode1 = ( _Float0 + _Float1 * pow( 1.0 - fresnelNdotV1, _Float2 ) ); + float temp_output_2_0 = saturate( fresnelNode1 ); + + + float Alpha = ( IN.ase_color.a * _Color0.a * staticSwitch5 * temp_output_2_0 ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.VertexColorNode;6;-425.94,-448.4973;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.ColorNode;7;-463.3796,-276.7159;Inherit;False;Property;_Color0;主颜色;4;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;0,11.52207,34.29675,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;4;-788.4805,-166.8778;Inherit;True;Property;_TextureSample0;流动纹理;0;0;Create;False;0;0;0;False;0;False;-1;None;c066d9324157a0843922e17d57c75462;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.Vector2Node;10;-1177.36,-20.43777;Inherit;False;Property;_Vector0;UV速率;5;0;Create;False;0;0;0;False;0;False;0.5,0.5;0.1,0.2;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.RangedFloatNode;11;-840.4907,64.33463;Inherit;False;Property;_Float0;整体强度;6;0;Create;False;0;0;0;False;0;False;0;0.02;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;13;-837.4907,217.3346;Inherit;False;Property;_Float2;边缘范围;8;0;Create;False;0;0;0;False;0;False;5;1.96;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;12;-841.4907,140.3346;Inherit;False;Property;_Float1;边缘强度;7;0;Create;False;0;0;0;False;0;False;1;1.62;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.FresnelNode;1;-679.2618,54.78886;Inherit;True;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;5;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;16;15.2,-192.3001;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;18;15.2,-192.3001;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;19;15.2,-192.3001;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;20;15.2,-192.3001;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;21;15.2,-192.3001;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;22;15.2,-192.3001;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;23;15.2,-192.3001;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;24;15.2,-192.3001;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;25;15.2,-192.3001;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.RangedFloatNode;26;-780.5697,-254.9343;Inherit;False;Property;_CullingMode;剔除模式;1;1;[Enum];Create;False;0;1;Option1;0;1;UnityEngine.Rendering.CullMode;True;0;False;0;2;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.StaticSwitch;5;-468.3632,-93.14751;Inherit;False;Property;_Keyword0;切换贴图通道;2;0;Create;False;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;2;R;A;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;3;-161.1979,-189.1862;Inherit;False;4;4;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;COLOR;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;27;-163.917,-35.09039;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;17;1.2,-188.3001;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;A201-Shader/URP/简易菲尼尔护盾;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;True;True;0;True;_CullingMode;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;True;True;2;5;False;;10;True;_BlendMode;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392594797609491; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392594787678157; Use Shadow Threshold;0;0;Receive Shadows;0;638392594779196387;GPU Instancing;0;638392594782282000;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;False;False;False;False;False;;False;0 +Node;AmplifyShaderEditor.PannerNode;9;-964.3602,-138.4378;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;8;-1230.36,-142.4378;Inherit;False;0;4;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;28;-841.4531,296.7675;Inherit;False;Property;_BlendMode;混合模式;3;1;[Enum];Create;False;0;2;AlphaBlend;10;Additive;1;0;True;0;False;1;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;2;-382.1979,53.81381;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +WireConnection;4;1;9;0 +WireConnection;1;1;11;0 +WireConnection;1;2;12;0 +WireConnection;1;3;13;0 +WireConnection;5;1;4;1 +WireConnection;5;0;4;4 +WireConnection;3;0;6;0 +WireConnection;3;1;7;0 +WireConnection;3;2;4;1 +WireConnection;3;3;2;0 +WireConnection;27;0;6;4 +WireConnection;27;1;7;4 +WireConnection;27;2;5;0 +WireConnection;27;3;2;0 +WireConnection;17;2;3;0 +WireConnection;17;3;27;0 +WireConnection;9;0;8;0 +WireConnection;9;2;10;0 +WireConnection;2;0;1;0 +ASEEND*/ +//CHKSM=E54A291ED46B8B4EAF4DA389B0028DF999ABD675 \ No newline at end of file diff --git a/URP/Soung_Liuguang.shader b/URP/Soung_Liuguang.shader new file mode 100644 index 0000000..c2089cd --- /dev/null +++ b/URP/Soung_Liuguang.shader @@ -0,0 +1,823 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/表面流光" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [ASEBegin][Enum(UnityEngine.Rendering.CullMode)]_CullingMode("剔除模式", Float) = 0 + [Enum(AlphaBlend,10,Additive,1)]_BlendMode("混合模式", Float) = 10 + [Header(MainTex)]_MainTexU("主纹理", 2D) = "white" {} + [HDR]_MainColor("主颜色", Color) = (1,1,1,1) + [Enum(R,0,A,1)]_SwitchP("贴图通道切换", Float) = 1 + [Header(LiuGuangTex)]_LiuGuangTex("流光纹理", 2D) = "white" {} + [HDR]_LGColor("流光颜色", Color) = (1,0.4584408,0,1) + _LGSpeed("流光速度", Vector) = (0.1,-1,0,0) + _MaskTex("流光遮罩", 2D) = "white" {} + [IntRange]_RotatorVal("遮罩旋转", Range( 0 , 360)) = 0 + [Header(NoiseTex)]_NoiseTex("扰动纹理", 2D) = "white" {} + _NoiseInt("扰动强度", Range( 0 , 1)) = 0.04952465 + _NoiseSpeed("扰动速率", Vector) = (0.5,0.5,0,0) + [ASEEnd][Toggle]_NoiseSwitch("对主纹理扰动", Float) = 0 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull [_CullingMode] + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 3.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha [_BlendMode], One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_FRAG_COLOR + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord3 : TEXCOORD3; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainColor; + float4 _MainTexU_ST; + float4 _LiuGuangTex_ST; + float4 _NoiseTex_ST; + float4 _LGColor; + float4 _MaskTex_ST; + float2 _NoiseSpeed; + float2 _LGSpeed; + float _CullingMode; + float _BlendMode; + float _NoiseInt; + float _NoiseSwitch; + float _RotatorVal; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU; + sampler2D _LiuGuangTex; + sampler2D _NoiseTex; + sampler2D _MaskTex; + + + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord3.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 uv_MainTexU = IN.ase_texcoord3.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float2 uv_LiuGuangTex = IN.ase_texcoord3.xy * _LiuGuangTex_ST.xy + _LiuGuangTex_ST.zw; + float2 uv_NoiseTex = IN.ase_texcoord3.xy * _NoiseTex_ST.xy + _NoiseTex_ST.zw; + float2 panner20 = ( 1.0 * _Time.y * _NoiseSpeed + uv_NoiseTex); + float2 temp_cast_0 = (tex2D( _NoiseTex, panner20 ).r).xx; + float2 lerpResult19 = lerp( uv_LiuGuangTex , temp_cast_0 , _NoiseInt); + float2 lerpResult51 = lerp( uv_MainTexU , lerpResult19 , _NoiseSwitch); + float4 tex2DNode7 = tex2D( _MainTexU, lerpResult51 ); + float2 panner5 = ( 1.0 * _Time.y * _LGSpeed + lerpResult19); + float2 uv_MaskTex = IN.ase_texcoord3.xy * _MaskTex_ST.xy + _MaskTex_ST.zw; + float cos37 = cos( (0.0 + (_RotatorVal - 0.0) * (6.28 - 0.0) / (360.0 - 0.0)) ); + float sin37 = sin( (0.0 + (_RotatorVal - 0.0) * (6.28 - 0.0) / (360.0 - 0.0)) ); + float2 rotator37 = mul( uv_MaskTex - float2( 0.5,0.5 ) , float2x2( cos37 , -sin37 , sin37 , cos37 )) + float2( 0.5,0.5 ); + float lerpResult11 = lerp( tex2DNode7.r , tex2DNode7.a , _SwitchP); + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( float4( (( _MainColor * IN.ase_color * tex2DNode7 )).rgb , 0.0 ) + ( tex2D( _LiuGuangTex, panner5 ).r * _LGColor * tex2D( _MaskTex, rotator37 ).r * lerpResult11 * _LGColor.a ) ).rgb; + float Alpha = ( _MainColor.a * IN.ase_color.a * lerpResult11 ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord2 : TEXCOORD2; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainColor; + float4 _MainTexU_ST; + float4 _LiuGuangTex_ST; + float4 _NoiseTex_ST; + float4 _LGColor; + float4 _MaskTex_ST; + float2 _NoiseSpeed; + float2 _LGSpeed; + float _CullingMode; + float _BlendMode; + float _NoiseInt; + float _NoiseSwitch; + float _RotatorVal; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU; + sampler2D _LiuGuangTex; + sampler2D _NoiseTex; + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord2.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord2.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 uv_MainTexU = IN.ase_texcoord2.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float2 uv_LiuGuangTex = IN.ase_texcoord2.xy * _LiuGuangTex_ST.xy + _LiuGuangTex_ST.zw; + float2 uv_NoiseTex = IN.ase_texcoord2.xy * _NoiseTex_ST.xy + _NoiseTex_ST.zw; + float2 panner20 = ( 1.0 * _Time.y * _NoiseSpeed + uv_NoiseTex); + float2 temp_cast_0 = (tex2D( _NoiseTex, panner20 ).r).xx; + float2 lerpResult19 = lerp( uv_LiuGuangTex , temp_cast_0 , _NoiseInt); + float2 lerpResult51 = lerp( uv_MainTexU , lerpResult19 , _NoiseSwitch); + float4 tex2DNode7 = tex2D( _MainTexU, lerpResult51 ); + float lerpResult11 = lerp( tex2DNode7.r , tex2DNode7.a , _SwitchP); + + + float Alpha = ( _MainColor.a * IN.ase_color.a * lerpResult11 ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.CommentaryNode;44;-1830.115,-46.77792;Inherit;False;1060.314;484.6455;扰动流光;10;4;31;19;14;30;20;21;5;26;16;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;33;-1749.376,449.851;Inherit;False;978;363;旋转实现;6;8;36;38;37;35;34;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.TFHCRemapNode;34;-1473.78,642.015;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;360;False;3;FLOAT;0;False;4;FLOAT;6.28;False;1;FLOAT;0 +Node;AmplifyShaderEditor.Vector2Node;35;-1465.561,516.2554;Inherit;False;Constant;_RotatorInt;RotatorInt;2;0;Create;True;0;0;0;False;0;False;0.5,0.5;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.RotatorNode;37;-1296.724,496.8181;Inherit;True;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;38;-1677.089,492.5895;Inherit;False;0;8;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.PannerNode;5;-939.51,-1.500219;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;21;-1815.863,185.9287;Inherit;False;0;14;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.PannerNode;20;-1603.977,191.3288;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.LerpOp;19;-1137.245,167.0293;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;4;-1357.303,38.39995;Inherit;False;0;3;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.SamplerNode;8;-1055.229,496.973;Inherit;True;Property;_MaskTex;流光遮罩;8;0;Create;False;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.ColorNode;16;-966.4769,259.8784;Inherit;False;Property;_LGColor;流光颜色;6;1;[HDR];Create;False;0;0;0;False;0;False;1,0.4584408,0,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.Vector2Node;30;-1771.372,308.665;Inherit;False;Property;_NoiseSpeed;扰动速率;12;0;Create;False;0;0;0;False;0;False;0.5,0.5;0.5,0.5;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.Vector2Node;31;-1133.375,17.66492;Inherit;False;Property;_LGSpeed;流光速度;7;0;Create;False;0;0;0;False;0;False;0.1,-1;0.1,-1;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.RangedFloatNode;36;-1740.193,639.288;Inherit;False;Property;_RotatorVal;遮罩旋转;9;1;[IntRange];Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;3;-755.2143,-30.5;Inherit;True;Property;_LiuGuangTex;流光纹理;5;1;[Header];Create;False;1;LiuGuangTex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;14;-1434.401,162.5003;Inherit;True;Property;_NoiseTex;扰动纹理;10;1;[Header];Create;False;1;NoiseTex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.LerpOp;51;-1065.517,-240.9786;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;6;-1275.301,-246;Inherit;False;0;7;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;52;-1221.517,-124.9786;Inherit;False;Property;_NoiseSwitch;对主纹理扰动;13;1;[Toggle];Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;7;-919.2997,-270.0001;Inherit;True;Property;_MainTexU;主纹理;2;1;[Header];Create;False;1;MainTex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.ColorNode;15;-835.3989,-437.8002;Inherit;False;Property;_MainColor;主颜色;3;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.VertexColorNode;40;-632.6149,-434.8684;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;45;-451.5982,-311.9156;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.RangedFloatNode;10;-637.2997,-153;Inherit;False;Property;_SwitchP;贴图通道切换;4;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;11;-479.2999,-196;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;47;-310.5215,-242.7938;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ComponentMaskNode;42;-328.2166,-316.2677;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.RangedFloatNode;1;192.5,-95.5;Inherit;False;Property;_CullingMode;剔除模式;0;1;[Enum];Create;False;0;1;Option1;0;1;UnityEngine.Rendering.CullMode;True;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;2;318.5,-94.5;Inherit;False;Property;_BlendMode;混合模式;1;1;[Enum];Create;False;0;2;AlphaBlend;10;Additive;1;0;True;0;False;10;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;26;-1421.406,351.0081;Inherit;False;Property;_NoiseInt;扰动强度;11;0;Create;False;0;0;0;False;0;False;0.04952465;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;53;544,-21;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;54;544,-21;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;A201-Shader/URP/表面流光;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;True;True;0;True;_CullingMode;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;True;True;2;5;False;;10;True;_BlendMode;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392569638838033; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392569620594377; Use Shadow Threshold;0;0;Receive Shadows;0;638392569627464312;GPU Instancing;0;638392569623850001;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;False;False;False;False;False;;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;55;544,-21;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;56;544,-21;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;57;544,-21;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;58;544,-21;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;59;544,-21;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;60;544,-21;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;61;544,-21;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;62;544,-21;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;46;190.4785,-19.79382;Inherit;True;2;2;0;FLOAT3;0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;12;-303.6992,-1.533681;Inherit;True;5;5;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;COLOR;0 +WireConnection;34;0;36;0 +WireConnection;37;0;38;0 +WireConnection;37;1;35;0 +WireConnection;37;2;34;0 +WireConnection;5;0;19;0 +WireConnection;5;2;31;0 +WireConnection;20;0;21;0 +WireConnection;20;2;30;0 +WireConnection;19;0;4;0 +WireConnection;19;1;14;1 +WireConnection;19;2;26;0 +WireConnection;8;1;37;0 +WireConnection;3;1;5;0 +WireConnection;14;1;20;0 +WireConnection;51;0;6;0 +WireConnection;51;1;19;0 +WireConnection;51;2;52;0 +WireConnection;7;1;51;0 +WireConnection;45;0;15;0 +WireConnection;45;1;40;0 +WireConnection;45;2;7;0 +WireConnection;11;0;7;1 +WireConnection;11;1;7;4 +WireConnection;11;2;10;0 +WireConnection;47;0;15;4 +WireConnection;47;1;40;4 +WireConnection;47;2;11;0 +WireConnection;42;0;45;0 +WireConnection;54;2;46;0 +WireConnection;54;3;47;0 +WireConnection;46;0;42;0 +WireConnection;46;1;12;0 +WireConnection;12;0;3;1 +WireConnection;12;1;16;0 +WireConnection;12;2;8;1 +WireConnection;12;3;11;0 +WireConnection;12;4;16;4 +ASEEND*/ +//CHKSM=2BE54375686F40023B02831FFEBFE8F9413D4424 \ No newline at end of file diff --git a/URP/Soung_NeonSpark.shader b/URP/Soung_NeonSpark.shader new file mode 100644 index 0000000..eb01f68 --- /dev/null +++ b/URP/Soung_NeonSpark.shader @@ -0,0 +1,764 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/自动霓虹灯呼吸" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [ASEBegin][Enum(UnityEngine.Rendering.CullMode)]_Culling("剔除模式", Float) = 0 + [Enum(AlphaBlend,10,Addtive,1)]_BlendMode("混合模式", Float) = 0 + [HDR][Header(AutoColorChange)]_MainColor("霓虹颜色 (不能使用纯白纯黑)", Color) = (1,0.1011105,0,1) + [Enum(Manual,0,Auto,1)]_ChangeMode("颜色变换模式", Float) = 1 + _ChangeValue("手动变换值", Range( -1 , 1)) = 0 + _ChangeSpeed("自动变换速度", Float) = 1 + [Header(AutoAlphaChange)][Enum(Manual,0,Auto,1)]_BreethMode("呼吸模式", Float) = 0 + _BreethMValue("手动呼吸值", Range( 0 , 1)) = 0.5 + _BreethTimeScale("自动呼吸间隔", Float) = 1 + [ASEEnd]_BreethColorScale("自动呼吸提亮", Range( 0 , 1)) = 0 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull [_Culling] + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 3.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha [_BlendMode], One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _SURFACE_TYPE_TRANSPARENT 1 + #define _RECEIVE_SHADOWS_OFF 1 + #define ASE_SRP_VERSION 120111 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainColor; + float _Culling; + float _BlendMode; + float _ChangeValue; + float _ChangeSpeed; + float _ChangeMode; + float _BreethMValue; + float _BreethTimeScale; + float _BreethColorScale; + float _BreethMode; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + + + float3 HSVToRGB( float3 c ) + { + float4 K = float4( 1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0 ); + float3 p = abs( frac( c.xxx + K.xyz ) * 6.0 - K.www ); + return c.z * lerp( K.xxx, saturate( p - K.xxx ), c.y ); + } + + float3 RGBToHSV(float3 c) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 p = lerp( float4( c.bg, K.wz ), float4( c.gb, K.xy ), step( c.b, c.g ) ); + float4 q = lerp( float4( p.xyw, c.r ), float4( c.r, p.yzx ), step( p.x, c.r ) ); + float d = q.x - min( q.w, q.y ); + float e = 1.0e-10; + return float3( abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); + } + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float3 hsvTorgb2 = RGBToHSV( _MainColor.rgb ); + float mulTime11 = _TimeParameters.x * _ChangeSpeed; + float lerpResult15 = lerp( _ChangeValue , mulTime11 , _ChangeMode); + float3 hsvTorgb3 = HSVToRGB( float3(( hsvTorgb2.x + lerpResult15 ),hsvTorgb2.y,hsvTorgb2.z) ); + + float lerpResult28 = lerp( _BreethMValue , ( saturate( ( ( ( _TimeParameters.y + 1.0 ) / 2.0 ) * _BreethTimeScale ) ) + _BreethColorScale ) , _BreethMode); + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = hsvTorgb3; + float Alpha = ( _MainColor.a * lerpResult28 ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _SURFACE_TYPE_TRANSPARENT 1 + #define _RECEIVE_SHADOWS_OFF 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainColor; + float _Culling; + float _BlendMode; + float _ChangeValue; + float _ChangeSpeed; + float _ChangeMode; + float _BreethMValue; + float _BreethTimeScale; + float _BreethColorScale; + float _BreethMode; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float lerpResult28 = lerp( _BreethMValue , ( saturate( ( ( ( _TimeParameters.y + 1.0 ) / 2.0 ) * _BreethTimeScale ) ) + _BreethColorScale ) , _BreethMode); + + + float Alpha = ( _MainColor.a * lerpResult28 ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.CommentaryNode;53;-1109.307,-96.302;Inherit;False;1277.555;802.0907;AlphaBlend模式下,通过Time更改Hue(色相),通过(SinTime+1)/2更改Alpha值为0-1实现呼吸;25;54;4;38;47;49;42;30;40;11;17;29;28;3;14;12;2;5;10;15;51;50;48;39;55;56;颜色变换与呼吸实现;1,1,1,1;0;0 +Node;AmplifyShaderEditor.RangedFloatNode;39;-1097.597,543.9673;Inherit;False;Constant;_Float1;Float 1;6;0;Create;True;0;0;0;False;0;False;2;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;48;-745.1773,612.725;Inherit;False;Property;_BreethTimeScale;自动呼吸间隔;8;0;Create;False;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;50;-510.4349,612.0355;Inherit;False;Property;_BreethColorScale;自动呼吸提亮;9;0;Create;False;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;51;-198.4348,593.0355;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;15;-598.3658,179.1929;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RGBToHSVNode;2;-626.3398,-42.45531;Inherit;False;1;0;FLOAT3;0,0,0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 +Node;AmplifyShaderEditor.RangedFloatNode;14;-814.3658,321.1929;Inherit;False;Property;_ChangeMode;颜色变换模式;3;1;[Enum];Create;False;0;2;Manual;0;Auto;1;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.HSVToRGBNode;3;-247.1094,-16.89767;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 +Node;AmplifyShaderEditor.LerpOp;28;-113.1665,272.9333;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleTimeNode;11;-822.1561,249.2694;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;40;-954.5972,395.9657;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SinTimeNode;30;-1098.597,323.9657;Inherit;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleDivideOpNode;42;-835.5974,395.9657;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;49;-634.1773,395.7234;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;47;-509.1774,396.7234;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;38;-1094.597,467.9664;Inherit;False;Constant;_Float0;Float 0;6;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;4;-390.7581,154.7793;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;54;42.02148,223.0895;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;29;-280.1665,412.9333;Inherit;False;Property;_BreethMode;呼吸模式;6;2;[Header];[Enum];Create;False;1;AutoAlphaChange;2;Manual;0;Auto;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;56;-1091.327,-39.97821;Inherit;False;Property;_Culling;剔除模式;0;1;[Enum];Create;False;0;1;Option1;0;1;UnityEngine.Rendering.CullMode;True;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;12;-973.1561,244.2694;Inherit;False;Property;_ChangeSpeed;自动变换速度;5;0;Create;False;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;5;-920.4978,173.8794;Inherit;False;Property;_ChangeValue;手动变换值;4;0;Create;False;0;0;0;False;0;False;0;-0.11;-1;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;55;-1087.252,39.07756;Inherit;False;Property;_BlendMode;混合模式;1;1;[Enum];Create;False;0;2;AlphaBlend;10;Addtive;1;0;True;0;False;0;10;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;17;-422.6174,268.7504;Inherit;False;Property;_BreethMValue;手动呼吸值;7;0;Create;False;0;0;0;False;0;False;0.5;0.5;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.ColorNode;10;-883.5514,-48.68635;Inherit;False;Property;_MainColor;霓虹颜色 (不能使用纯白纯黑);2;2;[HDR];[Header];Create;False;1;AutoColorChange;0;0;False;0;False;1,0.1011105,0,1;1,0,0.05476761,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;57;525.0435,64.55215;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;59;525.0435,64.55215;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;60;525.0435,64.55215;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;61;525.0435,64.55215;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;62;525.0435,64.55215;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;63;525.0435,64.55215;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;64;525.0435,64.55215;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;65;525.0435,64.55215;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;66;525.0435,64.55215;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;58;398.0435,-14.44785;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;A201-Shader/URP/自动霓虹灯呼吸;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;True;True;0;True;_Culling;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;True;True;2;5;False;;10;True;_BlendMode;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392575744684447; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392575752912400; Use Shadow Threshold;0;0;Receive Shadows;0;638392575768034990;GPU Instancing;0;638392575770812858;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;False;False;False;False;False;;False;0 +WireConnection;51;0;47;0 +WireConnection;51;1;50;0 +WireConnection;15;0;5;0 +WireConnection;15;1;11;0 +WireConnection;15;2;14;0 +WireConnection;2;0;10;0 +WireConnection;3;0;4;0 +WireConnection;3;1;2;2 +WireConnection;3;2;2;3 +WireConnection;28;0;17;0 +WireConnection;28;1;51;0 +WireConnection;28;2;29;0 +WireConnection;11;0;12;0 +WireConnection;40;0;30;4 +WireConnection;40;1;38;0 +WireConnection;42;0;40;0 +WireConnection;42;1;39;0 +WireConnection;49;0;42;0 +WireConnection;49;1;48;0 +WireConnection;47;0;49;0 +WireConnection;4;0;2;1 +WireConnection;4;1;15;0 +WireConnection;54;0;10;4 +WireConnection;54;1;28;0 +WireConnection;58;2;3;0 +WireConnection;58;3;54;0 +ASEEND*/ +//CHKSM=F52FE868C64AC452EF41269320D93ED09A8AB083 \ No newline at end of file diff --git a/URP/Soung_ParticlesDot.shader b/URP/Soung_ParticlesDot.shader new file mode 100644 index 0000000..fb6f494 --- /dev/null +++ b/URP/Soung_ParticlesDot.shader @@ -0,0 +1,740 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/通用粒子材质" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [ASEBegin][KeywordEnum(Dot,Glow)] _dotorglow("光点状/光晕状", Float) = 0 + [HDR]_EnhancedColor("颜色 (辉光)", Color) = (1,1,1,1) + _MaskPow("光点范围", Range( 5 , 50)) = 10 + _DotPwr("光点亮度", Range( 0 , 5)) = 1 + _MaskSub("光晕范围", Range( 0.5 , 1)) = 0.5 + [ASEEnd]_GlowPwr("光晕亮度", Range( 0 , 20)) = 20 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull Back + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 3.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend One One, One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _SURFACE_TYPE_TRANSPARENT 1 + #define _RECEIVE_SHADOWS_OFF 1 + #define ASE_SRP_VERSION 120111 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_FRAG_COLOR + #pragma shader_feature_local _DOTORGLOW_DOT _DOTORGLOW_GLOW + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord3 : TEXCOORD3; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _EnhancedColor; + float _MaskPow; + float _DotPwr; + float _MaskSub; + float _GlowPwr; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + + + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord3.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 texCoord29 = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); + float temp_output_32_0 = ( 1.0 - distance( texCoord29 , float2( 0.5,0.5 ) ) ); + #if defined(_DOTORGLOW_DOT) + float staticSwitch69 = saturate( ( pow( temp_output_32_0 , _MaskPow ) * _DotPwr ) ); + #elif defined(_DOTORGLOW_GLOW) + float staticSwitch69 = saturate( ( ( temp_output_32_0 - _MaskSub ) * _GlowPwr ) ); + #else + float staticSwitch69 = saturate( ( pow( temp_output_32_0 , _MaskPow ) * _DotPwr ) ); + #endif + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( IN.ase_color * staticSwitch69 * _EnhancedColor * IN.ase_color.a * _EnhancedColor.a ).rgb; + float Alpha = ( IN.ase_color.a * _EnhancedColor.a ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _SURFACE_TYPE_TRANSPARENT 1 + #define _RECEIVE_SHADOWS_OFF 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _EnhancedColor; + float _MaskPow; + float _DotPwr; + float _MaskSub; + float _GlowPwr; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + + + float Alpha = ( IN.ase_color.a * _EnhancedColor.a ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.TextureCoordinatesNode;29;-1913.018,121.4982;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.DistanceOpNode;30;-1676.363,120.8862;Inherit;True;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;32;-1476.561,121.2523;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.PowerNode;36;-1160.115,-56.69604;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;37;-1015.116,-56.69604;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleSubtractOpNode;82;-1152.658,255.6934;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;75;-1011.868,255.7006;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;76;-883.4497,255.4737;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;40;-884.6964,-56.92308;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.Vector2Node;31;-1866.765,238.2504;Inherit;False;Constant;_uvdotcenter;uvdotcenter;6;0;Create;True;0;0;0;False;0;False;0.5,0.5;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;83;-431.886,74.75146;Inherit;True;5;5;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;2;COLOR;0,0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;COLOR;0 +Node;AmplifyShaderEditor.RangedFloatNode;38;-1281.245,41.58722;Inherit;False;Property;_DotPwr;光点亮度;3;0;Create;False;0;0;0;False;0;False;1;0.72;0;5;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;78;-1425.567,274.8985;Inherit;False;Property;_MaskSub;光晕范围;4;0;Create;False;0;0;0;False;0;False;0.5;0.806;0.5;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;77;-1283.427,351.9837;Inherit;False;Property;_GlowPwr;光晕亮度;5;0;Create;False;0;0;0;False;0;False;20;4.4;0;20;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;34;-1437.114,-36.69798;Inherit;False;Property;_MaskPow;光点范围;2;0;Create;False;0;0;0;False;0;False;10;12.2;5;50;0;1;FLOAT;0 +Node;AmplifyShaderEditor.VertexColorNode;3;-619.3826,-73.91486;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;89;-137.4608,76.1063;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;90;-137.4608,76.1063;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;A201-Shader/URP/通用粒子材质;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;1;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392566827949871; Blend;2;638392566971867606;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392566845543534; Use Shadow Threshold;0;0;Receive Shadows;0;638392566834856125;GPU Instancing;0;638392566837767344;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;False;False;False;False;False;;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;91;-137.4608,76.1063;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;92;-137.4608,76.1063;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;93;-137.4608,76.1063;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;94;-137.4608,76.1063;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;95;-137.4608,76.1063;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;96;-137.4608,76.1063;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;97;-137.4608,76.1063;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;98;-137.4608,76.1063;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;99;-307.6469,322.3524;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ColorNode;88;-657.6859,314.6978;Inherit;False;Property;_EnhancedColor;颜色 (辉光);1;2;[HDR];[Header];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.StaticSwitch;69;-687.2459,93.22992;Inherit;True;Property;_dotorglow;光点状/光晕状;0;0;Create;False;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;2;Dot;Glow;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +WireConnection;30;0;29;0 +WireConnection;30;1;31;0 +WireConnection;32;0;30;0 +WireConnection;36;0;32;0 +WireConnection;36;1;34;0 +WireConnection;37;0;36;0 +WireConnection;37;1;38;0 +WireConnection;82;0;32;0 +WireConnection;82;1;78;0 +WireConnection;75;0;82;0 +WireConnection;75;1;77;0 +WireConnection;76;0;75;0 +WireConnection;40;0;37;0 +WireConnection;83;0;3;0 +WireConnection;83;1;69;0 +WireConnection;83;2;88;0 +WireConnection;83;3;3;4 +WireConnection;83;4;88;4 +WireConnection;90;2;83;0 +WireConnection;90;3;99;0 +WireConnection;99;0;3;4 +WireConnection;99;1;88;4 +WireConnection;69;1;40;0 +WireConnection;69;0;76;0 +ASEEND*/ +//CHKSM=4CCB6978FAC142890B4ADA74BD1B9A4007B28917 \ No newline at end of file diff --git a/URP/Soung_PixelArt.shader b/URP/Soung_PixelArt.shader new file mode 100644 index 0000000..219bd91 --- /dev/null +++ b/URP/Soung_PixelArt.shader @@ -0,0 +1,1729 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/像素风格化" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [ASEBegin][Enum(UnityEngine.Rendering.CullMode)]_CullingMode("剔除模式", Float) = 0 + [Enum(AlphaBlend,10,Additive,1)]_BlendMode("混合模式", Float) = 0 + _MainTexU("主纹理", 2D) = "white" {} + [HDR]_MainColor("主颜色", Color) = (1,1,1,1) + [Enum(R,0,A,1)]_SwitchP("切换贴图通道", Float) = 0 + [Enum(Dot,0,Pixel,1)]_PixelMode("像素模式", Float) = 0 + _DotSize("点状大小", Range( 0 , 1)) = 1 + [ASEEnd]_PixelSize("方块大小", Range( 0 , 1)) = 1 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull [_CullingMode] + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 3.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha [_BlendMode], One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_FRAG_COLOR + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainTexU_ST; + float4 _MainColor; + float _BlendMode; + float _CullingMode; + float _PixelSize; + float _DotSize; + float _PixelMode; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU; + + + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_texcoord3.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 uv_MainTexU = IN.ase_texcoord3.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float temp_output_23_0 = (25.0 + (_PixelSize - 0.0) * (125.0 - 25.0) / (1.0 - 0.0)); + float2 appendResult19 = (float2(temp_output_23_0 , temp_output_23_0)); + float2 temp_output_5_0 = ( uv_MainTexU * appendResult19 ); + float2 appendResult11_g1 = (float2(_DotSize , _DotSize)); + float temp_output_17_0_g1 = length( ( (frac( temp_output_5_0 )*2.0 + -1.0) / appendResult11_g1 ) ); + float4 tex2DNode2 = tex2D( _MainTexU, ( floor( temp_output_5_0 ) / appendResult19 ) ); + float4 lerpResult12 = lerp( ( saturate( ( ( 1.0 - temp_output_17_0_g1 ) / fwidth( temp_output_17_0_g1 ) ) ) * tex2DNode2 * 1.2 ) , tex2DNode2 , _PixelMode); + + float lerpResult38 = lerp( tex2DNode2.r , tex2DNode2.a , _SwitchP); + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( lerpResult12 * _MainColor * IN.ase_color ).rgb; + float Alpha = ( lerpResult38 * _MainColor.a * IN.ase_color.a * (lerpResult12).a ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_texcoord2 : TEXCOORD2; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainTexU_ST; + float4 _MainColor; + float _BlendMode; + float _CullingMode; + float _PixelSize; + float _DotSize; + float _PixelMode; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU; + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_texcoord2.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord2.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 uv_MainTexU = IN.ase_texcoord2.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float temp_output_23_0 = (25.0 + (_PixelSize - 0.0) * (125.0 - 25.0) / (1.0 - 0.0)); + float2 appendResult19 = (float2(temp_output_23_0 , temp_output_23_0)); + float2 temp_output_5_0 = ( uv_MainTexU * appendResult19 ); + float4 tex2DNode2 = tex2D( _MainTexU, ( floor( temp_output_5_0 ) / appendResult19 ) ); + float lerpResult38 = lerp( tex2DNode2.r , tex2DNode2.a , _SwitchP); + float2 appendResult11_g1 = (float2(_DotSize , _DotSize)); + float temp_output_17_0_g1 = length( ( (frac( temp_output_5_0 )*2.0 + -1.0) / appendResult11_g1 ) ); + float4 lerpResult12 = lerp( ( saturate( ( ( 1.0 - temp_output_17_0_g1 ) / fwidth( temp_output_17_0_g1 ) ) ) * tex2DNode2 * 1.2 ) , tex2DNode2 , _PixelMode); + + + float Alpha = ( lerpResult38 * _MainColor.a * IN.ase_color.a * (lerpResult12).a ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + Pass + { + + Name "SceneSelectionPass" + Tags { "LightMode"="SceneSelectionPass" } + + Cull Off + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #define ATTRIBUTES_NEED_NORMAL + #define ATTRIBUTES_NEED_TANGENT + #define SHADERPASS SHADERPASS_DEPTHONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainTexU_ST; + float4 _MainColor; + float _BlendMode; + float _CullingMode; + float _PixelSize; + float _DotSize; + float _PixelMode; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU; + + + + int _ObjectId; + int _PassValue; + + struct SurfaceDescription + { + float Alpha; + float AlphaClipThreshold; + }; + + VertexOutput VertexFunction(VertexInput v ) + { + VertexOutput o; + ZERO_INITIALIZE(VertexOutput, o); + + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_texcoord.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + o.clipPos = TransformWorldToHClip(positionWS); + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + SurfaceDescription surfaceDescription = (SurfaceDescription)0; + + float2 uv_MainTexU = IN.ase_texcoord.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float temp_output_23_0 = (25.0 + (_PixelSize - 0.0) * (125.0 - 25.0) / (1.0 - 0.0)); + float2 appendResult19 = (float2(temp_output_23_0 , temp_output_23_0)); + float2 temp_output_5_0 = ( uv_MainTexU * appendResult19 ); + float4 tex2DNode2 = tex2D( _MainTexU, ( floor( temp_output_5_0 ) / appendResult19 ) ); + float lerpResult38 = lerp( tex2DNode2.r , tex2DNode2.a , _SwitchP); + float2 appendResult11_g1 = (float2(_DotSize , _DotSize)); + float temp_output_17_0_g1 = length( ( (frac( temp_output_5_0 )*2.0 + -1.0) / appendResult11_g1 ) ); + float4 lerpResult12 = lerp( ( saturate( ( ( 1.0 - temp_output_17_0_g1 ) / fwidth( temp_output_17_0_g1 ) ) ) * tex2DNode2 * 1.2 ) , tex2DNode2 , _PixelMode); + + + surfaceDescription.Alpha = ( lerpResult38 * _MainColor.a * IN.ase_color.a * (lerpResult12).a ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + float alphaClipThreshold = 0.01f; + #if ALPHA_CLIP_THRESHOLD + alphaClipThreshold = surfaceDescription.AlphaClipThreshold; + #endif + clip(surfaceDescription.Alpha - alphaClipThreshold); + #endif + + half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0); + return outColor; + } + ENDHLSL + } + + + Pass + { + + Name "ScenePickingPass" + Tags { "LightMode"="Picking" } + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #define ATTRIBUTES_NEED_NORMAL + #define ATTRIBUTES_NEED_TANGENT + #define SHADERPASS SHADERPASS_DEPTHONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainTexU_ST; + float4 _MainColor; + float _BlendMode; + float _CullingMode; + float _PixelSize; + float _DotSize; + float _PixelMode; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU; + + + + float4 _SelectionID; + + + struct SurfaceDescription + { + float Alpha; + float AlphaClipThreshold; + }; + + VertexOutput VertexFunction(VertexInput v ) + { + VertexOutput o; + ZERO_INITIALIZE(VertexOutput, o); + + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_texcoord.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord.zw = 0; + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + float3 vertexValue = defaultVertexValue; + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + o.clipPos = TransformWorldToHClip(positionWS); + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + SurfaceDescription surfaceDescription = (SurfaceDescription)0; + + float2 uv_MainTexU = IN.ase_texcoord.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float temp_output_23_0 = (25.0 + (_PixelSize - 0.0) * (125.0 - 25.0) / (1.0 - 0.0)); + float2 appendResult19 = (float2(temp_output_23_0 , temp_output_23_0)); + float2 temp_output_5_0 = ( uv_MainTexU * appendResult19 ); + float4 tex2DNode2 = tex2D( _MainTexU, ( floor( temp_output_5_0 ) / appendResult19 ) ); + float lerpResult38 = lerp( tex2DNode2.r , tex2DNode2.a , _SwitchP); + float2 appendResult11_g1 = (float2(_DotSize , _DotSize)); + float temp_output_17_0_g1 = length( ( (frac( temp_output_5_0 )*2.0 + -1.0) / appendResult11_g1 ) ); + float4 lerpResult12 = lerp( ( saturate( ( ( 1.0 - temp_output_17_0_g1 ) / fwidth( temp_output_17_0_g1 ) ) ) * tex2DNode2 * 1.2 ) , tex2DNode2 , _PixelMode); + + + surfaceDescription.Alpha = ( lerpResult38 * _MainColor.a * IN.ase_color.a * (lerpResult12).a ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + float alphaClipThreshold = 0.01f; + #if ALPHA_CLIP_THRESHOLD + alphaClipThreshold = surfaceDescription.AlphaClipThreshold; + #endif + clip(surfaceDescription.Alpha - alphaClipThreshold); + #endif + + half4 outColor = 0; + outColor = _SelectionID; + + return outColor; + } + + ENDHLSL + } + + + Pass + { + + Name "DepthNormals" + Tags { "LightMode"="DepthNormalsOnly" } + + ZTest LEqual + ZWrite On + + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #define ATTRIBUTES_NEED_NORMAL + #define ATTRIBUTES_NEED_TANGENT + #define VARYINGS_NEED_NORMAL_WS + + #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + float3 normalWS : TEXCOORD0; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainTexU_ST; + float4 _MainColor; + float _BlendMode; + float _CullingMode; + float _PixelSize; + float _DotSize; + float _PixelMode; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTexU; + + + + struct SurfaceDescription + { + float Alpha; + float AlphaClipThreshold; + }; + + VertexOutput VertexFunction(VertexInput v ) + { + VertexOutput o; + ZERO_INITIALIZE(VertexOutput, o); + + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_texcoord1.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord1.zw = 0; + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float3 normalWS = TransformObjectToWorldNormal(v.ase_normal); + + o.clipPos = TransformWorldToHClip(positionWS); + o.normalWS.xyz = normalWS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + SurfaceDescription surfaceDescription = (SurfaceDescription)0; + + float2 uv_MainTexU = IN.ase_texcoord1.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float temp_output_23_0 = (25.0 + (_PixelSize - 0.0) * (125.0 - 25.0) / (1.0 - 0.0)); + float2 appendResult19 = (float2(temp_output_23_0 , temp_output_23_0)); + float2 temp_output_5_0 = ( uv_MainTexU * appendResult19 ); + float4 tex2DNode2 = tex2D( _MainTexU, ( floor( temp_output_5_0 ) / appendResult19 ) ); + float lerpResult38 = lerp( tex2DNode2.r , tex2DNode2.a , _SwitchP); + float2 appendResult11_g1 = (float2(_DotSize , _DotSize)); + float temp_output_17_0_g1 = length( ( (frac( temp_output_5_0 )*2.0 + -1.0) / appendResult11_g1 ) ); + float4 lerpResult12 = lerp( ( saturate( ( ( 1.0 - temp_output_17_0_g1 ) / fwidth( temp_output_17_0_g1 ) ) ) * tex2DNode2 * 1.2 ) , tex2DNode2 , _PixelMode); + + + surfaceDescription.Alpha = ( lerpResult38 * _MainColor.a * IN.ase_color.a * (lerpResult12).a ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + float3 normalWS = IN.normalWS; + + return half4(NormalizeNormalPerPixel(normalWS), 0.0); + } + + ENDHLSL + } + + + Pass + { + + Name "DepthNormalsOnly" + Tags { "LightMode"="DepthNormalsOnly" } + + ZTest LEqual + ZWrite On + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + + + #pragma exclude_renderers glcore gles gles3 + #pragma vertex vert + #pragma fragment frag + + #define ATTRIBUTES_NEED_NORMAL + #define ATTRIBUTES_NEED_TANGENT + #define ATTRIBUTES_NEED_TEXCOORD1 + #define VARYINGS_NEED_NORMAL_WS + #define VARYINGS_NEED_TANGENT_WS + + #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + float3 normalWS : TEXCOORD0; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _MainTexU_ST; + float4 _MainColor; + float _BlendMode; + float _CullingMode; + float _PixelSize; + float _DotSize; + float _PixelMode; + float _SwitchP; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + sampler2D _MainTexU; + + + + struct SurfaceDescription + { + float Alpha; + float AlphaClipThreshold; + }; + + VertexOutput VertexFunction(VertexInput v ) + { + VertexOutput o; + ZERO_INITIALIZE(VertexOutput, o); + + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_texcoord1.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord1.zw = 0; + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float3 normalWS = TransformObjectToWorldNormal(v.ase_normal); + + o.clipPos = TransformWorldToHClip(positionWS); + o.normalWS.xyz = normalWS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + SurfaceDescription surfaceDescription = (SurfaceDescription)0; + + float2 uv_MainTexU = IN.ase_texcoord1.xy * _MainTexU_ST.xy + _MainTexU_ST.zw; + float temp_output_23_0 = (25.0 + (_PixelSize - 0.0) * (125.0 - 25.0) / (1.0 - 0.0)); + float2 appendResult19 = (float2(temp_output_23_0 , temp_output_23_0)); + float2 temp_output_5_0 = ( uv_MainTexU * appendResult19 ); + float4 tex2DNode2 = tex2D( _MainTexU, ( floor( temp_output_5_0 ) / appendResult19 ) ); + float lerpResult38 = lerp( tex2DNode2.r , tex2DNode2.a , _SwitchP); + float2 appendResult11_g1 = (float2(_DotSize , _DotSize)); + float temp_output_17_0_g1 = length( ( (frac( temp_output_5_0 )*2.0 + -1.0) / appendResult11_g1 ) ); + float4 lerpResult12 = lerp( ( saturate( ( ( 1.0 - temp_output_17_0_g1 ) / fwidth( temp_output_17_0_g1 ) ) ) * tex2DNode2 * 1.2 ) , tex2DNode2 , _PixelMode); + + + surfaceDescription.Alpha = ( lerpResult38 * _MainColor.a * IN.ase_color.a * (lerpResult12).a ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + float3 normalWS = IN.normalWS; + + return half4(NormalizeNormalPerPixel(normalWS), 0.0); + } + + ENDHLSL + } + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.TFHCRemapNode;23;-1623.676,-227.7656;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;25;False;4;FLOAT;125;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;18;-1889.048,-232.9345;Inherit;False;Property;_PixelSize;方块大小;7;0;Create;False;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;19;-1443.048,-233.9345;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.SimpleMultiplyOpNode;5;-1306.381,-354.7614;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.FloorOpNode;7;-1175.302,-297.9638;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.FractNode;9;-1176.831,-398.0928;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;4;-1530.459,-360.0124;Inherit;False;0;2;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.SimpleDivideOpNode;8;-1045.204,-257.516;Inherit;True;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.FunctionNode;10;-765.5698,-398.1295;Inherit;True;Ellipse;-1;;1;3ba94b7b3cfd5f447befde8107c04d52;0;3;2;FLOAT2;0,0;False;7;FLOAT;1;False;9;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;17;-1059.205,-341.7161;Inherit;False;Property;_DotSize;点状大小;6;0;Create;False;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;22;-677.9973,-474.7273;Inherit;False;Constant;_EllipseFix;EllipseFix;5;0;Create;True;0;0;0;False;0;False;1.2;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;25;-1042.668,-36.03192;Inherit;False;Property;_BlendMode;混合模式;1;1;[Enum];Create;False;0;2;AlphaBlend;10;Additive;1;0;True;0;False;0;10;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;26;1.59138,-201.6713;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;28;1.59138,-201.6713;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;29;1.59138,-201.6713;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;30;1.59138,-201.6713;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;31;1.59138,-201.6713;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;32;1.59138,-201.6713;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;33;1.59138,-201.6713;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;34;1.59138,-201.6713;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;35;1.59138,-201.6713;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.RangedFloatNode;36;-1041.668,45.96808;Inherit;False;Property;_CullingMode;剔除模式;0;1;[Enum];Create;False;0;1;Option1;0;1;UnityEngine.Rendering.CullMode;True;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.ColorNode;3;-735.2053,8.664253;Inherit;False;Property;_MainColor;主颜色;3;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;0.7490196,0.7490196,0.7490196,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.VertexColorNode;24;-693.9358,182.0977;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;2;-823.2028,-181.0747;Inherit;True;Property;_MainTexU;主纹理;2;0;Create;False;0;0;0;False;0;False;-1;None;8c052a69009f25a45aff9f10624768f0;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;11;-378.879,-395.2892;Inherit;False;3;3;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 +Node;AmplifyShaderEditor.LerpOp;38;-384.4316,-81.08563;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;39;-544.4316,-37.08563;Inherit;False;Property;_SwitchP;切换贴图通道;4;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;13;-367.1895,-155.1645;Inherit;False;Property;_PixelMode;像素模式;5;1;[Enum];Create;False;0;2;Dot;0;Pixel;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;12;-245.8899,-196.0647;Inherit;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;1;13.1484,-195.8515;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.TemplateMultiPassMasterNode;27;166.5914,-194.6713;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;A201-Shader/URP/像素风格化;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;True;True;0;True;_CullingMode;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;True;True;2;5;False;;10;True;_BlendMode;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392666275539406; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392666265890880; Use Shadow Threshold;0;0;Receive Shadows;0;638392666262637554;GPU Instancing;0;638392666260207437;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;True;True;True;True;False;;False;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;37;116.0988,63.56818;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ComponentMaskNode;40;-80.43164,133.9144;Inherit;False;False;False;False;True;1;0;COLOR;0,0,0,0;False;1;FLOAT;0 +WireConnection;23;0;18;0 +WireConnection;19;0;23;0 +WireConnection;19;1;23;0 +WireConnection;5;0;4;0 +WireConnection;5;1;19;0 +WireConnection;7;0;5;0 +WireConnection;9;0;5;0 +WireConnection;8;0;7;0 +WireConnection;8;1;19;0 +WireConnection;10;2;9;0 +WireConnection;10;7;17;0 +WireConnection;10;9;17;0 +WireConnection;2;1;8;0 +WireConnection;11;0;10;0 +WireConnection;11;1;2;0 +WireConnection;11;2;22;0 +WireConnection;38;0;2;1 +WireConnection;38;1;2;4 +WireConnection;38;2;39;0 +WireConnection;12;0;11;0 +WireConnection;12;1;2;0 +WireConnection;12;2;13;0 +WireConnection;1;0;12;0 +WireConnection;1;1;3;0 +WireConnection;1;2;24;0 +WireConnection;27;2;1;0 +WireConnection;27;3;37;0 +WireConnection;37;0;38;0 +WireConnection;37;1;3;4 +WireConnection;37;2;24;4 +WireConnection;37;3;40;0 +WireConnection;40;0;12;0 +ASEEND*/ +//CHKSM=C8017631DAC17A98D88F8DEA4520DA158E330FF1 \ No newline at end of file diff --git a/URP/Soung_ScreenFlip.shader b/URP/Soung_ScreenFlip.shader new file mode 100644 index 0000000..221480e --- /dev/null +++ b/URP/Soung_ScreenFlip.shader @@ -0,0 +1,277 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/个人制作/序列帧扭曲屏幕" +{ + Properties + { + _TextureSample0("序列帧", 2D) = "white" {} + [KeywordEnum(R,A)] _TexSwitchP("切换贴图通道", Float) = 0 + _Vector0("横纵数量-速率-起始帧", Vector) = (0,0,0,0) + _Float0("扭曲强度", Range( 0 , 1)) = 0 + [KeywordEnum(DIY,Program)] _UseFix1("遮罩模式", Float) = 0 + _Fixval1("边缘过渡 (Program)", Range( 1 , 200)) = 150 + _TextureSample1("自定义遮罩 (DIY)", 2D) = "white" {} + + } + + SubShader + { + + + Tags { "RenderType"="Transparent" "Queue"="Transparent+2" } + LOD 100 + + CGINCLUDE + #pragma target 3.0 + ENDCG + Blend SrcAlpha OneMinusSrcAlpha + AlphaToMask Off + Cull Back + ColorMask RGBA + ZWrite Off + ZTest LEqual + Offset 0 , 0 + + + GrabPass{ } + + Pass + { + Name "Unlit" + + CGPROGRAM + + #if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) + #define ASE_DECLARE_SCREENSPACE_TEXTURE(tex) UNITY_DECLARE_SCREENSPACE_TEXTURE(tex); + #else + #define ASE_DECLARE_SCREENSPACE_TEXTURE(tex) UNITY_DECLARE_SCREENSPACE_TEXTURE(tex) + #endif + + + #ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX + //only defining to not throw compilation error over Unity 5.5 + #define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input) + #endif + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_instancing + #include "UnityCG.cginc" + #include "UnityShaderVariables.cginc" + #pragma shader_feature_local _TEXSWITCHP_R _TEXSWITCHP_A + #pragma shader_feature_local _USEFIX1_DIY _USEFIX1_PROGRAM + + + struct appdata + { + float4 vertex : POSITION; + float4 color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 vertex : SV_POSITION; + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + float3 worldPos : TEXCOORD0; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_texcoord2 : TEXCOORD2; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + ASE_DECLARE_SCREENSPACE_TEXTURE( _GrabTexture ) + uniform sampler2D _TextureSample0; + uniform float4 _TextureSample0_ST; + uniform float4 _Vector0; + uniform float _Float0; + uniform sampler2D _TextureSample1; + uniform float4 _TextureSample1_ST; + uniform float _Fixval1; + + + v2f vert ( appdata v ) + { + v2f o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + + float4 ase_clipPos = UnityObjectToClipPos(v.vertex); + float4 screenPos = ComputeScreenPos(ase_clipPos); + o.ase_texcoord1 = screenPos; + + o.ase_color = v.color; + o.ase_texcoord2.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord2.zw = 0; + float3 vertexValue = float3(0, 0, 0); + #if ASE_ABSOLUTE_VERTEX_POS + vertexValue = v.vertex.xyz; + #endif + vertexValue = vertexValue; + #if ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + o.vertex = UnityObjectToClipPos(v.vertex); + + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; + #endif + return o; + } + + fixed4 frag (v2f i ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(i); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + fixed4 finalColor; + #ifdef ASE_NEEDS_FRAG_WORLD_POSITION + float3 WorldPosition = i.worldPos; + #endif + float4 screenPos = i.ase_texcoord1; + float4 ase_screenPosNorm = screenPos / screenPos.w; + ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; + float2 uv_TextureSample0 = i.ase_texcoord2.xy * _TextureSample0_ST.xy + _TextureSample0_ST.zw; + float mulTime67 = _Time.y * 5.0; + // *** BEGIN Flipbook UV Animation vars *** + // Total tiles of Flipbook Texture + float fbtotaltiles65 = _Vector0.x * _Vector0.y; + // Offsets for cols and rows of Flipbook Texture + float fbcolsoffset65 = 1.0f / _Vector0.x; + float fbrowsoffset65 = 1.0f / _Vector0.y; + // Speed of animation + float fbspeed65 = mulTime67 * _Vector0.z; + // UV Tiling (col and row offset) + float2 fbtiling65 = float2(fbcolsoffset65, fbrowsoffset65); + // UV Offset - calculate current tile linear index, and convert it to (X * coloffset, Y * rowoffset) + // Calculate current tile linear index + float fbcurrenttileindex65 = round( fmod( fbspeed65 + _Vector0.w, fbtotaltiles65) ); + fbcurrenttileindex65 += ( fbcurrenttileindex65 < 0) ? fbtotaltiles65 : 0; + // Obtain Offset X coordinate from current tile linear index + float fblinearindextox65 = round ( fmod ( fbcurrenttileindex65, _Vector0.x ) ); + // Multiply Offset X by coloffset + float fboffsetx65 = fblinearindextox65 * fbcolsoffset65; + // Obtain Offset Y coordinate from current tile linear index + float fblinearindextoy65 = round( fmod( ( fbcurrenttileindex65 - fblinearindextox65 ) / _Vector0.x, _Vector0.y ) ); + // Reverse Y to get tiles from Top to Bottom + fblinearindextoy65 = (int)(_Vector0.y-1) - fblinearindextoy65; + // Multiply Offset Y by rowoffset + float fboffsety65 = fblinearindextoy65 * fbrowsoffset65; + // UV Offset + float2 fboffset65 = float2(fboffsetx65, fboffsety65); + // Flipbook UV + half2 fbuv65 = frac( uv_TextureSample0 ) * fbtiling65 + fboffset65; + // *** END Flipbook UV Animation vars *** + float4 tex2DNode5 = tex2D( _TextureSample0, fbuv65 ); + #if defined(_TEXSWITCHP_R) + float staticSwitch70 = tex2DNode5.r; + #elif defined(_TEXSWITCHP_A) + float staticSwitch70 = tex2DNode5.a; + #else + float staticSwitch70 = tex2DNode5.r; + #endif + float4 temp_cast_0 = (staticSwitch70).xxxx; + float4 lerpResult4 = lerp( (ase_screenPosNorm).xyzw , temp_cast_0 , _Float0); + float4 screenColor2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_GrabTexture,lerpResult4.xy); + float2 uv_TextureSample1 = i.ase_texcoord2.xy * _TextureSample1_ST.xy + _TextureSample1_ST.zw; + float2 texCoord50 = i.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 ); + float2 texCoord51 = i.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 ); + #if defined(_USEFIX1_DIY) + float staticSwitch61 = tex2D( _TextureSample1, uv_TextureSample1 ).a; + #elif defined(_USEFIX1_PROGRAM) + float staticSwitch61 = saturate( ( ( 1.0 - saturate( texCoord50.x ) ) * ( 1.0 - saturate( texCoord50.y ) ) * saturate( texCoord51.x ) * saturate( texCoord51.y ) * _Fixval1 ) ); + #else + float staticSwitch61 = tex2D( _TextureSample1, uv_TextureSample1 ).a; + #endif + float4 appendResult81 = (float4((screenColor2).rgb , staticSwitch61)); + + + finalColor = ( i.ase_color * appendResult81 ); + return finalColor; + } + ENDCG + } + } + CustomEditor "ASEMaterialInspector" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.CommentaryNode;86;-1855.574,-34.05748;Inherit;False;1608.031;489.8649;抓取屏幕颜色与UV,使用序列帧扰动屏幕UV,为着色器输出RGB通道信息;13;76;4;2;70;82;3;67;63;6;66;65;5;7;使用序列扭曲屏幕;0.4292453,0.7177615,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;85;-1858.475,493.8354;Inherit;False;1179;466.6;使用自定义贴图或使用程序化遮罩,为着色器输出A通道信息;14;72;59;71;61;58;50;55;51;60;53;56;57;54;52;遮罩选择模式;1,0.8296858,0.6179246,1;0;0 +Node;AmplifyShaderEditor.SaturateNode;52;-1626.354,747.7168;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;54;-1626.057,814.2239;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;57;-1500.353,746.7168;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;56;-1501.056,679.2228;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;53;-1627.057,679.2228;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;60;-1221.748,726.5476;Inherit;True;5;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;51;-1833.466,833.3937;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.SaturateNode;55;-1394.85,886.847;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;50;-1834.236,699.9272;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;58;-1499.743,817.386;Inherit;False;Property;_Fixval1;边缘过渡 (Program);5;0;Create;False;0;0;0;False;0;False;150;150;1;200;0;1;FLOAT;0 +Node;AmplifyShaderEditor.StaticSwitch;61;-877.4573,641.0216;Inherit;False;Property;_UseFix1;遮罩模式;4;0;Create;False;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;2;DIY;Program;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;71;-1175.037,531.2141;Inherit;True;Property;_TextureSample1;自定义遮罩 (DIY);6;0;Create;False;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SaturateNode;59;-1023.733,727.7299;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;72;-1379.782,555.2921;Inherit;False;0;71;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.VertexColorNode;69;-210.796,16.48813;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;68;-24.72206,110.7366;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;108.9747,110.778;Float;False;True;-1;2;ASEMaterialInspector;100;5;A201-Shader/个人制作/序列帧扭曲屏幕;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;True;2;5;False;;10;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;True;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;2;RenderType=Transparent=RenderType;Queue=Transparent=Queue=2;True;2;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;0;;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;0;1;True;False;;False;0 +Node;AmplifyShaderEditor.DynamicAppendNode;81;-196.2428,188.4965;Inherit;False;FLOAT4;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0 +Node;AmplifyShaderEditor.RangedFloatNode;7;-1207.557,375.3433;Inherit;False;Property;_Float0;扭曲强度;3;0;Create;False;0;0;0;False;0;False;0;1.8;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;5;-1270.593,185.9961;Inherit;True;Property;_TextureSample0;序列帧;0;0;Create;False;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TFHCFlipBookUVAnimation;65;-1500.067,214.1724;Inherit;False;0;0;6;0;FLOAT2;0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;3;FLOAT2;0;FLOAT;1;FLOAT;2 +Node;AmplifyShaderEditor.Vector4Node;66;-1829.727,208.367;Inherit;False;Property;_Vector0;横纵数量-速率-起始帧;2;0;Create;False;0;0;0;False;0;False;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TextureCoordinatesNode;6;-1839.242,88.6382;Inherit;False;0;5;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.FractNode;63;-1614.242,211.5121;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleTimeNode;67;-1788.449,377.1939;Inherit;False;1;0;FLOAT;5;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ComponentMaskNode;3;-988.5926,14.29578;Inherit;False;True;True;True;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0 +Node;AmplifyShaderEditor.ScreenPosInputsNode;82;-1174.17,13.98382;Float;False;0;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.StaticSwitch;70;-981.4788,209.0849;Inherit;False;Property;_TexSwitchP;切换贴图通道;1;0;Create;False;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;2;R;A;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ScreenColorNode;2;-588.3892,184.7074;Inherit;False;Global;_GrabScreen0;Grab Screen 0;0;0;Create;True;0;0;0;False;0;False;Object;-1;False;False;False;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.LerpOp;4;-741.8892,190.4074;Inherit;False;3;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT;0;False;1;FLOAT4;0 +Node;AmplifyShaderEditor.ComponentMaskNode;76;-431.4586,184.6423;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 +WireConnection;52;0;50;2 +WireConnection;54;0;51;1 +WireConnection;57;0;52;0 +WireConnection;56;0;53;0 +WireConnection;53;0;50;1 +WireConnection;60;0;56;0 +WireConnection;60;1;57;0 +WireConnection;60;2;54;0 +WireConnection;60;3;55;0 +WireConnection;60;4;58;0 +WireConnection;55;0;51;2 +WireConnection;61;1;71;4 +WireConnection;61;0;59;0 +WireConnection;71;1;72;0 +WireConnection;59;0;60;0 +WireConnection;68;0;69;0 +WireConnection;68;1;81;0 +WireConnection;0;0;68;0 +WireConnection;81;0;76;0 +WireConnection;81;3;61;0 +WireConnection;5;1;65;0 +WireConnection;65;0;63;0 +WireConnection;65;1;66;1 +WireConnection;65;2;66;2 +WireConnection;65;3;66;3 +WireConnection;65;4;66;4 +WireConnection;65;5;67;0 +WireConnection;63;0;6;0 +WireConnection;3;0;82;0 +WireConnection;70;1;5;1 +WireConnection;70;0;5;4 +WireConnection;2;0;4;0 +WireConnection;4;0;3;0 +WireConnection;4;1;70;0 +WireConnection;4;2;7;0 +WireConnection;76;0;2;0 +ASEEND*/ +//CHKSM=9BB17842F2402D869D05B730BE9400DFFB339759 \ No newline at end of file diff --git a/URP/Soung_SimpleCrack.shader b/URP/Soung_SimpleCrack.shader new file mode 100644 index 0000000..98aeafe --- /dev/null +++ b/URP/Soung_SimpleCrack.shader @@ -0,0 +1,809 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "A201-Shader/URP/简易地裂" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [ASEBegin][Header(MainTex)]_MainTex("地裂贴图", 2D) = "white" {} + [KeywordEnum(R,A)] _SwitchP("切换贴图通道", Float) = 0 + _CScale("地裂深度", Range( 0 , 1)) = 0 + [HDR]_InnColor("内部颜色", Color) = (1,0,0,1) + [ASEEnd][HDR]_OutColor("外部颜色", Color) = (0,0,0,1) + [HideInInspector] _texcoord( "", 2D ) = "white" {} + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull Back + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 3.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _SURFACE_TYPE_TRANSPARENT 1 + #define _RECEIVE_SHADOWS_OFF 1 + #define ASE_SRP_VERSION 120111 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_VERT_NORMAL + #define ASE_NEEDS_FRAG_WORLD_POSITION + #define ASE_NEEDS_FRAG_COLOR + #pragma shader_feature_local _SWITCHP_R _SWITCHP_A + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + float4 ase_tangent : TANGENT; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_texcoord4 : TEXCOORD4; + float4 ase_texcoord5 : TEXCOORD5; + float4 ase_texcoord6 : TEXCOORD6; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _OutColor; + float4 _InnColor; + float4 _MainTex_ST; + float _CScale; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTex; + + + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + float3 ase_worldTangent = TransformObjectToWorldDir(v.ase_tangent.xyz); + o.ase_texcoord4.xyz = ase_worldTangent; + float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); + o.ase_texcoord5.xyz = ase_worldNormal; + float ase_vertexTangentSign = v.ase_tangent.w * ( unity_WorldTransformParams.w >= 0.0 ? 1.0 : -1.0 ); + float3 ase_worldBitangent = cross( ase_worldNormal, ase_worldTangent ) * ase_vertexTangentSign; + o.ase_texcoord6.xyz = ase_worldBitangent; + + o.ase_color = v.ase_color; + o.ase_texcoord3.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + o.ase_texcoord4.w = 0; + o.ase_texcoord5.w = 0; + o.ase_texcoord6.w = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + float4 ase_tangent : TANGENT; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + o.ase_tangent = v.ase_tangent; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw; + float4 tex2DNode4 = tex2D( _MainTex, uv_MainTex ); + #if defined(_SWITCHP_R) + float staticSwitch5 = tex2DNode4.r; + #elif defined(_SWITCHP_A) + float staticSwitch5 = tex2DNode4.a; + #else + float staticSwitch5 = tex2DNode4.r; + #endif + float4 _ReMap = float4(0,1,1,0); + float3 ase_worldTangent = IN.ase_texcoord4.xyz; + float3 ase_worldNormal = IN.ase_texcoord5.xyz; + float3 ase_worldBitangent = IN.ase_texcoord6.xyz; + float3 tanToWorld0 = float3( ase_worldTangent.x, ase_worldBitangent.x, ase_worldNormal.x ); + float3 tanToWorld1 = float3( ase_worldTangent.y, ase_worldBitangent.y, ase_worldNormal.y ); + float3 tanToWorld2 = float3( ase_worldTangent.z, ase_worldBitangent.z, ase_worldNormal.z ); + float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition ); + ase_worldViewDir = normalize(ase_worldViewDir); + float3 ase_tanViewDir = tanToWorld0 * ase_worldViewDir.x + tanToWorld1 * ase_worldViewDir.y + tanToWorld2 * ase_worldViewDir.z; + ase_tanViewDir = SafeNormalize( ase_tanViewDir ); + float2 Offset1 = ( ( (_ReMap.z + (staticSwitch5 - _ReMap.x) * (_ReMap.w - _ReMap.z) / (_ReMap.y - _ReMap.x)) - 1 ) * ase_tanViewDir.xy * _CScale ) + uv_MainTex; + float4 tex2DNode9 = tex2D( _MainTex, Offset1 ); + #if defined(_SWITCHP_R) + float staticSwitch11 = tex2DNode9.r; + #elif defined(_SWITCHP_A) + float staticSwitch11 = tex2DNode9.a; + #else + float staticSwitch11 = tex2DNode9.r; + #endif + float4 lerpResult12 = lerp( _OutColor , _InnColor , staticSwitch11); + + float4 tex2DNode16 = tex2D( _MainTex, uv_MainTex ); + #if defined(_SWITCHP_R) + float staticSwitch17 = tex2DNode16.r; + #elif defined(_SWITCHP_A) + float staticSwitch17 = tex2DNode16.a; + #else + float staticSwitch17 = tex2DNode16.r; + #endif + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( IN.ase_color * lerpResult12 ).rgb; + float Alpha = ( IN.ase_color.a * staticSwitch17 ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _SURFACE_TYPE_TRANSPARENT 1 + #define _RECEIVE_SHADOWS_OFF 1 + #define ASE_SRP_VERSION 120111 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + #pragma shader_feature_local _SWITCHP_R _SWITCHP_A + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord2 : TEXCOORD2; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _OutColor; + float4 _InnColor; + float4 _MainTex_ST; + float _CScale; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _MainTex; + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.ase_color = v.ase_color; + o.ase_texcoord2.xy = v.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord2.zw = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = defaultVertexValue; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_color = v.ase_color; + o.ase_texcoord = v.ase_texcoord; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 uv_MainTex = IN.ase_texcoord2.xy * _MainTex_ST.xy + _MainTex_ST.zw; + float4 tex2DNode16 = tex2D( _MainTex, uv_MainTex ); + #if defined(_SWITCHP_R) + float staticSwitch17 = tex2DNode16.r; + #elif defined(_SWITCHP_A) + float staticSwitch17 = tex2DNode16.a; + #else + float staticSwitch17 = tex2DNode16.r; + #endif + + + float Alpha = ( IN.ase_color.a * staticSwitch17 ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.LerpOp;12;-674.3451,-137.2314;Inherit;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.ParallaxMappingNode;1;-1461.007,-63.40488;Inherit;False;Normal;4;0;FLOAT2;0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT3;0,0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SamplerNode;9;-1222.883,-50.42892;Inherit;True;Property;_TextureSample0;Texture Sample 0;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Instance;4;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.StaticSwitch;11;-928.1572,15.81867;Inherit;False;Property;_SwitchP2;SwitchP;1;0;Create;True;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;2;R;A;Reference;5;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ColorNode;13;-947.7056,-164.3883;Inherit;False;Property;_InnColor;内部颜色;3;1;[HDR];Create;False;0;0;0;False;0;False;1,0,0,1;0.9056604,0.1751513,0.1751513,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.ColorNode;3;-945.0431,-338.0239;Inherit;False;Property;_OutColor;外部颜色;4;1;[HDR];Create;False;0;0;0;False;0;False;0,0,0,1;0,0,0,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;4;-2208.492,-182.7849;Inherit;True;Property;_MainTex;地裂贴图;0;1;[Header];Create;False;1;MainTex;0;0;False;0;False;-1;None;38640091d4254fa44834b2beae31f801;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.StaticSwitch;5;-1918.49,-159.7849;Inherit;False;Property;_SwitchP;切换贴图通道;1;0;Create;False;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;2;R;A;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TFHCRemapNode;18;-1696.691,-55.97047;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;4;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;6;-1718.368,-175.0521;Inherit;False;0;4;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;7;-1784.564,109.5519;Inherit;False;Property;_CScale;地裂深度;2;0;Create;False;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.ViewDirInputsCoordNode;8;-1686.16,185.7942;Inherit;False;Tangent;True;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 +Node;AmplifyShaderEditor.StaticSwitch;17;-619.5437,153.3607;Inherit;False;Property;_SwitchP3;SwitchP;1;0;Create;True;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;2;R;A;Reference;5;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;16;-917.1884,130.4136;Inherit;True;Property;_TextureSample1;Texture Sample 0;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Instance;4;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.Vector4Node;19;-1924.212,-59.81852;Inherit;False;Constant;_ReMap;Remap值(建议保持默认);1;0;Create;False;0;0;0;False;0;False;0,1,1,0;0,1,1,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;63;-32.18404,-157.9268;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;65;-32.18404,-157.9268;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;66;-32.18404,-157.9268;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;67;-32.18404,-157.9268;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;68;-32.18404,-157.9268;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;69;-32.18404,-157.9268;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;70;-32.18404,-157.9268;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;71;-32.18404,-157.9268;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;72;-32.18404,-157.9268;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.VertexColorNode;61;-449.3165,-56.41931;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;62;-212.0885,-158.6285;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;73;-279.0991,126.7365;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;64;-55.18404,-156.9268;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;A201-Shader/URP/简易地裂;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392670561059199; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392670566966930; Use Shadow Threshold;0;0;Receive Shadows;0;638392670580310355;GPU Instancing;0;638392670597883991;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;False;False;False;False;False;;False;0 +WireConnection;12;0;3;0 +WireConnection;12;1;13;0 +WireConnection;12;2;11;0 +WireConnection;1;0;6;0 +WireConnection;1;1;18;0 +WireConnection;1;2;7;0 +WireConnection;1;3;8;0 +WireConnection;9;1;1;0 +WireConnection;11;1;9;1 +WireConnection;11;0;9;4 +WireConnection;5;1;4;1 +WireConnection;5;0;4;4 +WireConnection;18;0;5;0 +WireConnection;18;1;19;1 +WireConnection;18;2;19;2 +WireConnection;18;3;19;3 +WireConnection;18;4;19;4 +WireConnection;17;1;16;1 +WireConnection;17;0;16;4 +WireConnection;62;0;61;0 +WireConnection;62;1;12;0 +WireConnection;73;0;61;4 +WireConnection;73;1;17;0 +WireConnection;64;2;62;0 +WireConnection;64;3;73;0 +ASEEND*/ +//CHKSM=A4071583BB19A79C793909B8054262E190093E54 \ No newline at end of file diff --git a/URP/Soung_shader_ALL_URP.shader b/URP/Soung_shader_ALL_URP.shader new file mode 100644 index 0000000..c241700 --- /dev/null +++ b/URP/Soung_shader_ALL_URP.shader @@ -0,0 +1,1636 @@ +// Made with Amplify Shader Editor v1.9.1.5 +// Available at the Unity Asset Store - http://u3d.as/y3X +//Edited by Soung, 2023.12.28 +Shader "A201-Shader/URP/特效全功能通用" +{ + Properties + { + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [Enum(Additive,1,AlphaBlend,10)]_Dst("混合模式", Float) = 1 + [Enum(UnityEngine.Rendering.CullMode)]_CullMode("剔除模式", Float) = 0 + [Enum(Less or Equal,4,Always,8)]_ZTestMode("深度测试", Float) = 4 + [Enum(ON,1,OFF,0)]_Zwrite("深度写入", Float) = 0 + _SoftParticle("软粒子", Range( 0 , 10)) = 0 + [Header(Main_Tex)]_Main_Tex("主帖图", 2D) = "white" {} + [HDR]_Main_Tex_Color("主帖图颜色", Color) = (1,1,1,1) + [Enum(R,0,A,1)]_Main_Tex_A_R("主帖图通道", Float) = 0 + [Enum(Normal,0,Custom1zw,1)]_Main_Tex_Custom_ZW("主帖图UV流动方式", Float) = 0 + [Enum(Repeat,0,Clmap,1)]_Main_Tex_ClampSwitch("主帖图重铺模式", Float) = 0 + [IntRange]_Main_Tex_Rotator("主帖图旋转", Range( 0 , 360)) = 0 + _Main_Tex_U_speed("主帖图U方向速率", Float) = 0 + _Main_Tex_V_speed("主帖图V方向速率", Float) = 0 + [Header(Remap_Tex)]_Remap_Tex("颜色叠加贴图", 2D) = "white" {} + [Enum(OFF,0,ON,1)]_Remap_Tex_Followl_Main_Tex("跟随主贴图一次性UV移动", Float) = 0 + [Enum(R,0,A,1)]_Remap_Tex_A_R("颜色叠加贴图", Float) = 0 + _Remap_Tex_Desaturate("颜色贴图去色", Range( 0 , 1)) = 0 + [Enum(Repeat,0,Clmap,1)]_Remap_Tex_ClampSwitch("颜色叠加重铺模式", Float) = 0 + [IntRange]_Remap_Tex_Rotator("颜色叠加旋转", Range( 0 , 360)) = 0 + _Remap_Tex_U_speed("颜色叠加U方向速率", Float) = 0 + _Remap_Tex_V_speed("颜色叠加V方向速率", Float) = 0 + [Header(Mask_Tex)]_Mask_Tex("遮罩贴图", 2D) = "white" {} + [Enum(Repeat,0,Clmap,1)]_Mask_Tex_ClampSwitch("遮罩贴图重铺模式", Float) = 0 + [Enum(R,0,A,1)]_Mask_Tex_A_R("遮罩贴图通道", Float) = 0 + [IntRange]_Mask_Tex_Rotator("遮罩贴图旋转", Range( 0 , 360)) = 0 + _Mask_Tex_U_speed("遮罩贴图U方向速率", Float) = 0 + _Mask_Tex_V_speed("遮罩贴图V方向速率", Float) = 0 + [Header(Mask_Tex2)]_Mask_Tex2("遮罩贴图2", 2D) = "white" {} + [Enum(Repeat,0,Clmap,1)]_Mask_Tex_ClampSwitch2("遮罩贴图2重铺模式", Float) = 0 + [Enum(R,0,A,1)]_Mask_Tex_A_R2("遮罩贴图2通道", Float) = 0 + [IntRange]_Mask_Tex_Rotator2("遮罩贴图2旋转", Range( 0 , 360)) = 0 + _Mask_Tex_U_speed2("遮罩2U方向速率", Float) = 0 + _Mask_Tex_V_speed2("遮罩2V方向速率", Float) = 0 + [Header(Liuguang_Tex)]_LiuguangTex("流光纹理", 2D) = "white" {} + [Toggle(_LGTEXSWITCH_ON)] _LGTexSwitch("流光开关", Float) = 0 + [Enum(R,0,A,1)]_LiuguangTex_P("流光纹理通道", Float) = 0 + [IntRange]_LG_Tex_Rotator("流光纹理旋转", Range( 0 , 360)) = 0 + [HDR]_LGColor("流光颜色", Color) = (1,1,1,1) + [Toggle]_UseLGTexColor("是否禁用纹理自身颜色", Float) = 1 + _LGTex_U_Speed("流光U方向速率", Float) = 0 + _LGTex_V_Speed("流光V方向速率", Float) = 0 + [Header(Dissolve_Tex)]_Dissolve_Tex("溶解贴图", 2D) = "white" {} + [Toggle(_DISSOLVE_SWITCH_ON)] _Dissolve_Switch("溶解开关", Float) = 0 + [Enum(R,0,A,1)]_Dissolve_Tex_A_R("溶解贴图通道", Float) = 0 + [Enum(OFF,0,ON,1)]_Dissolve_Tex_Custom_X("是否Custom1x控制溶解", Float) = 0 + [IntRange]_Dissolve_Tex_Rotator("溶解贴图旋转", Range( 0 , 360)) = 0 + _Dissolve_Tex_smooth("溶解平滑度", Range( 0.5 , 1)) = 0.5 + _Dissolve_Tex_power("溶解进度", Range( 0 , 1)) = 0 + _Dissolve_Tex_U_speed("溶解U方向速率", Float) = 0 + _Dissolve_Tex_V_speed("溶解V方向速率", Float) = 0 + [Header(Distortion_Tex)]_Distortion_Tex("扭曲贴图", 2D) = "white" {} + [Enum(OFF,0,ON,1)]_Distortion_Switch("是否启用扭曲", Float) = 0 + _Distortion_Tex_Power("扭曲强度", Float) = 0 + _Distortion_Tex_U_speed("扭曲U方向速率", Float) = 0 + _Distortion_Tex_V_speed("扭曲V方向速率", Float) = 0 + [HDR][Header(Fresnel)]_Fresnel_Color("菲涅尔颜色", Color) = (1,1,1,1) + [Toggle(_FRESNEL_SWITCH_ON)] _Fresnel_Switch("菲涅尔开关", Float) = 0 + [Enum(Fresnel,0,Bokeh,1)]_Fresnel_Bokeh("菲涅尔模式", Float) = 0 + _Fresnel_scale("菲涅尔亮度", Float) = 1 + _Fresnel_power("菲涅尔强度", Float) = 5 + [Header(Wpo_Tex)]_WPO_Tex("顶点偏移贴图", 2D) = "white" {} + [Toggle(_WPO_SWITCH_ON)] _WPO_Switch("顶点偏移开关", Float) = 0 + [Enum(Normal,0,Custom1y,1)]_WPO_CustomSwitch_Y("顶点偏移模式", Float) = 0 + _WPO_tex_power("顶点偏移强度", Float) = 0 + _WPO_Tex_Direction("顶点偏移轴向", Vector) = (1,1,1,0) + _WPO_Tex_U_speed("顶点偏移U方向速率", Float) = 0 + [ASEEnd]_WPO_Tex_V_speed("顶点偏移V方向速率", Float) = 0 + + + //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 + //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 + //_TessMin( "Tess Min Distance", Float ) = 10 + //_TessMax( "Tess Max Distance", Float ) = 25 + //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 + //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + } + + SubShader + { + LOD 0 + + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } + + Cull [_CullMode] + AlphaToMask Off + + + + HLSLINCLUDE + #pragma target 3.5 + #pragma prefer_hlslcc gles + // ensure rendering platforms toggle list is visible + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + + #ifndef ASE_TESS_FUNCS + #define ASE_TESS_FUNCS + float4 FixedTess( float tessValue ) + { + return tessValue; + } + + float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) + { + float3 wpos = mul(o2w,vertex).xyz; + float dist = distance (wpos, cameraPos); + float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; + return f; + } + + float4 CalcTriEdgeTessFactors (float3 triVertexFactors) + { + float4 tess; + tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); + tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); + tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); + tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; + return tess; + } + + float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) + { + float dist = distance (0.5 * (wpos0+wpos1), cameraPos); + float len = distance(wpos0, wpos1); + float f = max(len * scParams.y / (edgeLen * dist), 1.0); + return f; + } + + float DistanceFromPlane (float3 pos, float4 plane) + { + float d = dot (float4(pos,1.0f), plane); + return d; + } + + bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) + { + float4 planeTest; + planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); + planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); + return !all (planeTest); + } + + float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) + { + float3 f; + f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); + f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); + f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); + + return CalcTriEdgeTessFactors (f); + } + + float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + return tess; + } + + float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) + { + float3 pos0 = mul(o2w,v0).xyz; + float3 pos1 = mul(o2w,v1).xyz; + float3 pos2 = mul(o2w,v2).xyz; + float4 tess; + + if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) + { + tess = 0.0f; + } + else + { + tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); + tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); + tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); + tess.w = (tess.x + tess.y + tess.z) / 3.0f; + } + return tess; + } + #endif //ASE_TESS_FUNCS + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend SrcAlpha [_Dst], One OneMinusSrcAlpha + ZWrite [_Zwrite] + ZTest [_ZTestMode] + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + #define REQUIRE_DEPTH_TEXTURE 1 + + + #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma shader_feature _ _SAMPLE_GI + #pragma multi_compile _ DEBUG_DISPLAY + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_UNLIT + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" + + #define ASE_NEEDS_VERT_NORMAL + #define ASE_NEEDS_FRAG_WORLD_POSITION + #define ASE_NEEDS_FRAG_COLOR + #pragma shader_feature _WPO_SWITCH_ON + #pragma shader_feature _LGTEXSWITCH_ON + #pragma shader_feature _FRESNEL_SWITCH_ON + #pragma shader_feature _DISSOLVE_SWITCH_ON + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + #ifdef ASE_FOG + float fogFactor : TEXCOORD2; + #endif + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_color : COLOR; + float4 ase_texcoord4 : TEXCOORD4; + float4 ase_texcoord5 : TEXCOORD5; + float4 ase_texcoord6 : TEXCOORD6; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _Dissolve_Tex_ST; + float4 _Main_Tex_Color; + float4 _LGColor; + float4 _Remap_Tex_ST; + float4 _LiuguangTex_ST; + float4 _Mask_Tex_ST; + float4 _Distortion_Tex_ST; + float4 _WPO_Tex_ST; + float4 _WPO_Tex_Direction; + float4 _Fresnel_Color; + float4 _Mask_Tex2_ST; + float4 _Main_Tex_ST; + float _Remap_Tex_ClampSwitch; + float _Remap_Tex_U_speed; + float _Dissolve_Tex_Custom_X; + float _Dissolve_Tex_power; + float _Remap_Tex_Followl_Main_Tex; + float _Remap_Tex_Rotator; + float _Dissolve_Tex_A_R; + float _Remap_Tex_V_speed; + float _SoftParticle; + float _Main_Tex_A_R; + float _Dissolve_Tex_Rotator; + float _Mask_Tex_U_speed; + float _Mask_Tex_V_speed; + float _Mask_Tex_Rotator; + float _Mask_Tex_ClampSwitch; + float _Mask_Tex_A_R; + float _Remap_Tex_A_R; + float _Mask_Tex_U_speed2; + float _Mask_Tex_V_speed2; + float _Mask_Tex_Rotator2; + float _Remap_Tex_Desaturate; + float _CullMode; + float _Fresnel_Bokeh; + float _Dissolve_Tex_U_speed; + float _ZTestMode; + float _Dst; + float _Zwrite; + float _WPO_tex_power; + float _WPO_CustomSwitch_Y; + float _WPO_Tex_U_speed; + float _WPO_Tex_V_speed; + float _LGTex_U_Speed; + float _LGTex_V_Speed; + float _LG_Tex_Rotator; + float _LiuguangTex_P; + float _UseLGTexColor; + float _Main_Tex_U_speed; + float _Main_Tex_V_speed; + float _Main_Tex_Custom_ZW; + float _Distortion_Tex_Power; + float _Distortion_Tex_U_speed; + float _Distortion_Tex_V_speed; + float _Distortion_Switch; + float _Main_Tex_Rotator; + float _Main_Tex_ClampSwitch; + float _Fresnel_power; + float _Fresnel_scale; + float _Mask_Tex_ClampSwitch2; + float _Dissolve_Tex_smooth; + float _Dissolve_Tex_V_speed; + float _Mask_Tex_A_R2; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _WPO_Tex; + sampler2D _LiuguangTex; + sampler2D _Main_Tex; + sampler2D _Distortion_Tex; + sampler2D _Dissolve_Tex; + sampler2D _Remap_Tex; + uniform float4 _CameraDepthTexture_TexelSize; + sampler2D _Mask_Tex; + sampler2D _Mask_Tex2; + + + + VertexOutput VertexFunction ( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + float4 temp_cast_0 = (0.0).xxxx; + float4 texCoord395 = v.ase_texcoord1; + texCoord395.xy = v.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); + float lerpResult398 = lerp( _WPO_tex_power , texCoord395.y , _WPO_CustomSwitch_Y); + float2 appendResult386 = (float2(_WPO_Tex_U_speed , _WPO_Tex_V_speed)); + float2 uv_WPO_Tex = v.ase_texcoord.xy * _WPO_Tex_ST.xy + _WPO_Tex_ST.zw; + float2 panner390 = ( 1.0 * _Time.y * appendResult386 + uv_WPO_Tex); + #ifdef _WPO_SWITCH_ON + float4 staticSwitch408 = ( lerpResult398 * float4( v.ase_normal , 0.0 ) * tex2Dlod( _WPO_Tex, float4( panner390, 0, 0.0) ) * _WPO_Tex_Direction ); + #else + float4 staticSwitch408 = temp_cast_0; + #endif + float4 Vertex117 = staticSwitch408; + + float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); + o.ase_texcoord5.xyz = ase_worldNormal; + + float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); + float4 screenPos = ComputeScreenPos(ase_clipPos); + o.ase_texcoord6 = screenPos; + + o.ase_texcoord3.xy = v.ase_texcoord.xy; + o.ase_color = v.ase_color; + o.ase_texcoord4 = v.ase_texcoord1; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord3.zw = 0; + o.ase_texcoord5.w = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = Vertex117.rgb; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = positionCS; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + #ifdef ASE_FOG + o.fogFactor = ComputeFogFactor( positionCS.z ); + #endif + + o.clipPos = positionCS; + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord1 = v.ase_texcoord1; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag ( VertexOutput IN ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID( IN ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float4 temp_cast_0 = (0.0).xxxx; + float2 appendResult509 = (float2(_LGTex_U_Speed , _LGTex_V_Speed)); + float2 uv_LiuguangTex = IN.ase_texcoord3.xy * _LiuguangTex_ST.xy + _LiuguangTex_ST.zw; + float2 panner514 = ( 1.0 * _Time.y * appendResult509 + uv_LiuguangTex); + float cos510 = cos( ( ( _LG_Tex_Rotator * PI ) / 180.0 ) ); + float sin510 = sin( ( ( _LG_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator510 = mul( panner514 - float2( 0.5,0.5 ) , float2x2( cos510 , -sin510 , sin510 , cos510 )) + float2( 0.5,0.5 ); + float4 tex2DNode521 = tex2D( _LiuguangTex, rotator510 ); + float3 appendResult537 = (float3(tex2DNode521.r , tex2DNode521.g , tex2DNode521.b)); + float lerpResult523 = lerp( tex2DNode521.r , tex2DNode521.a , _LiuguangTex_P); + float4 lerpResult528 = lerp( ( float4( ( appendResult537 * lerpResult523 ) , 0.0 ) * _LGColor ) , ( lerpResult523 * _LGColor ) , _UseLGTexColor); + #ifdef _LGTEXSWITCH_ON + float4 staticSwitch532 = lerpResult528; + #else + float4 staticSwitch532 = temp_cast_0; + #endif + float4 liuguang524 = staticSwitch532; + float2 appendResult298 = (float2(( _Main_Tex_U_speed * _TimeParameters.x ) , ( _TimeParameters.x * _Main_Tex_V_speed ))); + float2 uv_Main_Tex = IN.ase_texcoord3.xy * _Main_Tex_ST.xy + _Main_Tex_ST.zw; + float4 texCoord288 = IN.ase_texcoord4; + texCoord288.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 ); + float2 appendResult301 = (float2(texCoord288.z , texCoord288.w)); + float2 lerpResult308 = lerp( ( frac( appendResult298 ) + uv_Main_Tex ) , ( uv_Main_Tex + appendResult301 ) , _Main_Tex_Custom_ZW); + float2 appendResult283 = (float2(_Distortion_Tex_U_speed , _Distortion_Tex_V_speed)); + float2 uv_Distortion_Tex = IN.ase_texcoord3.xy * _Distortion_Tex_ST.xy + _Distortion_Tex_ST.zw; + float2 panner286 = ( 1.0 * _Time.y * appendResult283 + uv_Distortion_Tex); + float lerpResult309 = lerp( 0.0 , ( _Distortion_Tex_Power * (-0.5 + (tex2D( _Distortion_Tex, panner286 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) ) , _Distortion_Switch); + float2 ONE214 = ( lerpResult308 + lerpResult309 ); + float cos321 = cos( ( ( _Main_Tex_Rotator * PI ) / 180.0 ) ); + float sin321 = sin( ( ( _Main_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator321 = mul( ONE214 - float2( 0.5,0.5 ) , float2x2( cos321 , -sin321 , sin321 , cos321 )) + float2( 0.5,0.5 ); + float2 lerpResult411 = lerp( rotator321 , saturate( rotator321 ) , _Main_Tex_ClampSwitch); + float4 tex2DNode1 = tex2D( _Main_Tex, lerpResult411 ); + float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition ); + ase_worldViewDir = normalize(ase_worldViewDir); + float3 ase_worldNormal = IN.ase_texcoord5.xyz; + float dotResult343 = dot( ase_worldViewDir , ase_worldNormal ); + float smoothstepResult438 = smoothstep( 0.0 , 1.0 , ( 1.0 - saturate( abs( dotResult343 ) ) )); + float temp_output_363_0 = ( pow( smoothstepResult438 , _Fresnel_power ) * ( _Fresnel_scale * 1 ) ); + float lerpResult370 = lerp( temp_output_363_0 , ( 1.0 - temp_output_363_0 ) , _Fresnel_Bokeh); + #ifdef _FRESNEL_SWITCH_ON + float staticSwitch372 = lerpResult370; + #else + float staticSwitch372 = 1.0; + #endif + float2 appendResult342 = (float2(_Dissolve_Tex_U_speed , _Dissolve_Tex_V_speed)); + float2 uv_Dissolve_Tex = IN.ase_texcoord3.xy * _Dissolve_Tex_ST.xy + _Dissolve_Tex_ST.zw; + float cos430 = cos( ( ( _Dissolve_Tex_Rotator * PI ) / 180.0 ) ); + float sin430 = sin( ( ( _Dissolve_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator430 = mul( uv_Dissolve_Tex - float2( 0.5,0.5 ) , float2x2( cos430 , -sin430 , sin430 , cos430 )) + float2( 0.5,0.5 ); + float2 panner346 = ( 1.0 * _Time.y * appendResult342 + rotator430); + float4 tex2DNode353 = tex2D( _Dissolve_Tex, panner346 ); + float lerpResult417 = lerp( tex2DNode353.r , tex2DNode353.a , _Dissolve_Tex_A_R); + float five300 = texCoord288.x; + float lerpResult351 = lerp( _Dissolve_Tex_power , five300 , _Dissolve_Tex_Custom_X); + float smoothstepResult368 = smoothstep( ( 1.0 - _Dissolve_Tex_smooth ) , _Dissolve_Tex_smooth , saturate( ( ( lerpResult417 + 1.0 ) - ( lerpResult351 * 2.0 ) ) )); + #ifdef _DISSOLVE_SWITCH_ON + float staticSwitch371 = smoothstepResult368; + #else + float staticSwitch371 = 1.0; + #endif + float4 four222 = ( staticSwitch372 * staticSwitch371 * _Fresnel_Color ); + float2 appendResult420 = (float2(_Remap_Tex_U_speed , _Remap_Tex_V_speed)); + float2 uv_Remap_Tex = IN.ase_texcoord3.xy * _Remap_Tex_ST.xy + _Remap_Tex_ST.zw; + float2 panner421 = ( 1.0 * _Time.y * appendResult420 + uv_Remap_Tex); + float2 temp_cast_2 = (0.0).xx; + float2 GAM_MAIN_Move446 = appendResult301; + float2 lerpResult448 = lerp( temp_cast_2 , GAM_MAIN_Move446 , _Remap_Tex_Followl_Main_Tex); + float cos399 = cos( ( ( _Remap_Tex_Rotator * PI ) / 180.0 ) ); + float sin399 = sin( ( ( _Remap_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator399 = mul( ( panner421 + lerpResult448 ) - float2( 0.5,0.5 ) , float2x2( cos399 , -sin399 , sin399 , cos399 )) + float2( 0.5,0.5 ); + float2 lerpResult433 = lerp( rotator399 , saturate( rotator399 ) , _Remap_Tex_ClampSwitch); + float4 tex2DNode406 = tex2D( _Remap_Tex, ( lerpResult309 + lerpResult433 ) ); + float3 desaturateInitialColor441 = tex2DNode406.rgb; + float desaturateDot441 = dot( desaturateInitialColor441, float3( 0.299, 0.587, 0.114 )); + float3 desaturateVar441 = lerp( desaturateInitialColor441, desaturateDot441.xxx, _Remap_Tex_Desaturate ); + float3 appendResult425 = (float3(desaturateVar441)); + float3 Gam258 = appendResult425; + + float lerpResult409 = lerp( tex2DNode1.r , tex2DNode1.a , _Main_Tex_A_R); + float Three217 = ( staticSwitch372 * _Fresnel_Color.a * staticSwitch371 ); + float4 screenPos = IN.ase_texcoord6; + float4 ase_screenPosNorm = screenPos / screenPos.w; + ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; + float screenDepth393 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); + float distanceDepth393 = abs( ( screenDepth393 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _SoftParticle ) ); + float soft219 = saturate( distanceDepth393 ); + float2 appendResult332 = (float2(_Mask_Tex_U_speed , _Mask_Tex_V_speed)); + float2 uv_Mask_Tex = IN.ase_texcoord3.xy * _Mask_Tex_ST.xy + _Mask_Tex_ST.zw; + float2 panner334 = ( 1.0 * _Time.y * appendResult332 + uv_Mask_Tex); + float cos335 = cos( ( ( _Mask_Tex_Rotator * PI ) / 180.0 ) ); + float sin335 = sin( ( ( _Mask_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator335 = mul( panner334 - float2( 0.5,0.5 ) , float2x2( cos335 , -sin335 , sin335 , cos335 )) + float2( 0.5,0.5 ); + float2 lerpResult413 = lerp( rotator335 , saturate( rotator335 ) , _Mask_Tex_ClampSwitch); + float4 tex2DNode327 = tex2D( _Mask_Tex, lerpResult413 ); + float lerpResult453 = lerp( tex2DNode327.r , tex2DNode327.a , _Mask_Tex_A_R); + float two215 = lerpResult453; + float lerpResult432 = lerp( tex2DNode406.r , tex2DNode406.a , _Remap_Tex_A_R); + float2 appendResult490 = (float2(_Mask_Tex_U_speed2 , _Mask_Tex_V_speed2)); + float2 uv_Mask_Tex2 = IN.ase_texcoord3.xy * _Mask_Tex2_ST.xy + _Mask_Tex2_ST.zw; + float2 panner492 = ( 1.0 * _Time.y * appendResult490 + uv_Mask_Tex2); + float cos493 = cos( ( ( _Mask_Tex_Rotator2 * PI ) / 180.0 ) ); + float sin493 = sin( ( ( _Mask_Tex_Rotator2 * PI ) / 180.0 ) ); + float2 rotator493 = mul( panner492 - float2( 0.5,0.5 ) , float2x2( cos493 , -sin493 , sin493 , cos493 )) + float2( 0.5,0.5 ); + float2 lerpResult495 = lerp( rotator493 , saturate( rotator493 ) , _Mask_Tex_ClampSwitch2); + float4 tex2DNode498 = tex2D( _Mask_Tex2, lerpResult495 ); + float lerpResult496 = lerp( tex2DNode498.r , tex2DNode498.a , _Mask_Tex_A_R2); + float mask2503 = lerpResult496; + + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( liuguang524 + ( IN.ase_color * ( _Main_Tex_Color * tex2DNode1 ) * four222 * float4( Gam258 , 0.0 ) ) ).rgb; + float Alpha = ( IN.ase_color.a * _Main_Tex_Color.a * lerpResult409 * Three217 * soft219 * two215 * lerpResult432 * mask2503 ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #ifdef _ALPHATEST_ON + clip( Alpha - AlphaClipThreshold ); + #endif + + #if defined(_DBUFFER) + ApplyDecalToBaseColor(IN.clipPos, Color); + #endif + + #if defined(_ALPHAPREMULTIPLY_ON) + Color *= Alpha; + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + + #ifdef ASE_FOG + Color = MixFog( Color, IN.fogFactor ); + #endif + + return half4( Color, Alpha ); + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _RECEIVE_SHADOWS_OFF 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_SRP_VERSION 120111 + #define REQUIRE_DEPTH_TEXTURE 1 + + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + + #define ASE_NEEDS_VERT_NORMAL + #define ASE_NEEDS_FRAG_WORLD_POSITION + #pragma shader_feature _WPO_SWITCH_ON + #pragma shader_feature _FRESNEL_SWITCH_ON + #pragma shader_feature _DISSOLVE_SWITCH_ON + + + struct VertexInput + { + float4 vertex : POSITION; + float3 ase_normal : NORMAL; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct VertexOutput + { + float4 clipPos : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 worldPos : TEXCOORD0; + #endif + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + float4 shadowCoord : TEXCOORD1; + #endif + float4 ase_color : COLOR; + float4 ase_texcoord2 : TEXCOORD2; + float4 ase_texcoord3 : TEXCOORD3; + float4 ase_texcoord4 : TEXCOORD4; + float4 ase_texcoord5 : TEXCOORD5; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _Dissolve_Tex_ST; + float4 _Main_Tex_Color; + float4 _LGColor; + float4 _Remap_Tex_ST; + float4 _LiuguangTex_ST; + float4 _Mask_Tex_ST; + float4 _Distortion_Tex_ST; + float4 _WPO_Tex_ST; + float4 _WPO_Tex_Direction; + float4 _Fresnel_Color; + float4 _Mask_Tex2_ST; + float4 _Main_Tex_ST; + float _Remap_Tex_ClampSwitch; + float _Remap_Tex_U_speed; + float _Dissolve_Tex_Custom_X; + float _Dissolve_Tex_power; + float _Remap_Tex_Followl_Main_Tex; + float _Remap_Tex_Rotator; + float _Dissolve_Tex_A_R; + float _Remap_Tex_V_speed; + float _SoftParticle; + float _Main_Tex_A_R; + float _Dissolve_Tex_Rotator; + float _Mask_Tex_U_speed; + float _Mask_Tex_V_speed; + float _Mask_Tex_Rotator; + float _Mask_Tex_ClampSwitch; + float _Mask_Tex_A_R; + float _Remap_Tex_A_R; + float _Mask_Tex_U_speed2; + float _Mask_Tex_V_speed2; + float _Mask_Tex_Rotator2; + float _Remap_Tex_Desaturate; + float _CullMode; + float _Fresnel_Bokeh; + float _Dissolve_Tex_U_speed; + float _ZTestMode; + float _Dst; + float _Zwrite; + float _WPO_tex_power; + float _WPO_CustomSwitch_Y; + float _WPO_Tex_U_speed; + float _WPO_Tex_V_speed; + float _LGTex_U_Speed; + float _LGTex_V_Speed; + float _LG_Tex_Rotator; + float _LiuguangTex_P; + float _UseLGTexColor; + float _Main_Tex_U_speed; + float _Main_Tex_V_speed; + float _Main_Tex_Custom_ZW; + float _Distortion_Tex_Power; + float _Distortion_Tex_U_speed; + float _Distortion_Tex_V_speed; + float _Distortion_Switch; + float _Main_Tex_Rotator; + float _Main_Tex_ClampSwitch; + float _Fresnel_power; + float _Fresnel_scale; + float _Mask_Tex_ClampSwitch2; + float _Dissolve_Tex_smooth; + float _Dissolve_Tex_V_speed; + float _Mask_Tex_A_R2; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + sampler2D _WPO_Tex; + sampler2D _Main_Tex; + sampler2D _Distortion_Tex; + sampler2D _Dissolve_Tex; + uniform float4 _CameraDepthTexture_TexelSize; + sampler2D _Mask_Tex; + sampler2D _Remap_Tex; + sampler2D _Mask_Tex2; + + + + VertexOutput VertexFunction( VertexInput v ) + { + VertexOutput o = (VertexOutput)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + float4 temp_cast_0 = (0.0).xxxx; + float4 texCoord395 = v.ase_texcoord1; + texCoord395.xy = v.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); + float lerpResult398 = lerp( _WPO_tex_power , texCoord395.y , _WPO_CustomSwitch_Y); + float2 appendResult386 = (float2(_WPO_Tex_U_speed , _WPO_Tex_V_speed)); + float2 uv_WPO_Tex = v.ase_texcoord.xy * _WPO_Tex_ST.xy + _WPO_Tex_ST.zw; + float2 panner390 = ( 1.0 * _Time.y * appendResult386 + uv_WPO_Tex); + #ifdef _WPO_SWITCH_ON + float4 staticSwitch408 = ( lerpResult398 * float4( v.ase_normal , 0.0 ) * tex2Dlod( _WPO_Tex, float4( panner390, 0, 0.0) ) * _WPO_Tex_Direction ); + #else + float4 staticSwitch408 = temp_cast_0; + #endif + float4 Vertex117 = staticSwitch408; + + float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); + o.ase_texcoord4.xyz = ase_worldNormal; + float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); + float4 screenPos = ComputeScreenPos(ase_clipPos); + o.ase_texcoord5 = screenPos; + + o.ase_color = v.ase_color; + o.ase_texcoord2.xy = v.ase_texcoord.xy; + o.ase_texcoord3 = v.ase_texcoord1; + + //setting value to unused interpolator channels and avoid initialization warnings + o.ase_texcoord2.zw = 0; + o.ase_texcoord4.w = 0; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + float3 defaultVertexValue = v.vertex.xyz; + #else + float3 defaultVertexValue = float3(0, 0, 0); + #endif + + float3 vertexValue = Vertex117.rgb; + + #ifdef ASE_ABSOLUTE_VERTEX_POS + v.vertex.xyz = vertexValue; + #else + v.vertex.xyz += vertexValue; + #endif + + v.ase_normal = v.ase_normal; + + float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + o.worldPos = positionWS; + #endif + + o.clipPos = TransformWorldToHClip( positionWS ); + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + VertexPositionInputs vertexInput = (VertexPositionInputs)0; + vertexInput.positionWS = positionWS; + vertexInput.positionCS = o.clipPos; + o.shadowCoord = GetShadowCoord( vertexInput ); + #endif + + return o; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 vertex : INTERNALTESSPOS; + float3 ase_normal : NORMAL; + float4 ase_texcoord1 : TEXCOORD1; + float4 ase_texcoord : TEXCOORD0; + float4 ase_color : COLOR; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( VertexInput v ) + { + VertexControl o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, o); + o.vertex = v.vertex; + o.ase_normal = v.ase_normal; + o.ase_texcoord1 = v.ase_texcoord1; + o.ase_texcoord = v.ase_texcoord; + o.ase_color = v.ase_color; + return o; + } + + TessellationFactors TessellationFunction (InputPatch v) + { + TessellationFactors o; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; + return o; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + VertexInput o = (VertexInput) 0; + o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; + o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; + o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z; + o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); + float phongStrength = _TessPhongStrength; + o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], o); + return VertexFunction(o); + } + #else + VertexOutput vert ( VertexInput v ) + { + return VertexFunction( v ); + } + #endif + + half4 frag(VertexOutput IN ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(IN); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 WorldPosition = IN.worldPos; + #endif + + float4 ShadowCoords = float4( 0, 0, 0, 0 ); + + #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) + #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) + ShadowCoords = IN.shadowCoord; + #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) + ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); + #endif + #endif + + float2 appendResult298 = (float2(( _Main_Tex_U_speed * _TimeParameters.x ) , ( _TimeParameters.x * _Main_Tex_V_speed ))); + float2 uv_Main_Tex = IN.ase_texcoord2.xy * _Main_Tex_ST.xy + _Main_Tex_ST.zw; + float4 texCoord288 = IN.ase_texcoord3; + texCoord288.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); + float2 appendResult301 = (float2(texCoord288.z , texCoord288.w)); + float2 lerpResult308 = lerp( ( frac( appendResult298 ) + uv_Main_Tex ) , ( uv_Main_Tex + appendResult301 ) , _Main_Tex_Custom_ZW); + float2 appendResult283 = (float2(_Distortion_Tex_U_speed , _Distortion_Tex_V_speed)); + float2 uv_Distortion_Tex = IN.ase_texcoord2.xy * _Distortion_Tex_ST.xy + _Distortion_Tex_ST.zw; + float2 panner286 = ( 1.0 * _Time.y * appendResult283 + uv_Distortion_Tex); + float lerpResult309 = lerp( 0.0 , ( _Distortion_Tex_Power * (-0.5 + (tex2D( _Distortion_Tex, panner286 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0)) ) , _Distortion_Switch); + float2 ONE214 = ( lerpResult308 + lerpResult309 ); + float cos321 = cos( ( ( _Main_Tex_Rotator * PI ) / 180.0 ) ); + float sin321 = sin( ( ( _Main_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator321 = mul( ONE214 - float2( 0.5,0.5 ) , float2x2( cos321 , -sin321 , sin321 , cos321 )) + float2( 0.5,0.5 ); + float2 lerpResult411 = lerp( rotator321 , saturate( rotator321 ) , _Main_Tex_ClampSwitch); + float4 tex2DNode1 = tex2D( _Main_Tex, lerpResult411 ); + float lerpResult409 = lerp( tex2DNode1.r , tex2DNode1.a , _Main_Tex_A_R); + float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition ); + ase_worldViewDir = normalize(ase_worldViewDir); + float3 ase_worldNormal = IN.ase_texcoord4.xyz; + float dotResult343 = dot( ase_worldViewDir , ase_worldNormal ); + float smoothstepResult438 = smoothstep( 0.0 , 1.0 , ( 1.0 - saturate( abs( dotResult343 ) ) )); + float temp_output_363_0 = ( pow( smoothstepResult438 , _Fresnel_power ) * ( _Fresnel_scale * 1 ) ); + float lerpResult370 = lerp( temp_output_363_0 , ( 1.0 - temp_output_363_0 ) , _Fresnel_Bokeh); + #ifdef _FRESNEL_SWITCH_ON + float staticSwitch372 = lerpResult370; + #else + float staticSwitch372 = 1.0; + #endif + float2 appendResult342 = (float2(_Dissolve_Tex_U_speed , _Dissolve_Tex_V_speed)); + float2 uv_Dissolve_Tex = IN.ase_texcoord2.xy * _Dissolve_Tex_ST.xy + _Dissolve_Tex_ST.zw; + float cos430 = cos( ( ( _Dissolve_Tex_Rotator * PI ) / 180.0 ) ); + float sin430 = sin( ( ( _Dissolve_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator430 = mul( uv_Dissolve_Tex - float2( 0.5,0.5 ) , float2x2( cos430 , -sin430 , sin430 , cos430 )) + float2( 0.5,0.5 ); + float2 panner346 = ( 1.0 * _Time.y * appendResult342 + rotator430); + float4 tex2DNode353 = tex2D( _Dissolve_Tex, panner346 ); + float lerpResult417 = lerp( tex2DNode353.r , tex2DNode353.a , _Dissolve_Tex_A_R); + float five300 = texCoord288.x; + float lerpResult351 = lerp( _Dissolve_Tex_power , five300 , _Dissolve_Tex_Custom_X); + float smoothstepResult368 = smoothstep( ( 1.0 - _Dissolve_Tex_smooth ) , _Dissolve_Tex_smooth , saturate( ( ( lerpResult417 + 1.0 ) - ( lerpResult351 * 2.0 ) ) )); + #ifdef _DISSOLVE_SWITCH_ON + float staticSwitch371 = smoothstepResult368; + #else + float staticSwitch371 = 1.0; + #endif + float Three217 = ( staticSwitch372 * _Fresnel_Color.a * staticSwitch371 ); + float4 screenPos = IN.ase_texcoord5; + float4 ase_screenPosNorm = screenPos / screenPos.w; + ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; + float screenDepth393 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); + float distanceDepth393 = abs( ( screenDepth393 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _SoftParticle ) ); + float soft219 = saturate( distanceDepth393 ); + float2 appendResult332 = (float2(_Mask_Tex_U_speed , _Mask_Tex_V_speed)); + float2 uv_Mask_Tex = IN.ase_texcoord2.xy * _Mask_Tex_ST.xy + _Mask_Tex_ST.zw; + float2 panner334 = ( 1.0 * _Time.y * appendResult332 + uv_Mask_Tex); + float cos335 = cos( ( ( _Mask_Tex_Rotator * PI ) / 180.0 ) ); + float sin335 = sin( ( ( _Mask_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator335 = mul( panner334 - float2( 0.5,0.5 ) , float2x2( cos335 , -sin335 , sin335 , cos335 )) + float2( 0.5,0.5 ); + float2 lerpResult413 = lerp( rotator335 , saturate( rotator335 ) , _Mask_Tex_ClampSwitch); + float4 tex2DNode327 = tex2D( _Mask_Tex, lerpResult413 ); + float lerpResult453 = lerp( tex2DNode327.r , tex2DNode327.a , _Mask_Tex_A_R); + float two215 = lerpResult453; + float2 appendResult420 = (float2(_Remap_Tex_U_speed , _Remap_Tex_V_speed)); + float2 uv_Remap_Tex = IN.ase_texcoord2.xy * _Remap_Tex_ST.xy + _Remap_Tex_ST.zw; + float2 panner421 = ( 1.0 * _Time.y * appendResult420 + uv_Remap_Tex); + float2 temp_cast_0 = (0.0).xx; + float2 GAM_MAIN_Move446 = appendResult301; + float2 lerpResult448 = lerp( temp_cast_0 , GAM_MAIN_Move446 , _Remap_Tex_Followl_Main_Tex); + float cos399 = cos( ( ( _Remap_Tex_Rotator * PI ) / 180.0 ) ); + float sin399 = sin( ( ( _Remap_Tex_Rotator * PI ) / 180.0 ) ); + float2 rotator399 = mul( ( panner421 + lerpResult448 ) - float2( 0.5,0.5 ) , float2x2( cos399 , -sin399 , sin399 , cos399 )) + float2( 0.5,0.5 ); + float2 lerpResult433 = lerp( rotator399 , saturate( rotator399 ) , _Remap_Tex_ClampSwitch); + float4 tex2DNode406 = tex2D( _Remap_Tex, ( lerpResult309 + lerpResult433 ) ); + float lerpResult432 = lerp( tex2DNode406.r , tex2DNode406.a , _Remap_Tex_A_R); + float2 appendResult490 = (float2(_Mask_Tex_U_speed2 , _Mask_Tex_V_speed2)); + float2 uv_Mask_Tex2 = IN.ase_texcoord2.xy * _Mask_Tex2_ST.xy + _Mask_Tex2_ST.zw; + float2 panner492 = ( 1.0 * _Time.y * appendResult490 + uv_Mask_Tex2); + float cos493 = cos( ( ( _Mask_Tex_Rotator2 * PI ) / 180.0 ) ); + float sin493 = sin( ( ( _Mask_Tex_Rotator2 * PI ) / 180.0 ) ); + float2 rotator493 = mul( panner492 - float2( 0.5,0.5 ) , float2x2( cos493 , -sin493 , sin493 , cos493 )) + float2( 0.5,0.5 ); + float2 lerpResult495 = lerp( rotator493 , saturate( rotator493 ) , _Mask_Tex_ClampSwitch2); + float4 tex2DNode498 = tex2D( _Mask_Tex2, lerpResult495 ); + float lerpResult496 = lerp( tex2DNode498.r , tex2DNode498.a , _Mask_Tex_A_R2); + float mask2503 = lerpResult496; + + + float Alpha = ( IN.ase_color.a * _Main_Tex_Color.a * lerpResult409 * Three217 * soft219 * two215 * lerpResult432 * mask2503 ); + float AlphaClipThreshold = 0.5; + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #ifdef LOD_FADE_CROSSFADE + LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); + #endif + return 0; + } + ENDHLSL + } + + + } + + CustomEditor "Soung_ShaderGUI_URP" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19105 +Node;AmplifyShaderEditor.CommentaryNode;277;-2998.344,-1601.401;Inherit;False;1344.04;453.14;UV流动;17;308;306;305;302;301;300;298;297;293;289;288;287;285;284;443;446;465;主帖图;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;276;-3004.946,-1143.765;Inherit;False;1363.104;498.9412;扭曲;15;310;309;307;304;303;299;292;286;283;282;281;280;278;457;458;扭曲;1,1,1,1;0;0 +Node;AmplifyShaderEditor.CommentaryNode;336;-4033.097,437.3795;Inherit;False;2440.182;539.9002;溶解;33;346;342;340;339;217;374;371;368;367;384;364;366;360;361;357;355;417;349;351;352;347;344;348;353;416;341;430;426;428;427;429;463;464;软溶解;1,1,1,1;0;0 +Node;AmplifyShaderEditor.DynamicAppendNode;301;-2746.481,-1244.668;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.PiNode;427;-3785.89,822.5604;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;465;-2563.128,-1180.862;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.DynamicAppendNode;283;-2761.389,-789.2109;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.CommentaryNode;380;-2645.585,990.184;Inherit;False;2230.076;510.9691;Gam;30;406;431;442;432;258;425;441;433;435;434;399;461;450;421;460;462;420;396;391;459;419;389;448;418;385;451;447;449;381;476;颜色叠加;1,1,1,1;0;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;429;-3581.36,827.6313;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;458;-2611.134,-879.364;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.CommentaryNode;378;-3814.854,-150.4367;Inherit;False;2203.762;580.8257;菲尼尔;23;438;222;375;373;372;369;370;437;436;365;363;362;359;356;354;358;350;345;343;338;337;440;439;菲涅尔边缘;1,1,1,1;0;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;446;-2068.261,-1221.425;Inherit;False;GAM_MAIN_Move;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;451;-2423.49,1289.231;Inherit;False;Constant;_Float14;Float 14;54;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;282;-2993.48,-1081.163;Inherit;False;0;292;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.WireNode;457;-2767.974,-938.0294;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.GetLocalVarNode;447;-2641.586,1332.917;Inherit;False;446;GAM_MAIN_Move;1;0;OBJECT;;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.WireNode;464;-3469.769,714.5999;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleTimeNode;287;-2938.566,-1466.115;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;293;-2691.157,-1520.45;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;463;-3779.769,693.5999;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;289;-2691.335,-1418.288;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.PannerNode;286;-2672.053,-1077.006;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;341;-3990.308,495.4476;Inherit;False;0;353;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;385;-1973.169,1281.531;Inherit;False;Constant;_Float12;Float 12;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.PiNode;389;-2009.005,1211.771;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;448;-2284.289,1308.933;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.CommentaryNode;278;-2316.67,-912.8144;Inherit;False;250.2743;263.226;映射;1;296;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.RotatorNode;430;-3767.982,498.9272;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;396;-1810.418,1262.918;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;391;-2568.245,1031.97;Inherit;False;0;406;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.WireNode;459;-2053.545,1207.278;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.DynamicAppendNode;420;-2396.364,1196.357;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.DynamicAppendNode;342;-3722.916,624.2188;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.TextureCoordinatesNode;297;-2548.713,-1402.201;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.PannerNode;346;-3555.99,503.1738;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;300;-2770.076,-1321.417;Inherit;False;five;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TFHCRemapNode;296;-2251.354,-832.7675;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;-0.5;False;4;FLOAT;0.5;False;1;FLOAT;0 +Node;AmplifyShaderEditor.CommentaryNode;311;-3804.278,-629.8517;Inherit;False;1804.608;470.3787;MASK;17;215;327;413;414;325;335;324;334;331;332;333;323;322;330;329;452;453;遮罩;1,1,1,1;0;0 +Node;AmplifyShaderEditor.WireNode;462;-1719.546,1196.278;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;460;-2192.546,1167.279;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.PannerNode;421;-2349.207,1044.887;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.GetLocalVarNode;347;-3413.464,790.8551;Inherit;False;300;five;1;0;OBJECT;;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;305;-2271.222,-1467.394;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;307;-2041.886,-860.3583;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;302;-2263.272,-1347.513;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;303;-1983.567,-942.4549;Inherit;False;Constant;_Float4;Float 4;43;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;461;-2024.545,1164.279;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;450;-2138.118,1042.852;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.LerpOp;308;-2033.979,-1467.467;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.LerpOp;351;-3234.978,749.1977;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.CommentaryNode;312;-1992.634,-631.6931;Inherit;False;353.1464;462.3351;旋转;6;319;318;316;317;320;321;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.LerpOp;309;-1854.461,-868.8378;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.CommentaryNode;379;-4038.124,985.776;Inherit;False;1357.064;513.0515;顶点偏移;17;117;408;405;404;397;402;398;401;392;395;390;394;386;387;382;383;456;顶点偏移;1,1,1,1;0;0 +Node;AmplifyShaderEditor.RotatorNode;399;-1982.796,1041.787;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.LerpOp;417;-2967.53,495.3727;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;310;-1754.733,-1106.798;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;357;-3065.048,748.7742;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;355;-2780.357,492.9502;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;434;-1789.223,1127.729;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.DynamicAppendNode;386;-3819.563,1351.923;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.SimpleSubtractOpNode;360;-2672.912,492.6289;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;387;-4015.871,1207.07;Inherit;False;0;397;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.PiNode;317;-1807.319,-472.5045;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;433;-1640.485,1051.195;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;476;-1414.547,1056.547;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;320;-1758.598,-284.0762;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;366;-2543.004,491.4722;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;319;-1978.921,-596.9757;Inherit;False;214;ONE;1;0;OBJECT;;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.PannerNode;390;-3678.016,1328.524;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.CommentaryNode;384;-2471.202,843.675;Inherit;False;864.7548;118.4831;软粒子;4;400;393;388;219;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.OneMinusNode;364;-2546.315,578.2346;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.NormalVertexDataNode;401;-3424.758,1148.736;Inherit;False;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SmoothstepOpNode;368;-2409.182,551.9802;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.CommentaryNode;272;-1519.365,-574.176;Inherit;False;317.8248;263.5372;Clamp;2;314;411;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.RangedFloatNode;367;-2390.737,477.1368;Inherit;False;Constant;_Float8;Float 8;14;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;369;-2348.08,-109.8452;Inherit;False;Constant;_Float9;Float 9;35;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;398;-3395.739,1029.807;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RotatorNode;321;-1819.908,-592.9556;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SaturateNode;314;-1498.292,-478.201;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;405;-3082.053,1070.546;Inherit;False;Constant;_Float5;Float 5;30;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.DepthFade;393;-2176.349,868.8671;Inherit;False;True;False;True;2;1;FLOAT3;0,0,0;False;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.DesaturateOpNode;441;-960.3836,1038.185;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;404;-3084.891,1153.761;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;2;COLOR;0,0,0,0;False;3;FLOAT4;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.LerpOp;411;-1346.54,-529.9504;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;374;-1887.078,498.9161;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;400;-1931.391,890.4071;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;375;-1788.698,-75.74274;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.DynamicAppendNode;425;-768.143,1038.969;Inherit;False;FLOAT3;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;222;-1651.099,-59.50719;Inherit;False;four;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.CommentaryNode;141;-684.8089,-318.4375;Inherit;False;473.0941;444.9443;ALPHA模式连到不透明度,ADD模式连到Emission;6;506;218;220;216;257;137;;1,1,1,1;0;0 +Node;AmplifyShaderEditor.WireNode;456;-2750.186,1300.194;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;219;-1788.901,882.9451;Inherit;False;soft;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;217;-1790.037,699.8013;Inherit;False;Three;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;258;-598.0679,1035.221;Inherit;False;Gam;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.LerpOp;409;-843.8145,-337.8983;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;474;-803.1,-641.7573;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.LerpOp;432;-765.6511,1118.276;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;117;-2871.313,1410.971;Inherit;False;Vertex;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.VertexColorNode;3;-1332.854,-925.3873;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;137;-342.4396,-248.8481;Inherit;False;8;8;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;284;-2944.966,-1538.257;Inherit;False;Property;_Main_Tex_U_speed;主帖图U方向速率;11;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;285;-2944.959,-1393.85;Inherit;False;Property;_Main_Tex_V_speed;主帖图V方向速率;12;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;288;-2981.137,-1319.762;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.DynamicAppendNode;298;-2544.448,-1495.251;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.FractNode;443;-2420.229,-1479.481;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;306;-2324.935,-1245.67;Inherit;False;Property;_Main_Tex_Custom_ZW;主帖图UV流动方式;8;1;[Enum];Create;False;0;2;Normal;0;Custom1zw;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;281;-2990.232,-801.7194;Inherit;False;Property;_Distortion_Tex_U_speed;扭曲U方向速率;53;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;292;-2501.396,-1105.782;Inherit;True;Property;_Distortion_Tex;扭曲贴图;50;1;[Header];Create;False;1;Distortion_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;299;-2205.119,-994.6426;Inherit;False;Property;_Distortion_Tex_Power;扭曲强度;52;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;304;-2036.803,-726.1957;Inherit;False;Property;_Distortion_Switch;是否启用扭曲;51;1;[Enum];Create;False;0;2;OFF;0;ON;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;214;-1595.006,-1038.089;Inherit;False;ONE;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.ColorNode;2;-1373.281,-753.3946;Inherit;False;Property;_Main_Tex_Color;主帖图颜色;6;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;1;-1167.583,-557.4451;Inherit;True;Property;_Main_Tex;主帖图;5;1;[Header];Create;False;1;Main_Tex;0;0;False;0;False;-1;None;8c052a69009f25a45aff9f10624768f0;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;412;-1521.403,-214.0435;Inherit;False;Property;_Main_Tex_ClampSwitch;主帖图重铺模式;9;1;[Enum];Create;False;0;2;Repeat;0;Clmap;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;410;-1039,-176;Inherit;False;Property;_Main_Tex_A_R;主帖图通道;7;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;316;-1991.336,-426.3635;Inherit;False;Property;_Main_Tex_Rotator;主帖图旋转;10;1;[IntRange];Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;365;-2524.07,74.15598;Inherit;False;Property;_Fresnel_Bokeh;菲涅尔模式;57;1;[Enum];Create;False;0;2;Fresnel;0;Bokeh;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.ColorNode;373;-2382.336,172.6049;Inherit;False;Property;_Fresnel_Color;菲涅尔颜色;55;2;[HDR];[Header];Create;False;1;Fresnel;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;318;-1945.801,-271.8814;Inherit;False;Constant;_Float6;Float 6;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;340;-4016.331,619.3238;Inherit;False;Property;_Dissolve_Tex_U_speed;溶解U方向速率;48;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;339;-4024.446,708.5041;Inherit;False;Property;_Dissolve_Tex_V_speed;溶解V方向速率;49;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;428;-4013.727,890.405;Inherit;False;Constant;_Float13;Float 13;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;426;-4012.473,816.7159;Inherit;False;Property;_Dissolve_Tex_Rotator;溶解贴图旋转;45;1;[IntRange];Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;348;-3753.508,745.8126;Inherit;False;Property;_Dissolve_Tex_power;溶解进度;47;0;Create;False;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;344;-3469.378,890.2977;Inherit;False;Property;_Dissolve_Tex_Custom_X;是否Custom1x控制溶解;44;1;[Enum];Create;False;0;2;OFF;0;ON;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;352;-3214.908,863.3678;Inherit;False;Constant;_Float7;Float 7;11;0;Create;True;0;0;0;False;0;False;2;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;349;-3046.223,668.5835;Inherit;False;Constant;_Float3;Float 3;10;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;416;-3236.652,652.801;Inherit;False;Property;_Dissolve_Tex_A_R;溶解贴图通道;43;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;361;-2817.052,752.7044;Inherit;False;Property;_Dissolve_Tex_smooth;溶解平滑度;46;0;Create;False;0;0;0;False;0;False;0.5;0.5;0.5;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;388;-2457.605,884.2485;Inherit;False;Property;_SoftParticle;软粒子;4;0;Create;False;0;0;0;False;0;False;0;0;0;10;0;1;FLOAT;0 +Node;AmplifyShaderEditor.StaticSwitch;371;-2170.855,542.6441;Inherit;False;Property;_Dissolve_Switch;溶解开关;42;0;Create;False;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;False;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;392;-3580.795,1020.401;Inherit;False;Property;_WPO_tex_power;顶点偏移强度;63;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;395;-4008.534,1029.139;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;394;-3676.302,1136.529;Inherit;False;Property;_WPO_CustomSwitch_Y;顶点偏移模式;62;1;[Enum];Create;False;0;2;Normal;0;Custom1y;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;383;-4019.97,1337.638;Inherit;False;Property;_WPO_Tex_U_speed;顶点偏移U方向速率;65;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;382;-4020.07,1417.905;Inherit;False;Property;_WPO_Tex_V_speed;顶点偏移V方向速率;66;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;397;-3516.793,1298.851;Inherit;True;Property;_WPO_Tex;顶点偏移贴图;60;1;[Header];Create;False;1;Wpo_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.Vector4Node;402;-3235.426,1315.685;Inherit;False;Property;_WPO_Tex_Direction;顶点偏移轴向;64;0;Create;False;0;0;0;False;0;False;1,1,1,0;1,1,1,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.StaticSwitch;408;-2945.351,1125.468;Inherit;False;Property;_WPO_Switch;顶点偏移开关;61;0;Create;False;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;False;True;All;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.RangedFloatNode;431;-975.3214,1242.979;Inherit;False;Property;_Remap_Tex_A_R;颜色叠加贴图;15;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;442;-1410.709,1379.211;Inherit;False;Property;_Remap_Tex_Desaturate;颜色贴图去色;16;0;Create;False;0;2;OFF;0;ON;1;0;False;0;False;0;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;435;-1828.661,1391.364;Inherit;False;Property;_Remap_Tex_ClampSwitch;颜色叠加重铺模式;17;1;[Enum];Create;False;0;2;Repeat;0;Clmap;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;381;-2258.491,1210.566;Inherit;False;Property;_Remap_Tex_Rotator;颜色叠加旋转;18;1;[IntRange];Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;477;5.423859,-452.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;479;5.423859,-452.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;480;5.423859,-452.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;481;5.423859,-452.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;482;5.423859,-452.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;483;5.423859,-452.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;484;5.423859,-452.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;485;5.423859,-452.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;486;5.423859,-452.2598;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.GetLocalVarNode;118;-148.0443,-485.2741;Inherit;False;117;Vertex;1;0;OBJECT;;False;1;COLOR;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;478;37.42386,-630.2598;Float;False;True;-1;2;Soung_ShaderGUI_URP;0;13;A201-Shader/URP/特效全功能通用;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;True;True;0;True;_CullMode;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;True;True;2;5;False;;10;True;_Dst;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;True;True;2;True;_Zwrite;True;3;True;_ZTestMode;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;23;Surface;1;638392681618793454; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638392681594447111; Use Shadow Threshold;0;0;Receive Shadows;0;638392681600599158;GPU Instancing;0;638392681605634757;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;False;False;False;False;False;;False;0 +Node;AmplifyShaderEditor.RangedFloatNode;142;44.069,-379.7109;Inherit;False;Property;_CullMode;剔除模式;1;1;[Enum];Create;False;0;0;1;UnityEngine.Rendering.CullMode;True;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;238;44.8492,-300.8818;Inherit;False;Property;_ZTestMode;深度测试;2;1;[Enum];Create;False;0;2;Less or Equal;4;Always;8;0;True;0;False;4;4;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;135;42.5842,-458.7425;Inherit;False;Property;_Dst;混合模式;0;1;[Enum];Create;False;0;2;Additive;1;AlphaBlend;10;0;True;0;False;1;10;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;475;45.54739,-220.5479;Inherit;False;Property;_Zwrite;深度写入;3;1;[Enum];Create;False;0;2;ON;1;OFF;0;0;True;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;419;-2645.778,1164.462;Inherit;False;Property;_Remap_Tex_U_speed;颜色叠加U方向速率;19;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;418;-2639.893,1238.641;Inherit;False;Property;_Remap_Tex_V_speed;颜色叠加V方向速率;20;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;449;-2635.152,1413.84;Inherit;False;Property;_Remap_Tex_Followl_Main_Tex;跟随主贴图一次性UV移动;14;1;[Enum];Create;False;0;2;OFF;0;ON;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;353;-3368.6,468.483;Inherit;True;Property;_Dissolve_Tex;溶解贴图;41;1;[Header];Create;False;1;Dissolve_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SamplerNode;406;-1276.948,1031.885;Inherit;True;Property;_Remap_Tex;颜色叠加贴图;13;1;[Header];Create;False;1;Remap_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;323;-3767.229,-251.1057;Inherit;False;Constant;_Float11;Float 11;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;332;-3564.128,-453.428;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.TextureCoordinatesNode;331;-3774.49,-595.0944;Inherit;False;0;327;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.PannerNode;334;-3491.824,-590.861;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RotatorNode;335;-3315.981,-590.5401;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SaturateNode;325;-3147.291,-490.8478;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.LerpOp;413;-2961.542,-581.2285;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.LerpOp;453;-2394.517,-570.3816;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;280;-2992.672,-726.7501;Inherit;False;Property;_Distortion_Tex_V_speed;扭曲V方向速率;54;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;452;-2664.242,-405.5811;Inherit;False;Property;_Mask_Tex_A_R;遮罩贴图通道;23;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;327;-2778.896,-603.2476;Inherit;True;Property;_Mask_Tex;遮罩贴图;21;1;[Header];Create;False;1;Mask_Tex;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;330;-3770.411,-470.8815;Inherit;False;Property;_Mask_Tex_U_speed;遮罩贴图U方向速率;25;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;329;-3771.76,-395.7793;Inherit;False;Property;_Mask_Tex_V_speed;遮罩贴图V方向速率;26;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;322;-3765.975,-326.7947;Inherit;False;Property;_Mask_Tex_Rotator;遮罩贴图旋转;24;1;[IntRange];Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;414;-3240.689,-419.8793;Inherit;False;Property;_Mask_Tex_ClampSwitch;遮罩贴图重铺模式;22;1;[Enum];Create;False;0;2;Repeat;0;Clmap;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;215;-2183.766,-576.2316;Inherit;False;two;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.PiNode;333;-3500.369,-321.2846;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;324;-3292.821,-265.1875;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.CommentaryNode;488;-1455.79,178.3044;Inherit;False;1617.908;474.2787;MASK2;17;503;496;497;498;502;494;495;493;490;492;505;504;489;501;500;499;491;第二套遮罩;1,1,1,1;0;0 +Node;AmplifyShaderEditor.GetLocalVarNode;220;-650.8891,-119.8181;Inherit;False;219;soft;1;0;OBJECT;;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;218;-652.8101,-196.2242;Inherit;False;217;Three;1;0;OBJECT;;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;506;-652.6088,36.93958;Inherit;False;503;mask2;1;0;OBJECT;;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;216;-650.0829,-39.84761;Inherit;False;215;two;1;0;OBJECT;;False;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;257;-651.8455,-272.2664;Inherit;False;258;Gam;1;0;OBJECT;;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;491;-1435.102,220.8616;Inherit;False;0;498;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.CommentaryNode;507;-1534.693,-1664.691;Inherit;False;2281.229;512.0997;liuguang;23;513;510;514;515;518;524;532;533;528;529;530;525;526;537;522;550;523;521;512;508;509;517;516;流光;1,1,1,1;0;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;4;-149.4585,-652.1379;Inherit;False;4;4;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;FLOAT3;0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.GetLocalVarNode;223;-479.6807,-613.9042;Inherit;False;222;four;1;0;OBJECT;;False;1;COLOR;0 +Node;AmplifyShaderEditor.StaticSwitch;372;-2099.258,-82.22703;Inherit;False;Property;_Fresnel_Switch;菲涅尔开关;56;0;Create;False;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;False;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode;534;-32.98438,-747.2405;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.SamplerNode;521;-875.6127,-1625.787;Inherit;True;Property;_LiuguangTex;流光纹理;33;1;[Header];Create;False;1;Liuguang_Tex;0;0;False;0;False;-1;79c977b91bc684543ae9fb182956565f;79c977b91bc684543ae9fb182956565f;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.LerpOp;523;-551.0053,-1477.301;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;550;-387.2307,-1597.197;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.RangedFloatNode;522;-743.5593,-1435.02;Inherit;False;Property;_LiuguangTex_P;流光纹理通道;35;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;537;-551.7165,-1596.972;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0 +Node;AmplifyShaderEditor.ColorNode;526;-583.4078,-1355.331;Inherit;False;Property;_LGColor;流光颜色;37;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;525;-326.4786,-1376.71;Inherit;True;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;530;-245.4785,-1597.713;Inherit;True;2;2;0;FLOAT3;0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.LerpOp;528;91.52139,-1596.713;Inherit;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.RangedFloatNode;533;187.33,-1374.791;Inherit;False;Constant;_Float0;Float 0;67;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.StaticSwitch;532;335.9969,-1593.486;Inherit;False;Property;_LGTexSwitch;流光开关;34;0;Create;False;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;False;True;All;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;524;550.511,-1592.902;Inherit;False;liuguang;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 +Node;AmplifyShaderEditor.RangedFloatNode;516;-1511.926,-1478.921;Inherit;False;Property;_LGTex_U_Speed;流光U方向速率;39;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;517;-1512.275,-1402.818;Inherit;False;Property;_LGTex_V_Speed;流光V方向速率;40;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.DynamicAppendNode;509;-1341.643,-1456.467;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;508;-1509.744,-1248.145;Inherit;False;Constant;_Float16;Float 11;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.PiNode;512;-1240.884,-1322.324;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;518;-1512.49,-1326.834;Inherit;False;Property;_LG_Tex_Rotator;流光纹理旋转;36;1;[IntRange];Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode;515;-1515.005,-1602.134;Inherit;False;0;521;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.PannerNode;514;-1228.339,-1596.901;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;513;-1059.336,-1270.227;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RotatorNode;510;-1054.496,-1596.58;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;499;-1436.023,343.0743;Inherit;False;Property;_Mask_Tex_U_speed2;遮罩2U方向速率;31;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;500;-1436.372,418.1765;Inherit;False;Property;_Mask_Tex_V_speed2;遮罩2V方向速率;32;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;501;-1437.587,494.1611;Inherit;False;Property;_Mask_Tex_Rotator2;遮罩贴图2旋转;30;1;[IntRange];Create;False;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;489;-1438.841,569.8499;Inherit;False;Constant;_Float15;Float 11;13;0;Create;True;0;0;0;False;0;False;180;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.PiNode;504;-1169.981,499.6712;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode;505;-957.434,550.7681;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.PannerNode;492;-1155.436,225.095;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.DynamicAppendNode;490;-1259.74,366.5278;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.RotatorNode;493;-978.5941,225.416;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.LerpOp;495;-634.1548,225.5275;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.SaturateNode;494;-784.904,278.108;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 +Node;AmplifyShaderEditor.RangedFloatNode;502;-842.3019,349.0765;Inherit;False;Property;_Mask_Tex_ClampSwitch2;遮罩贴图2重铺模式;28;1;[Enum];Create;False;0;2;Repeat;0;Clmap;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode;498;-488.7085,224.2085;Inherit;True;Property;_Mask_Tex2;遮罩贴图2;27;1;[Header];Create;False;1;Mask_Tex2;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode;497;-487.655,414.9746;Inherit;False;Property;_Mask_Tex_A_R2;遮罩贴图2通道;29;1;[Enum];Create;False;0;2;R;0;A;1;0;False;0;False;0;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;496;-176.0298,301.0744;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RegisterLocalVarNode;503;-28.57886,296.1243;Inherit;False;mask2;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ViewDirInputsCoordNode;338;-3799.799,-102.4572;Inherit;False;World;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 +Node;AmplifyShaderEditor.WorldNormalVector;337;-3802.412,54.3049;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 +Node;AmplifyShaderEditor.DotProductOpNode;343;-3631.246,-96.2643;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.AbsOpNode;345;-3516.218,-97.0165;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode;350;-3403.849,-97.0945;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;356;-3276.303,-97.1749;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;439;-3616.201,3.17844;Inherit;False;Constant;_RimMin;RimMin;46;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;440;-3615.194,83.36541;Inherit;False;Constant;_RinMax;RinMax;47;0;Create;True;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SmoothstepOpNode;438;-3124.372,-96.5467;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ScaleNode;359;-2957.178,-2.13774;Inherit;False;1;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.PowerNode;362;-2957.638,-96.73124;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;354;-3129.516,25.77431;Inherit;False;Property;_Fresnel_power;菲涅尔强度;59;0;Create;False;0;0;0;False;0;False;5;5;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;358;-3132.441,105.9818;Inherit;False;Property;_Fresnel_scale;菲涅尔亮度;58;0;Create;False;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.OneMinusNode;436;-2688.125,-12.62701;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode;363;-2817.291,-96.52399;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.WireNode;437;-2554.976,-64.97628;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LerpOp;370;-2416.374,-38.74646;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode;529;-130.4782,-1372.711;Inherit;False;Property;_UseLGTexColor;是否禁用纹理自身颜色;38;1;[Toggle];Create;False;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.GetLocalVarNode;531;-200.5137,-751.6771;Inherit;False;524;liuguang;1;0;OBJECT;;False;1;COLOR;0 +WireConnection;301;0;288;3 +WireConnection;301;1;288;4 +WireConnection;427;0;426;0 +WireConnection;465;0;301;0 +WireConnection;283;0;281;0 +WireConnection;283;1;280;0 +WireConnection;429;0;427;0 +WireConnection;429;1;428;0 +WireConnection;458;0;283;0 +WireConnection;446;0;465;0 +WireConnection;457;0;458;0 +WireConnection;464;0;429;0 +WireConnection;293;0;284;0 +WireConnection;293;1;287;0 +WireConnection;463;0;464;0 +WireConnection;289;0;287;0 +WireConnection;289;1;285;0 +WireConnection;286;0;282;0 +WireConnection;286;2;457;0 +WireConnection;389;0;381;0 +WireConnection;448;0;451;0 +WireConnection;448;1;447;0 +WireConnection;448;2;449;0 +WireConnection;430;0;341;0 +WireConnection;430;2;463;0 +WireConnection;396;0;389;0 +WireConnection;396;1;385;0 +WireConnection;459;0;448;0 +WireConnection;420;0;419;0 +WireConnection;420;1;418;0 +WireConnection;342;0;340;0 +WireConnection;342;1;339;0 +WireConnection;346;0;430;0 +WireConnection;346;2;342;0 +WireConnection;300;0;288;1 +WireConnection;296;0;292;1 +WireConnection;462;0;396;0 +WireConnection;460;0;459;0 +WireConnection;421;0;391;0 +WireConnection;421;2;420;0 +WireConnection;305;0;443;0 +WireConnection;305;1;297;0 +WireConnection;307;0;299;0 +WireConnection;307;1;296;0 +WireConnection;302;0;297;0 +WireConnection;302;1;301;0 +WireConnection;461;0;462;0 +WireConnection;450;0;421;0 +WireConnection;450;1;460;0 +WireConnection;308;0;305;0 +WireConnection;308;1;302;0 +WireConnection;308;2;306;0 +WireConnection;351;0;348;0 +WireConnection;351;1;347;0 +WireConnection;351;2;344;0 +WireConnection;309;0;303;0 +WireConnection;309;1;307;0 +WireConnection;309;2;304;0 +WireConnection;399;0;450;0 +WireConnection;399;2;461;0 +WireConnection;417;0;353;1 +WireConnection;417;1;353;4 +WireConnection;417;2;416;0 +WireConnection;310;0;308;0 +WireConnection;310;1;309;0 +WireConnection;357;0;351;0 +WireConnection;357;1;352;0 +WireConnection;355;0;417;0 +WireConnection;355;1;349;0 +WireConnection;434;0;399;0 +WireConnection;386;0;383;0 +WireConnection;386;1;382;0 +WireConnection;360;0;355;0 +WireConnection;360;1;357;0 +WireConnection;317;0;316;0 +WireConnection;433;0;399;0 +WireConnection;433;1;434;0 +WireConnection;433;2;435;0 +WireConnection;476;0;309;0 +WireConnection;476;1;433;0 +WireConnection;320;0;317;0 +WireConnection;320;1;318;0 +WireConnection;366;0;360;0 +WireConnection;390;0;387;0 +WireConnection;390;2;386;0 +WireConnection;364;0;361;0 +WireConnection;368;0;366;0 +WireConnection;368;1;364;0 +WireConnection;368;2;361;0 +WireConnection;398;0;392;0 +WireConnection;398;1;395;2 +WireConnection;398;2;394;0 +WireConnection;321;0;319;0 +WireConnection;321;2;320;0 +WireConnection;314;0;321;0 +WireConnection;393;0;388;0 +WireConnection;441;0;406;0 +WireConnection;441;1;442;0 +WireConnection;404;0;398;0 +WireConnection;404;1;401;0 +WireConnection;404;2;397;0 +WireConnection;404;3;402;0 +WireConnection;411;0;321;0 +WireConnection;411;1;314;0 +WireConnection;411;2;412;0 +WireConnection;374;0;372;0 +WireConnection;374;1;373;4 +WireConnection;374;2;371;0 +WireConnection;400;0;393;0 +WireConnection;375;0;372;0 +WireConnection;375;1;371;0 +WireConnection;375;2;373;0 +WireConnection;425;0;441;0 +WireConnection;222;0;375;0 +WireConnection;456;0;408;0 +WireConnection;219;0;400;0 +WireConnection;217;0;374;0 +WireConnection;258;0;425;0 +WireConnection;409;0;1;1 +WireConnection;409;1;1;4 +WireConnection;409;2;410;0 +WireConnection;474;0;2;0 +WireConnection;474;1;1;0 +WireConnection;432;0;406;1 +WireConnection;432;1;406;4 +WireConnection;432;2;431;0 +WireConnection;117;0;456;0 +WireConnection;137;0;3;4 +WireConnection;137;1;2;4 +WireConnection;137;2;409;0 +WireConnection;137;3;218;0 +WireConnection;137;4;220;0 +WireConnection;137;5;216;0 +WireConnection;137;6;432;0 +WireConnection;137;7;506;0 +WireConnection;298;0;293;0 +WireConnection;298;1;289;0 +WireConnection;443;0;298;0 +WireConnection;292;1;286;0 +WireConnection;214;0;310;0 +WireConnection;1;1;411;0 +WireConnection;371;1;367;0 +WireConnection;371;0;368;0 +WireConnection;397;1;390;0 +WireConnection;408;1;405;0 +WireConnection;408;0;404;0 +WireConnection;478;2;534;0 +WireConnection;478;3;137;0 +WireConnection;478;5;118;0 +WireConnection;353;1;346;0 +WireConnection;406;1;476;0 +WireConnection;332;0;330;0 +WireConnection;332;1;329;0 +WireConnection;334;0;331;0 +WireConnection;334;2;332;0 +WireConnection;335;0;334;0 +WireConnection;335;2;324;0 +WireConnection;325;0;335;0 +WireConnection;413;0;335;0 +WireConnection;413;1;325;0 +WireConnection;413;2;414;0 +WireConnection;453;0;327;1 +WireConnection;453;1;327;4 +WireConnection;453;2;452;0 +WireConnection;327;1;413;0 +WireConnection;215;0;453;0 +WireConnection;333;0;322;0 +WireConnection;324;0;333;0 +WireConnection;324;1;323;0 +WireConnection;4;0;3;0 +WireConnection;4;1;474;0 +WireConnection;4;2;223;0 +WireConnection;4;3;257;0 +WireConnection;372;1;369;0 +WireConnection;372;0;370;0 +WireConnection;534;0;531;0 +WireConnection;534;1;4;0 +WireConnection;521;1;510;0 +WireConnection;523;0;521;1 +WireConnection;523;1;521;4 +WireConnection;523;2;522;0 +WireConnection;550;0;537;0 +WireConnection;550;1;523;0 +WireConnection;537;0;521;1 +WireConnection;537;1;521;2 +WireConnection;537;2;521;3 +WireConnection;525;0;523;0 +WireConnection;525;1;526;0 +WireConnection;530;0;550;0 +WireConnection;530;1;526;0 +WireConnection;528;0;530;0 +WireConnection;528;1;525;0 +WireConnection;528;2;529;0 +WireConnection;532;1;533;0 +WireConnection;532;0;528;0 +WireConnection;524;0;532;0 +WireConnection;509;0;516;0 +WireConnection;509;1;517;0 +WireConnection;512;0;518;0 +WireConnection;514;0;515;0 +WireConnection;514;2;509;0 +WireConnection;513;0;512;0 +WireConnection;513;1;508;0 +WireConnection;510;0;514;0 +WireConnection;510;2;513;0 +WireConnection;504;0;501;0 +WireConnection;505;0;504;0 +WireConnection;505;1;489;0 +WireConnection;492;0;491;0 +WireConnection;492;2;490;0 +WireConnection;490;0;499;0 +WireConnection;490;1;500;0 +WireConnection;493;0;492;0 +WireConnection;493;2;505;0 +WireConnection;495;0;493;0 +WireConnection;495;1;494;0 +WireConnection;495;2;502;0 +WireConnection;494;0;493;0 +WireConnection;498;1;495;0 +WireConnection;496;0;498;1 +WireConnection;496;1;498;4 +WireConnection;496;2;497;0 +WireConnection;503;0;496;0 +WireConnection;343;0;338;0 +WireConnection;343;1;337;0 +WireConnection;345;0;343;0 +WireConnection;350;0;345;0 +WireConnection;356;0;350;0 +WireConnection;438;0;356;0 +WireConnection;438;1;439;0 +WireConnection;438;2;440;0 +WireConnection;359;0;358;0 +WireConnection;362;0;438;0 +WireConnection;362;1;354;0 +WireConnection;436;0;363;0 +WireConnection;363;0;362;0 +WireConnection;363;1;359;0 +WireConnection;437;0;363;0 +WireConnection;370;0;437;0 +WireConnection;370;1;436;0 +WireConnection;370;2;365;0 +ASEEND*/ +//CHKSM=1E1571D81A1A9DEE53B93F527A2871F12E91D5AF \ No newline at end of file