AddMoveTurbDissolve.shader 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803
  1. // Made with Amplify Shader Editor v1.9.8.1
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "LT/AddMoveTurbDissolve"
  4. {
  5. Properties
  6. {
  7. [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
  8. [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
  9. _CTime("_CTime", Float) = 1
  10. [HDR]_Main_Color("Main_Color", Color) = (1,1,1,1)
  11. _Alpha("Alpha", Range( 0 , 1)) = 1
  12. _Main_Tex("Main_Tex", 2D) = "white" {}
  13. _MainAlpha("MainAlpha", Range( 0 , 1)) = 0
  14. _Main_UV("Main_UV", Vector) = (0,0,0,0)
  15. _CustomDataMainUV("CustomDataMainUV", Range( 0 , 1)) = 0
  16. _Turb_Noise("Turb_Noise", 2D) = "white" {}
  17. _Turb_Value("Turb_Value", Float) = 0
  18. _Turb_UV("Turb_UV", Vector) = (0,0,0,0)
  19. _dissolve("dissolve", 2D) = "white" {}
  20. _Diss_value("Diss_value", Float) = 0
  21. _DissSoft("DissSoft", Float) = 0
  22. _Diss_UV("Diss_UV", Vector) = (0,0,0,0)
  23. _CustomDataDissolve("CustomDataDissolve", Range( 0 , 1)) = 0
  24. _Mask("Mask", 2D) = "white" {}
  25. _MaskUVSpeed("MaskUVSpeed", Vector) = (0,0,0,0)
  26. _ca("_ca", Float) = 1
  27. //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
  28. //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
  29. //_TessMin( "Tess Min Distance", Float ) = 10
  30. //_TessMax( "Tess Max Distance", Float ) = 25
  31. //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
  32. //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
  33. [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0
  34. [HideInInspector] _QueueControl("_QueueControl", Float) = -1
  35. [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  36. [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  37. [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  38. [HideInInspector][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 1.0
  39. }
  40. SubShader
  41. {
  42. LOD 0
  43. Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" }
  44. Cull Off
  45. AlphaToMask Off
  46. HLSLINCLUDE
  47. #pragma target 4.5
  48. #pragma prefer_hlslcc gles
  49. #pragma exclude_renderers xboxone xboxseries playstation ps4 switch // ensure rendering platforms toggle list is visible
  50. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
  51. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
  52. #ifndef ASE_TESS_FUNCS
  53. #define ASE_TESS_FUNCS
  54. float4 FixedTess( float tessValue )
  55. {
  56. return tessValue;
  57. }
  58. float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
  59. {
  60. float3 wpos = mul(o2w,vertex).xyz;
  61. float dist = distance (wpos, cameraPos);
  62. float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
  63. return f;
  64. }
  65. float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
  66. {
  67. float4 tess;
  68. tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
  69. tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
  70. tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
  71. tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
  72. return tess;
  73. }
  74. float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
  75. {
  76. float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
  77. float len = distance(wpos0, wpos1);
  78. float f = max(len * scParams.y / (edgeLen * dist), 1.0);
  79. return f;
  80. }
  81. float DistanceFromPlane (float3 pos, float4 plane)
  82. {
  83. float d = dot (float4(pos,1.0f), plane);
  84. return d;
  85. }
  86. bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
  87. {
  88. float4 planeTest;
  89. planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  90. (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  91. (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
  92. planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  93. (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  94. (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
  95. planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  96. (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  97. (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
  98. planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  99. (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  100. (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
  101. return !all (planeTest);
  102. }
  103. float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
  104. {
  105. float3 f;
  106. f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
  107. f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
  108. f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
  109. return CalcTriEdgeTessFactors (f);
  110. }
  111. float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
  112. {
  113. float3 pos0 = mul(o2w,v0).xyz;
  114. float3 pos1 = mul(o2w,v1).xyz;
  115. float3 pos2 = mul(o2w,v2).xyz;
  116. float4 tess;
  117. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  118. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  119. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  120. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  121. return tess;
  122. }
  123. float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
  124. {
  125. float3 pos0 = mul(o2w,v0).xyz;
  126. float3 pos1 = mul(o2w,v1).xyz;
  127. float3 pos2 = mul(o2w,v2).xyz;
  128. float4 tess;
  129. if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
  130. {
  131. tess = 0.0f;
  132. }
  133. else
  134. {
  135. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  136. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  137. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  138. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  139. }
  140. return tess;
  141. }
  142. #endif //ASE_TESS_FUNCS
  143. ENDHLSL
  144. Pass
  145. {
  146. Name "Forward"
  147. Tags { "LightMode"="UniversalForwardOnly" }
  148. Blend One One, One One
  149. ZWrite Off
  150. ZTest LEqual
  151. Offset 0 , 0
  152. ColorMask RGBA
  153. HLSLPROGRAM
  154. #pragma multi_compile_instancing
  155. #pragma instancing_options renderinglayer
  156. #define _SURFACE_TYPE_TRANSPARENT 1
  157. #define ASE_VERSION 19801
  158. #define ASE_SRP_VERSION 140011
  159. #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
  160. #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  161. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  162. #pragma multi_compile _ LIGHTMAP_ON
  163. #pragma multi_compile _ DYNAMICLIGHTMAP_ON
  164. #pragma multi_compile_fragment _ DEBUG_DISPLAY
  165. #pragma vertex vert
  166. #pragma fragment frag
  167. #define SHADERPASS SHADERPASS_UNLIT
  168. #if ASE_SRP_VERSION >=140007
  169. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  170. #endif
  171. #if ASE_SRP_VERSION >=140007
  172. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  173. #endif
  174. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  175. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  176. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  177. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  178. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  179. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  180. #if ASE_SRP_VERSION >=140010
  181. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  182. #endif
  183. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  184. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  185. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  186. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  187. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  188. #if defined(LOD_FADE_CROSSFADE)
  189. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  190. #endif
  191. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
  192. #define ASE_SV_DEPTH SV_DepthLessEqual
  193. #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
  194. #else
  195. #define ASE_SV_DEPTH SV_Depth
  196. #define ASE_SV_POSITION_QUALIFIERS
  197. #endif
  198. struct Attributes
  199. {
  200. float4 positionOS : POSITION;
  201. float3 normalOS : NORMAL;
  202. float4 texcoord : TEXCOORD0;
  203. float4 texcoord1 : TEXCOORD1;
  204. float4 texcoord2 : TEXCOORD2;
  205. float4 ase_color : COLOR;
  206. UNITY_VERTEX_INPUT_INSTANCE_ID
  207. };
  208. struct PackedVaryings
  209. {
  210. ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
  211. float4 clipPosV : TEXCOORD0;
  212. float3 positionWS : TEXCOORD1;
  213. #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX)
  214. half4 fogFactorAndVertexLight : TEXCOORD2;
  215. #endif
  216. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  217. float4 shadowCoord : TEXCOORD3;
  218. #endif
  219. #if defined(LIGHTMAP_ON)
  220. float4 lightmapUVOrVertexSH : TEXCOORD4;
  221. #endif
  222. #if defined(DYNAMICLIGHTMAP_ON)
  223. float2 dynamicLightmapUV : TEXCOORD5;
  224. #endif
  225. float4 ase_texcoord6 : TEXCOORD6;
  226. float4 ase_texcoord7 : TEXCOORD7;
  227. float4 ase_color : COLOR;
  228. UNITY_VERTEX_INPUT_INSTANCE_ID
  229. UNITY_VERTEX_OUTPUT_STEREO
  230. };
  231. CBUFFER_START(UnityPerMaterial)
  232. float4 _Main_Color;
  233. float4 _Mask_ST;
  234. float4 _Main_Tex_ST;
  235. float4 _dissolve_ST;
  236. float4 _Turb_Noise_ST;
  237. float2 _Main_UV;
  238. float2 _Diss_UV;
  239. float2 _MaskUVSpeed;
  240. float2 _Turb_UV;
  241. float _CustomDataMainUV;
  242. float _MainAlpha;
  243. float _CTime;
  244. float _ca;
  245. float _Alpha;
  246. float _Diss_value;
  247. float _CustomDataDissolve;
  248. float _DissSoft;
  249. float _Turb_Value;
  250. #ifdef ASE_TESSELLATION
  251. float _TessPhongStrength;
  252. float _TessValue;
  253. float _TessMin;
  254. float _TessMax;
  255. float _TessEdgeLength;
  256. float _TessMaxDisp;
  257. #endif
  258. CBUFFER_END
  259. sampler2D _Main_Tex;
  260. sampler2D _Turb_Noise;
  261. sampler2D _Mask;
  262. sampler2D _dissolve;
  263. PackedVaryings VertexFunction( Attributes input )
  264. {
  265. PackedVaryings output = (PackedVaryings)0;
  266. UNITY_SETUP_INSTANCE_ID(input);
  267. UNITY_TRANSFER_INSTANCE_ID(input, output);
  268. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  269. output.ase_texcoord6.xy = input.texcoord.xy;
  270. output.ase_texcoord7 = input.texcoord1;
  271. output.ase_color = input.ase_color;
  272. //setting value to unused interpolator channels and avoid initialization warnings
  273. output.ase_texcoord6.zw = 0;
  274. #ifdef ASE_ABSOLUTE_VERTEX_POS
  275. float3 defaultVertexValue = input.positionOS.xyz;
  276. #else
  277. float3 defaultVertexValue = float3(0, 0, 0);
  278. #endif
  279. float3 vertexValue = defaultVertexValue;
  280. #ifdef ASE_ABSOLUTE_VERTEX_POS
  281. input.positionOS.xyz = vertexValue;
  282. #else
  283. input.positionOS.xyz += vertexValue;
  284. #endif
  285. input.normalOS = input.normalOS;
  286. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  287. #if defined(LIGHTMAP_ON)
  288. OUTPUT_LIGHTMAP_UV(input.texcoord1, unity_LightmapST, output.lightmapUVOrVertexSH.xy);
  289. #endif
  290. #if defined(DYNAMICLIGHTMAP_ON)
  291. output.dynamicLightmapUV.xy = input.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
  292. #endif
  293. #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX)
  294. output.fogFactorAndVertexLight = 0;
  295. #if defined(ASE_FOG) && !defined(_FOG_FRAGMENT)
  296. output.fogFactorAndVertexLight.x = ComputeFogFactor(vertexInput.positionCS.z);
  297. #endif
  298. #ifdef _ADDITIONAL_LIGHTS_VERTEX
  299. half3 vertexLight = VertexLighting( vertexInput.positionWS, normalInput.normalWS );
  300. output.fogFactorAndVertexLight.yzw = vertexLight;
  301. #endif
  302. #endif
  303. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  304. output.shadowCoord = GetShadowCoord( vertexInput );
  305. #endif
  306. output.positionCS = vertexInput.positionCS;
  307. output.clipPosV = vertexInput.positionCS;
  308. output.positionWS = vertexInput.positionWS;
  309. return output;
  310. }
  311. #if defined(ASE_TESSELLATION)
  312. struct VertexControl
  313. {
  314. float4 positionOS : INTERNALTESSPOS;
  315. float3 normalOS : NORMAL;
  316. float4 ase_color : COLOR;
  317. UNITY_VERTEX_INPUT_INSTANCE_ID
  318. };
  319. struct TessellationFactors
  320. {
  321. float edge[3] : SV_TessFactor;
  322. float inside : SV_InsideTessFactor;
  323. };
  324. VertexControl vert ( Attributes input )
  325. {
  326. VertexControl output;
  327. UNITY_SETUP_INSTANCE_ID(input);
  328. UNITY_TRANSFER_INSTANCE_ID(input, output);
  329. output.positionOS = input.positionOS;
  330. output.normalOS = input.normalOS;
  331. output.ase_color = input.ase_color;
  332. return output;
  333. }
  334. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  335. {
  336. TessellationFactors output;
  337. float4 tf = 1;
  338. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  339. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  340. #if defined(ASE_FIXED_TESSELLATION)
  341. tf = FixedTess( tessValue );
  342. #elif defined(ASE_DISTANCE_TESSELLATION)
  343. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  344. #elif defined(ASE_LENGTH_TESSELLATION)
  345. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  346. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  347. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  348. #endif
  349. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  350. return output;
  351. }
  352. [domain("tri")]
  353. [partitioning("fractional_odd")]
  354. [outputtopology("triangle_cw")]
  355. [patchconstantfunc("TessellationFunction")]
  356. [outputcontrolpoints(3)]
  357. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  358. {
  359. return patch[id];
  360. }
  361. [domain("tri")]
  362. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  363. {
  364. Attributes output = (Attributes) 0;
  365. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  366. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  367. output.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  368. #if defined(ASE_PHONG_TESSELLATION)
  369. float3 pp[3];
  370. for (int i = 0; i < 3; ++i)
  371. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  372. float phongStrength = _TessPhongStrength;
  373. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  374. #endif
  375. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  376. return VertexFunction(output);
  377. }
  378. #else
  379. PackedVaryings vert ( Attributes input )
  380. {
  381. return VertexFunction( input );
  382. }
  383. #endif
  384. half4 frag ( PackedVaryings input
  385. #ifdef ASE_DEPTH_WRITE_ON
  386. ,out float outputDepth : ASE_SV_DEPTH
  387. #endif
  388. #ifdef _WRITE_RENDERING_LAYERS
  389. , out float4 outRenderingLayers : SV_Target1
  390. #endif
  391. ) : SV_Target
  392. {
  393. UNITY_SETUP_INSTANCE_ID(input);
  394. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
  395. #if defined(LOD_FADE_CROSSFADE)
  396. LODFadeCrossFade( input.positionCS );
  397. #endif
  398. float3 WorldPosition = input.positionWS;
  399. float3 WorldViewDirection = GetWorldSpaceNormalizeViewDir( WorldPosition );
  400. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  401. float4 ClipPos = input.clipPosV;
  402. float4 ScreenPos = ComputeScreenPos( input.clipPosV );
  403. float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
  404. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  405. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  406. ShadowCoords = input.shadowCoord;
  407. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  408. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  409. #endif
  410. #endif
  411. float2 uv_Turb_Noise = input.ase_texcoord6.xy * _Turb_Noise_ST.xy + _Turb_Noise_ST.zw;
  412. float2 panner12 = ( 1.0 * _Time.y * ( _Turb_UV * _CTime ) + uv_Turb_Noise);
  413. float2 uv_Main_Tex = input.ase_texcoord6.xy * _Main_Tex_ST.xy + _Main_Tex_ST.zw;
  414. float2 panner19 = ( 1.0 * _Time.y * ( _Main_UV * _CTime ) + uv_Main_Tex);
  415. float4 texCoord45 = input.ase_texcoord7;
  416. texCoord45.xy = input.ase_texcoord7.xy * float2( 1,1 ) + float2( 0,0 );
  417. float2 appendResult44 = (float2(texCoord45.z , texCoord45.w));
  418. float2 lerpResult46 = lerp( panner19 , ( appendResult44 + uv_Main_Tex ) , round( _CustomDataMainUV ));
  419. float4 tex2DNode10 = tex2D( _Main_Tex, ( ( tex2D( _Turb_Noise, panner12 ).r * _Turb_Value ) + lerpResult46 ) );
  420. float4 temp_cast_0 = (tex2DNode10.a).xxxx;
  421. float4 lerpResult58 = lerp( tex2DNode10 , temp_cast_0 , round( _MainAlpha ));
  422. float2 uv_Mask = input.ase_texcoord6.xy * _Mask_ST.xy + _Mask_ST.zw;
  423. float2 panner53 = ( 1.0 * _Time.y * ( _MaskUVSpeed * _CTime ) + uv_Mask);
  424. float4 texCoord48 = input.ase_texcoord7;
  425. texCoord48.xy = input.ase_texcoord7.xy * float2( 1,1 ) + float2( 0,0 );
  426. float lerpResult69 = lerp( _Diss_value , texCoord48.x , _CustomDataDissolve);
  427. float lerpResult50 = lerp( _Diss_value , texCoord48.x , round( _CustomDataDissolve ));
  428. float2 uv_dissolve = input.ase_texcoord6.xy * _dissolve_ST.xy + _dissolve_ST.zw;
  429. float2 panner31 = ( 1.0 * _Time.y * ( _Diss_UV * _CTime ) + uv_dissolve);
  430. float smoothstepResult33 = smoothstep( lerpResult69 , ( lerpResult50 + _DissSoft ) , tex2D( _dissolve, panner31 ).r);
  431. float3 BakedAlbedo = 0;
  432. float3 BakedEmission = 0;
  433. float3 Color = ( lerpResult58 * _Main_Color * input.ase_color * tex2D( _Mask, panner53 ).r * ( _ca * _Alpha ) * smoothstepResult33 ).rgb;
  434. float Alpha = 1;
  435. float AlphaClipThreshold = 0.5;
  436. float AlphaClipThresholdShadow = 0.5;
  437. #ifdef ASE_DEPTH_WRITE_ON
  438. float DepthValue = input.positionCS.z;
  439. #endif
  440. #ifdef _ALPHATEST_ON
  441. clip(Alpha - AlphaClipThreshold);
  442. #endif
  443. InputData inputData = (InputData)0;
  444. inputData.positionWS = WorldPosition;
  445. inputData.viewDirectionWS = WorldViewDirection;
  446. #ifdef ASE_FOG
  447. inputData.fogCoord = InitializeInputDataFog(float4(inputData.positionWS, 1.0), input.fogFactorAndVertexLight.x);
  448. #endif
  449. #ifdef _ADDITIONAL_LIGHTS_VERTEX
  450. inputData.vertexLighting = input.fogFactorAndVertexLight.yzw;
  451. #endif
  452. inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV;
  453. #if defined(_DBUFFER)
  454. ApplyDecalToBaseColor(input.positionCS, Color);
  455. #endif
  456. #ifdef ASE_FOG
  457. #ifdef TERRAIN_SPLAT_ADDPASS
  458. Color.rgb = MixFogColor(Color.rgb, half3(0,0,0), inputData.fogCoord);
  459. #else
  460. Color.rgb = MixFog(Color.rgb, inputData.fogCoord);
  461. #endif
  462. #endif
  463. #ifdef ASE_DEPTH_WRITE_ON
  464. outputDepth = DepthValue;
  465. #endif
  466. #ifdef _WRITE_RENDERING_LAYERS
  467. uint renderingLayers = GetMeshRenderingLayer();
  468. outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 );
  469. #endif
  470. return half4( Color, Alpha );
  471. }
  472. ENDHLSL
  473. }
  474. Pass
  475. {
  476. Name "DepthOnly"
  477. Tags { "LightMode"="DepthOnly" }
  478. ZWrite On
  479. ColorMask 0
  480. AlphaToMask Off
  481. HLSLPROGRAM
  482. #pragma multi_compile_instancing
  483. #define _SURFACE_TYPE_TRANSPARENT 1
  484. #define ASE_VERSION 19801
  485. #define ASE_SRP_VERSION 140011
  486. #pragma vertex vert
  487. #pragma fragment frag
  488. #if ASE_SRP_VERSION >=140007
  489. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  490. #endif
  491. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  492. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  493. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  494. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  495. #if defined(LOD_FADE_CROSSFADE)
  496. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  497. #endif
  498. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
  499. #define ASE_SV_DEPTH SV_DepthLessEqual
  500. #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
  501. #else
  502. #define ASE_SV_DEPTH SV_Depth
  503. #define ASE_SV_POSITION_QUALIFIERS
  504. #endif
  505. struct Attributes
  506. {
  507. float4 positionOS : POSITION;
  508. float3 normalOS : NORMAL;
  509. UNITY_VERTEX_INPUT_INSTANCE_ID
  510. };
  511. struct PackedVaryings
  512. {
  513. ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
  514. float4 clipPosV : TEXCOORD0;
  515. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  516. float3 positionWS : TEXCOORD1;
  517. #endif
  518. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  519. float4 shadowCoord : TEXCOORD2;
  520. #endif
  521. UNITY_VERTEX_INPUT_INSTANCE_ID
  522. UNITY_VERTEX_OUTPUT_STEREO
  523. };
  524. CBUFFER_START(UnityPerMaterial)
  525. float4 _Main_Color;
  526. float4 _Mask_ST;
  527. float4 _Main_Tex_ST;
  528. float4 _dissolve_ST;
  529. float4 _Turb_Noise_ST;
  530. float2 _Main_UV;
  531. float2 _Diss_UV;
  532. float2 _MaskUVSpeed;
  533. float2 _Turb_UV;
  534. float _CustomDataMainUV;
  535. float _MainAlpha;
  536. float _CTime;
  537. float _ca;
  538. float _Alpha;
  539. float _Diss_value;
  540. float _CustomDataDissolve;
  541. float _DissSoft;
  542. float _Turb_Value;
  543. #ifdef ASE_TESSELLATION
  544. float _TessPhongStrength;
  545. float _TessValue;
  546. float _TessMin;
  547. float _TessMax;
  548. float _TessEdgeLength;
  549. float _TessMaxDisp;
  550. #endif
  551. CBUFFER_END
  552. PackedVaryings VertexFunction( Attributes input )
  553. {
  554. PackedVaryings output = (PackedVaryings)0;
  555. UNITY_SETUP_INSTANCE_ID(input);
  556. UNITY_TRANSFER_INSTANCE_ID(input, output);
  557. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  558. #ifdef ASE_ABSOLUTE_VERTEX_POS
  559. float3 defaultVertexValue = input.positionOS.xyz;
  560. #else
  561. float3 defaultVertexValue = float3(0, 0, 0);
  562. #endif
  563. float3 vertexValue = defaultVertexValue;
  564. #ifdef ASE_ABSOLUTE_VERTEX_POS
  565. input.positionOS.xyz = vertexValue;
  566. #else
  567. input.positionOS.xyz += vertexValue;
  568. #endif
  569. input.normalOS = input.normalOS;
  570. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  571. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  572. output.positionWS = vertexInput.positionWS;
  573. #endif
  574. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  575. output.shadowCoord = GetShadowCoord( vertexInput );
  576. #endif
  577. output.positionCS = vertexInput.positionCS;
  578. output.clipPosV = vertexInput.positionCS;
  579. return output;
  580. }
  581. #if defined(ASE_TESSELLATION)
  582. struct VertexControl
  583. {
  584. float4 positionOS : INTERNALTESSPOS;
  585. float3 normalOS : NORMAL;
  586. UNITY_VERTEX_INPUT_INSTANCE_ID
  587. };
  588. struct TessellationFactors
  589. {
  590. float edge[3] : SV_TessFactor;
  591. float inside : SV_InsideTessFactor;
  592. };
  593. VertexControl vert ( Attributes input )
  594. {
  595. VertexControl output;
  596. UNITY_SETUP_INSTANCE_ID(input);
  597. UNITY_TRANSFER_INSTANCE_ID(input, output);
  598. output.positionOS = input.positionOS;
  599. output.normalOS = input.normalOS;
  600. return output;
  601. }
  602. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  603. {
  604. TessellationFactors output;
  605. float4 tf = 1;
  606. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  607. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  608. #if defined(ASE_FIXED_TESSELLATION)
  609. tf = FixedTess( tessValue );
  610. #elif defined(ASE_DISTANCE_TESSELLATION)
  611. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  612. #elif defined(ASE_LENGTH_TESSELLATION)
  613. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  614. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  615. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  616. #endif
  617. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  618. return output;
  619. }
  620. [domain("tri")]
  621. [partitioning("fractional_odd")]
  622. [outputtopology("triangle_cw")]
  623. [patchconstantfunc("TessellationFunction")]
  624. [outputcontrolpoints(3)]
  625. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  626. {
  627. return patch[id];
  628. }
  629. [domain("tri")]
  630. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  631. {
  632. Attributes output = (Attributes) 0;
  633. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  634. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  635. #if defined(ASE_PHONG_TESSELLATION)
  636. float3 pp[3];
  637. for (int i = 0; i < 3; ++i)
  638. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  639. float phongStrength = _TessPhongStrength;
  640. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  641. #endif
  642. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  643. return VertexFunction(output);
  644. }
  645. #else
  646. PackedVaryings vert ( Attributes input )
  647. {
  648. return VertexFunction( input );
  649. }
  650. #endif
  651. half4 frag(PackedVaryings input
  652. #ifdef ASE_DEPTH_WRITE_ON
  653. ,out float outputDepth : ASE_SV_DEPTH
  654. #endif
  655. ) : SV_Target
  656. {
  657. UNITY_SETUP_INSTANCE_ID(input);
  658. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
  659. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  660. float3 WorldPosition = input.positionWS;
  661. #endif
  662. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  663. float4 ClipPos = input.clipPosV;
  664. float4 ScreenPos = ComputeScreenPos( input.clipPosV );
  665. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  666. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  667. ShadowCoords = input.shadowCoord;
  668. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  669. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  670. #endif
  671. #endif
  672. float Alpha = 1;
  673. float AlphaClipThreshold = 0.5;
  674. #ifdef ASE_DEPTH_WRITE_ON
  675. float DepthValue = input.positionCS.z;
  676. #endif
  677. #ifdef _ALPHATEST_ON
  678. clip(Alpha - AlphaClipThreshold);
  679. #endif
  680. #if defined(LOD_FADE_CROSSFADE)
  681. LODFadeCrossFade( input.positionCS );
  682. #endif
  683. #ifdef ASE_DEPTH_WRITE_ON
  684. outputDepth = DepthValue;
  685. #endif
  686. return 0;
  687. }
  688. ENDHLSL
  689. }
  690. Pass
  691. {
  692. Name "SceneSelectionPass"
  693. Tags { "LightMode"="SceneSelectionPass" }
  694. Cull Off
  695. AlphaToMask Off
  696. HLSLPROGRAM
  697. #define _SURFACE_TYPE_TRANSPARENT 1
  698. #define ASE_VERSION 19801
  699. #define ASE_SRP_VERSION 140011
  700. #pragma vertex vert
  701. #pragma fragment frag
  702. #define ATTRIBUTES_NEED_NORMAL
  703. #define ATTRIBUTES_NEED_TANGENT
  704. #define SHADERPASS SHADERPASS_DEPTHONLY
  705. #if ASE_SRP_VERSION >=140007
  706. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  707. #endif
  708. #if ASE_SRP_VERSION >=140007
  709. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  710. #endif
  711. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  712. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  713. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  714. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  715. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  716. #if ASE_SRP_VERSION >=140010
  717. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  718. #endif
  719. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  720. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  721. struct Attributes
  722. {
  723. float4 positionOS : POSITION;
  724. float3 normalOS : NORMAL;
  725. UNITY_VERTEX_INPUT_INSTANCE_ID
  726. };
  727. struct PackedVaryings
  728. {
  729. float4 positionCS : SV_POSITION;
  730. UNITY_VERTEX_INPUT_INSTANCE_ID
  731. UNITY_VERTEX_OUTPUT_STEREO
  732. };
  733. CBUFFER_START(UnityPerMaterial)
  734. float4 _Main_Color;
  735. float4 _Mask_ST;
  736. float4 _Main_Tex_ST;
  737. float4 _dissolve_ST;
  738. float4 _Turb_Noise_ST;
  739. float2 _Main_UV;
  740. float2 _Diss_UV;
  741. float2 _MaskUVSpeed;
  742. float2 _Turb_UV;
  743. float _CustomDataMainUV;
  744. float _MainAlpha;
  745. float _CTime;
  746. float _ca;
  747. float _Alpha;
  748. float _Diss_value;
  749. float _CustomDataDissolve;
  750. float _DissSoft;
  751. float _Turb_Value;
  752. #ifdef ASE_TESSELLATION
  753. float _TessPhongStrength;
  754. float _TessValue;
  755. float _TessMin;
  756. float _TessMax;
  757. float _TessEdgeLength;
  758. float _TessMaxDisp;
  759. #endif
  760. CBUFFER_END
  761. int _ObjectId;
  762. int _PassValue;
  763. struct SurfaceDescription
  764. {
  765. float Alpha;
  766. float AlphaClipThreshold;
  767. };
  768. PackedVaryings VertexFunction(Attributes input )
  769. {
  770. PackedVaryings output;
  771. ZERO_INITIALIZE(PackedVaryings, output);
  772. UNITY_SETUP_INSTANCE_ID(input);
  773. UNITY_TRANSFER_INSTANCE_ID(input, output);
  774. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  775. #ifdef ASE_ABSOLUTE_VERTEX_POS
  776. float3 defaultVertexValue = input.positionOS.xyz;
  777. #else
  778. float3 defaultVertexValue = float3(0, 0, 0);
  779. #endif
  780. float3 vertexValue = defaultVertexValue;
  781. #ifdef ASE_ABSOLUTE_VERTEX_POS
  782. input.positionOS.xyz = vertexValue;
  783. #else
  784. input.positionOS.xyz += vertexValue;
  785. #endif
  786. input.normalOS = input.normalOS;
  787. float3 positionWS = TransformObjectToWorld( input.positionOS.xyz );
  788. output.positionCS = TransformWorldToHClip(positionWS);
  789. return output;
  790. }
  791. #if defined(ASE_TESSELLATION)
  792. struct VertexControl
  793. {
  794. float4 positionOS : INTERNALTESSPOS;
  795. float3 normalOS : NORMAL;
  796. UNITY_VERTEX_INPUT_INSTANCE_ID
  797. };
  798. struct TessellationFactors
  799. {
  800. float edge[3] : SV_TessFactor;
  801. float inside : SV_InsideTessFactor;
  802. };
  803. VertexControl vert ( Attributes input )
  804. {
  805. VertexControl output;
  806. UNITY_SETUP_INSTANCE_ID(input);
  807. UNITY_TRANSFER_INSTANCE_ID(input, output);
  808. output.positionOS = input.positionOS;
  809. output.normalOS = input.normalOS;
  810. return output;
  811. }
  812. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  813. {
  814. TessellationFactors output;
  815. float4 tf = 1;
  816. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  817. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  818. #if defined(ASE_FIXED_TESSELLATION)
  819. tf = FixedTess( tessValue );
  820. #elif defined(ASE_DISTANCE_TESSELLATION)
  821. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  822. #elif defined(ASE_LENGTH_TESSELLATION)
  823. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  824. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  825. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  826. #endif
  827. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  828. return output;
  829. }
  830. [domain("tri")]
  831. [partitioning("fractional_odd")]
  832. [outputtopology("triangle_cw")]
  833. [patchconstantfunc("TessellationFunction")]
  834. [outputcontrolpoints(3)]
  835. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  836. {
  837. return patch[id];
  838. }
  839. [domain("tri")]
  840. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  841. {
  842. Attributes output = (Attributes) 0;
  843. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  844. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  845. #if defined(ASE_PHONG_TESSELLATION)
  846. float3 pp[3];
  847. for (int i = 0; i < 3; ++i)
  848. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  849. float phongStrength = _TessPhongStrength;
  850. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  851. #endif
  852. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  853. return VertexFunction(output);
  854. }
  855. #else
  856. PackedVaryings vert ( Attributes input )
  857. {
  858. return VertexFunction( input );
  859. }
  860. #endif
  861. half4 frag(PackedVaryings input ) : SV_Target
  862. {
  863. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  864. surfaceDescription.Alpha = 1;
  865. surfaceDescription.AlphaClipThreshold = 0.5;
  866. #if _ALPHATEST_ON
  867. float alphaClipThreshold = 0.01f;
  868. #if ALPHA_CLIP_THRESHOLD
  869. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  870. #endif
  871. clip(surfaceDescription.Alpha - alphaClipThreshold);
  872. #endif
  873. half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  874. return outColor;
  875. }
  876. ENDHLSL
  877. }
  878. Pass
  879. {
  880. Name "ScenePickingPass"
  881. Tags { "LightMode"="Picking" }
  882. AlphaToMask Off
  883. HLSLPROGRAM
  884. #define _SURFACE_TYPE_TRANSPARENT 1
  885. #define ASE_VERSION 19801
  886. #define ASE_SRP_VERSION 140011
  887. #pragma vertex vert
  888. #pragma fragment frag
  889. #define ATTRIBUTES_NEED_NORMAL
  890. #define ATTRIBUTES_NEED_TANGENT
  891. #define SHADERPASS SHADERPASS_DEPTHONLY
  892. #if ASE_SRP_VERSION >=140007
  893. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  894. #endif
  895. #if ASE_SRP_VERSION >=140007
  896. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  897. #endif
  898. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  899. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  900. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  901. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  902. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  903. #if ASE_SRP_VERSION >=140010
  904. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  905. #endif
  906. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  907. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  908. #if defined(LOD_FADE_CROSSFADE)
  909. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  910. #endif
  911. struct Attributes
  912. {
  913. float4 positionOS : POSITION;
  914. float3 normalOS : NORMAL;
  915. UNITY_VERTEX_INPUT_INSTANCE_ID
  916. };
  917. struct PackedVaryings
  918. {
  919. float4 positionCS : SV_POSITION;
  920. UNITY_VERTEX_INPUT_INSTANCE_ID
  921. UNITY_VERTEX_OUTPUT_STEREO
  922. };
  923. CBUFFER_START(UnityPerMaterial)
  924. float4 _Main_Color;
  925. float4 _Mask_ST;
  926. float4 _Main_Tex_ST;
  927. float4 _dissolve_ST;
  928. float4 _Turb_Noise_ST;
  929. float2 _Main_UV;
  930. float2 _Diss_UV;
  931. float2 _MaskUVSpeed;
  932. float2 _Turb_UV;
  933. float _CustomDataMainUV;
  934. float _MainAlpha;
  935. float _CTime;
  936. float _ca;
  937. float _Alpha;
  938. float _Diss_value;
  939. float _CustomDataDissolve;
  940. float _DissSoft;
  941. float _Turb_Value;
  942. #ifdef ASE_TESSELLATION
  943. float _TessPhongStrength;
  944. float _TessValue;
  945. float _TessMin;
  946. float _TessMax;
  947. float _TessEdgeLength;
  948. float _TessMaxDisp;
  949. #endif
  950. CBUFFER_END
  951. float4 _SelectionID;
  952. struct SurfaceDescription
  953. {
  954. float Alpha;
  955. float AlphaClipThreshold;
  956. };
  957. PackedVaryings VertexFunction(Attributes input )
  958. {
  959. PackedVaryings output;
  960. ZERO_INITIALIZE(PackedVaryings, output);
  961. UNITY_SETUP_INSTANCE_ID(input);
  962. UNITY_TRANSFER_INSTANCE_ID(input, output);
  963. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  964. #ifdef ASE_ABSOLUTE_VERTEX_POS
  965. float3 defaultVertexValue = input.positionOS.xyz;
  966. #else
  967. float3 defaultVertexValue = float3(0, 0, 0);
  968. #endif
  969. float3 vertexValue = defaultVertexValue;
  970. #ifdef ASE_ABSOLUTE_VERTEX_POS
  971. input.positionOS.xyz = vertexValue;
  972. #else
  973. input.positionOS.xyz += vertexValue;
  974. #endif
  975. input.normalOS = input.normalOS;
  976. float3 positionWS = TransformObjectToWorld( input.positionOS.xyz );
  977. output.positionCS = TransformWorldToHClip(positionWS);
  978. return output;
  979. }
  980. #if defined(ASE_TESSELLATION)
  981. struct VertexControl
  982. {
  983. float4 positionOS : INTERNALTESSPOS;
  984. float3 normalOS : NORMAL;
  985. UNITY_VERTEX_INPUT_INSTANCE_ID
  986. };
  987. struct TessellationFactors
  988. {
  989. float edge[3] : SV_TessFactor;
  990. float inside : SV_InsideTessFactor;
  991. };
  992. VertexControl vert ( Attributes input )
  993. {
  994. VertexControl output;
  995. UNITY_SETUP_INSTANCE_ID(input);
  996. UNITY_TRANSFER_INSTANCE_ID(input, output);
  997. output.positionOS = input.positionOS;
  998. output.normalOS = input.normalOS;
  999. return output;
  1000. }
  1001. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  1002. {
  1003. TessellationFactors output;
  1004. float4 tf = 1;
  1005. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1006. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1007. #if defined(ASE_FIXED_TESSELLATION)
  1008. tf = FixedTess( tessValue );
  1009. #elif defined(ASE_DISTANCE_TESSELLATION)
  1010. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1011. #elif defined(ASE_LENGTH_TESSELLATION)
  1012. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1013. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1014. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1015. #endif
  1016. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  1017. return output;
  1018. }
  1019. [domain("tri")]
  1020. [partitioning("fractional_odd")]
  1021. [outputtopology("triangle_cw")]
  1022. [patchconstantfunc("TessellationFunction")]
  1023. [outputcontrolpoints(3)]
  1024. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1025. {
  1026. return patch[id];
  1027. }
  1028. [domain("tri")]
  1029. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1030. {
  1031. Attributes output = (Attributes) 0;
  1032. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  1033. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  1034. #if defined(ASE_PHONG_TESSELLATION)
  1035. float3 pp[3];
  1036. for (int i = 0; i < 3; ++i)
  1037. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  1038. float phongStrength = _TessPhongStrength;
  1039. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  1040. #endif
  1041. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  1042. return VertexFunction(output);
  1043. }
  1044. #else
  1045. PackedVaryings vert ( Attributes input )
  1046. {
  1047. return VertexFunction( input );
  1048. }
  1049. #endif
  1050. half4 frag(PackedVaryings input ) : SV_Target
  1051. {
  1052. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1053. surfaceDescription.Alpha = 1;
  1054. surfaceDescription.AlphaClipThreshold = 0.5;
  1055. #if _ALPHATEST_ON
  1056. float alphaClipThreshold = 0.01f;
  1057. #if ALPHA_CLIP_THRESHOLD
  1058. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1059. #endif
  1060. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1061. #endif
  1062. half4 outColor = 0;
  1063. outColor = _SelectionID;
  1064. return outColor;
  1065. }
  1066. ENDHLSL
  1067. }
  1068. Pass
  1069. {
  1070. Name "DepthNormals"
  1071. Tags { "LightMode"="DepthNormalsOnly" }
  1072. ZTest LEqual
  1073. ZWrite On
  1074. HLSLPROGRAM
  1075. #pragma multi_compile_instancing
  1076. #define _SURFACE_TYPE_TRANSPARENT 1
  1077. #define ASE_VERSION 19801
  1078. #define ASE_SRP_VERSION 140011
  1079. #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
  1080. #pragma vertex vert
  1081. #pragma fragment frag
  1082. #define ATTRIBUTES_NEED_NORMAL
  1083. #define ATTRIBUTES_NEED_TANGENT
  1084. #define VARYINGS_NEED_NORMAL_WS
  1085. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1086. #if ASE_SRP_VERSION >=140007
  1087. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  1088. #endif
  1089. #if ASE_SRP_VERSION >=140007
  1090. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  1091. #endif
  1092. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1093. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1094. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1095. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1096. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1097. #if ASE_SRP_VERSION >=140010
  1098. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  1099. #endif
  1100. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1101. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1102. #if defined(LOD_FADE_CROSSFADE)
  1103. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  1104. #endif
  1105. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
  1106. #define ASE_SV_DEPTH SV_DepthLessEqual
  1107. #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
  1108. #else
  1109. #define ASE_SV_DEPTH SV_Depth
  1110. #define ASE_SV_POSITION_QUALIFIERS
  1111. #endif
  1112. struct Attributes
  1113. {
  1114. float4 positionOS : POSITION;
  1115. float3 normalOS : NORMAL;
  1116. UNITY_VERTEX_INPUT_INSTANCE_ID
  1117. };
  1118. struct PackedVaryings
  1119. {
  1120. ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
  1121. float4 clipPosV : TEXCOORD0;
  1122. float3 positionWS : TEXCOORD1;
  1123. float3 normalWS : TEXCOORD2;
  1124. UNITY_VERTEX_INPUT_INSTANCE_ID
  1125. UNITY_VERTEX_OUTPUT_STEREO
  1126. };
  1127. CBUFFER_START(UnityPerMaterial)
  1128. float4 _Main_Color;
  1129. float4 _Mask_ST;
  1130. float4 _Main_Tex_ST;
  1131. float4 _dissolve_ST;
  1132. float4 _Turb_Noise_ST;
  1133. float2 _Main_UV;
  1134. float2 _Diss_UV;
  1135. float2 _MaskUVSpeed;
  1136. float2 _Turb_UV;
  1137. float _CustomDataMainUV;
  1138. float _MainAlpha;
  1139. float _CTime;
  1140. float _ca;
  1141. float _Alpha;
  1142. float _Diss_value;
  1143. float _CustomDataDissolve;
  1144. float _DissSoft;
  1145. float _Turb_Value;
  1146. #ifdef ASE_TESSELLATION
  1147. float _TessPhongStrength;
  1148. float _TessValue;
  1149. float _TessMin;
  1150. float _TessMax;
  1151. float _TessEdgeLength;
  1152. float _TessMaxDisp;
  1153. #endif
  1154. CBUFFER_END
  1155. struct SurfaceDescription
  1156. {
  1157. float Alpha;
  1158. float AlphaClipThreshold;
  1159. };
  1160. PackedVaryings VertexFunction( Attributes input )
  1161. {
  1162. PackedVaryings output;
  1163. ZERO_INITIALIZE(PackedVaryings, output);
  1164. UNITY_SETUP_INSTANCE_ID(input);
  1165. UNITY_TRANSFER_INSTANCE_ID(input, output);
  1166. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  1167. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1168. float3 defaultVertexValue = input.positionOS.xyz;
  1169. #else
  1170. float3 defaultVertexValue = float3(0, 0, 0);
  1171. #endif
  1172. float3 vertexValue = defaultVertexValue;
  1173. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1174. input.positionOS.xyz = vertexValue;
  1175. #else
  1176. input.positionOS.xyz += vertexValue;
  1177. #endif
  1178. input.normalOS = input.normalOS;
  1179. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  1180. output.positionCS = vertexInput.positionCS;
  1181. output.clipPosV = vertexInput.positionCS;
  1182. output.positionWS = vertexInput.positionWS;
  1183. output.normalWS = TransformObjectToWorldNormal( input.normalOS );
  1184. return output;
  1185. }
  1186. #if defined(ASE_TESSELLATION)
  1187. struct VertexControl
  1188. {
  1189. float4 positionOS : INTERNALTESSPOS;
  1190. float3 normalOS : NORMAL;
  1191. UNITY_VERTEX_INPUT_INSTANCE_ID
  1192. };
  1193. struct TessellationFactors
  1194. {
  1195. float edge[3] : SV_TessFactor;
  1196. float inside : SV_InsideTessFactor;
  1197. };
  1198. VertexControl vert ( Attributes input )
  1199. {
  1200. VertexControl output;
  1201. UNITY_SETUP_INSTANCE_ID(input);
  1202. UNITY_TRANSFER_INSTANCE_ID(input, output);
  1203. output.positionOS = input.positionOS;
  1204. output.normalOS = input.normalOS;
  1205. return output;
  1206. }
  1207. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  1208. {
  1209. TessellationFactors output;
  1210. float4 tf = 1;
  1211. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1212. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1213. #if defined(ASE_FIXED_TESSELLATION)
  1214. tf = FixedTess( tessValue );
  1215. #elif defined(ASE_DISTANCE_TESSELLATION)
  1216. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1217. #elif defined(ASE_LENGTH_TESSELLATION)
  1218. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1219. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1220. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1221. #endif
  1222. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  1223. return output;
  1224. }
  1225. [domain("tri")]
  1226. [partitioning("fractional_odd")]
  1227. [outputtopology("triangle_cw")]
  1228. [patchconstantfunc("TessellationFunction")]
  1229. [outputcontrolpoints(3)]
  1230. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1231. {
  1232. return patch[id];
  1233. }
  1234. [domain("tri")]
  1235. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1236. {
  1237. Attributes output = (Attributes) 0;
  1238. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  1239. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  1240. #if defined(ASE_PHONG_TESSELLATION)
  1241. float3 pp[3];
  1242. for (int i = 0; i < 3; ++i)
  1243. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  1244. float phongStrength = _TessPhongStrength;
  1245. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  1246. #endif
  1247. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  1248. return VertexFunction(output);
  1249. }
  1250. #else
  1251. PackedVaryings vert ( Attributes input )
  1252. {
  1253. return VertexFunction( input );
  1254. }
  1255. #endif
  1256. void frag(PackedVaryings input
  1257. , out half4 outNormalWS : SV_Target0
  1258. #ifdef ASE_DEPTH_WRITE_ON
  1259. ,out float outputDepth : ASE_SV_DEPTH
  1260. #endif
  1261. #ifdef _WRITE_RENDERING_LAYERS
  1262. , out float4 outRenderingLayers : SV_Target1
  1263. #endif
  1264. )
  1265. {
  1266. UNITY_SETUP_INSTANCE_ID(input);
  1267. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
  1268. float3 WorldPosition = input.positionWS;
  1269. float3 WorldNormal = input.normalWS;
  1270. float4 ClipPos = input.clipPosV;
  1271. float4 ScreenPos = ComputeScreenPos( input.clipPosV );
  1272. float Alpha = 1;
  1273. float AlphaClipThreshold = 0.5;
  1274. #ifdef ASE_DEPTH_WRITE_ON
  1275. float DepthValue = input.positionCS.z;
  1276. #endif
  1277. #ifdef _ALPHATEST_ON
  1278. clip(Alpha - AlphaClipThreshold);
  1279. #endif
  1280. #if defined(LOD_FADE_CROSSFADE)
  1281. LODFadeCrossFade( input.positionCS );
  1282. #endif
  1283. #ifdef ASE_DEPTH_WRITE_ON
  1284. outputDepth = DepthValue;
  1285. #endif
  1286. #if defined(_GBUFFER_NORMALS_OCT)
  1287. float3 normalWS = normalize(input.normalWS);
  1288. float2 octNormalWS = PackNormalOctQuadEncode(normalWS);
  1289. float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5);
  1290. half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS);
  1291. outNormalWS = half4(packedNormalWS, 0.0);
  1292. #else
  1293. float3 normalWS = input.normalWS;
  1294. outNormalWS = half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1295. #endif
  1296. #ifdef _WRITE_RENDERING_LAYERS
  1297. uint renderingLayers = GetMeshRenderingLayer();
  1298. outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0);
  1299. #endif
  1300. }
  1301. ENDHLSL
  1302. }
  1303. }
  1304. CustomEditor "UnityEditor.ShaderGraphUnlitGUI"
  1305. FallBack "Hidden/Shader Graph/FallbackError"
  1306. Fallback "Hidden/InternalErrorShader"
  1307. }
  1308. /*ASEBEGIN
  1309. Version=19801
  1310. Node;AmplifyShaderEditor.CommentaryNode;55;-1478.847,1542.836;Inherit;False;1348.639;814.7972;Comment;15;33;28;50;31;35;51;49;29;30;32;48;34;67;68;69;rongjie;1,1,1,1;0;0
  1311. Node;AmplifyShaderEditor.CommentaryNode;54;-1250.246,914.5117;Inherit;False;830.3158;483.1761;Comment;6;61;62;52;53;38;37;mask;1,1,1,1;0;0
  1312. Node;AmplifyShaderEditor.CommentaryNode;22;-2105.63,-240.8798;Inherit;False;1495.365;1020.31;Comment;15;16;18;19;17;14;11;15;12;20;13;46;63;64;65;66;;1,1,1,1;0;0
  1313. Node;AmplifyShaderEditor.CommentaryNode;39;-2211.743,831.0613;Inherit;False;808.6021;543.3561;Comment;6;45;44;43;42;41;40;数据流控制 uv 滚动;1,1,1,1;0;0
  1314. Node;AmplifyShaderEditor.SamplerNode;37;-741.5298,964.5117;Inherit;True;Property;_Mask;Mask;16;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1315. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;71;-160.0472,479.2065;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1316. Node;AmplifyShaderEditor.SamplerNode;28;-823.3346,1687.361;Inherit;True;Property;_dissolve;dissolve;11;0;Create;True;0;0;0;False;0;False;-1;None;ca1f245540fbeaa44925b44b3bf1137e;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1317. Node;AmplifyShaderEditor.TextureCoordinatesNode;48;-1319.813,2021.865;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
  1318. Node;AmplifyShaderEditor.SimpleAddOpNode;35;-533.7675,1924.828;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1319. Node;AmplifyShaderEditor.VertexColorNode;27;-457.5723,413.3982;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1320. Node;AmplifyShaderEditor.SamplerNode;10;-576.018,-144.1307;Inherit;True;Property;_Main_Tex;Main_Tex;4;0;Create;True;0;0;0;False;0;False;-1;None;8dd972cbb6cdc024a9da718d46ea3dfc;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1321. Node;AmplifyShaderEditor.RoundOpNode;43;-1554.143,1109.573;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  1322. Node;AmplifyShaderEditor.LerpOp;58;-93.26752,-193.9448;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
  1323. Node;AmplifyShaderEditor.DynamicAppendNode;44;-1896.038,906.0115;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1324. Node;AmplifyShaderEditor.TextureCoordinatesNode;42;-1920.383,1077.022;Inherit;False;0;10;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
  1325. Node;AmplifyShaderEditor.SamplerNode;11;-1454.453,-68.04037;Inherit;True;Property;_Turb_Noise;Turb_Noise;8;0;Create;True;0;0;0;False;0;False;-1;None;8dd972cbb6cdc024a9da718d46ea3dfc;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1326. Node;AmplifyShaderEditor.TextureCoordinatesNode;29;-1328.151,1592.836;Inherit;False;0;28;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
  1327. Node;AmplifyShaderEditor.RangedFloatNode;51;-1428.847,2242.234;Inherit;False;Property;_CustomDataDissolve;CustomDataDissolve;15;0;Create;True;0;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0
  1328. Node;AmplifyShaderEditor.TextureCoordinatesNode;38;-1175.546,980.5729;Inherit;False;0;37;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
  1329. Node;AmplifyShaderEditor.SmoothstepOpNode;33;-384.008,1689.036;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
  1330. Node;AmplifyShaderEditor.RoundOpNode;59;-217.8831,26.97256;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  1331. Node;AmplifyShaderEditor.RangedFloatNode;16;-1363.593,179.8082;Float;False;Property;_Turb_Value;Turb_Value;9;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  1332. Node;AmplifyShaderEditor.SimpleAddOpNode;17;-855.9427,23.89853;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1333. Node;AmplifyShaderEditor.RangedFloatNode;34;-718.8226,2128.601;Float;False;Property;_DissSoft;DissSoft;13;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  1334. Node;AmplifyShaderEditor.Vector2Node;30;-1423.425,1722.784;Float;False;Property;_Diss_UV;Diss_UV;14;0;Create;True;0;0;0;False;0;False;0,0;1,1;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  1335. Node;AmplifyShaderEditor.PannerNode;12;-1709.95,-39.18789;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1336. Node;AmplifyShaderEditor.LerpOp;69;-823.3308,1919.283;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  1337. Node;AmplifyShaderEditor.RangedFloatNode;25;-464.3903,707.5239;Inherit;False;Property;_Alpha;Alpha;3;0;Create;True;0;0;0;False;0;False;1;0;0;1;0;1;FLOAT;0
  1338. Node;AmplifyShaderEditor.LerpOp;50;-1019.727,2034.972;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  1339. Node;AmplifyShaderEditor.RoundOpNode;49;-1144.448,2208.081;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  1340. Node;AmplifyShaderEditor.PannerNode;31;-1079.477,1723.289;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1341. Node;AmplifyShaderEditor.RangedFloatNode;40;-1953.16,1262.573;Inherit;False;Property;_CustomDataMainUV;CustomDataMainUV;7;0;Create;True;0;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0
  1342. Node;AmplifyShaderEditor.SimpleAddOpNode;41;-1696.486,908.3846;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1343. Node;AmplifyShaderEditor.ColorNode;26;-478.6241,211.8819;Float;False;Property;_Main_Color;Main_Color;2;1;[HDR];Create;True;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1344. Node;AmplifyShaderEditor.TextureCoordinatesNode;14;-2055.63,-190.8798;Inherit;False;0;11;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
  1345. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;23;-15.3132,109.9529;Inherit;True;6;6;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;1;COLOR;0
  1346. Node;AmplifyShaderEditor.LerpOp;46;-1209.387,515.3032;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0
  1347. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;68;-1210.374,1841.185;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1348. Node;AmplifyShaderEditor.Vector2Node;52;-1197.689,1114.869;Float;False;Property;_MaskUVSpeed;MaskUVSpeed;17;0;Create;True;0;0;0;False;0;False;0,0;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  1349. Node;AmplifyShaderEditor.FunctionNode;62;-1195.657,1272.392;Inherit;False;CombatTiem;0;;1;1401d2ae4598ff34b8dfd9c35ce782b0;0;0;1;FLOAT;0
  1350. Node;AmplifyShaderEditor.Vector2Node;20;-1813.873,453.0892;Float;False;Property;_Main_UV;Main_UV;6;0;Create;True;0;0;0;False;0;False;0,0;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  1351. Node;AmplifyShaderEditor.PannerNode;53;-935.498,1050.188;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1352. Node;AmplifyShaderEditor.RangedFloatNode;60;-552.8481,55.0993;Inherit;False;Property;_MainAlpha;MainAlpha;5;0;Create;False;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0
  1353. Node;AmplifyShaderEditor.TextureCoordinatesNode;45;-2161.742,881.0615;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
  1354. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;15;-1140.439,22.43915;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1355. Node;AmplifyShaderEditor.TextureCoordinatesNode;18;-1823.574,307.5572;Inherit;False;0;10;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
  1356. Node;AmplifyShaderEditor.FunctionNode;65;-2039.261,107.5029;Inherit;False;CombatTiem;0;;6;1401d2ae4598ff34b8dfd9c35ce782b0;0;0;1;FLOAT;0
  1357. Node;AmplifyShaderEditor.PannerNode;19;-1525.58,369.9281;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1358. Node;AmplifyShaderEditor.FunctionNode;63;-1810.334,628.0292;Inherit;False;CombatTiem;0;;7;1401d2ae4598ff34b8dfd9c35ce782b0;0;0;1;FLOAT;0
  1359. Node;AmplifyShaderEditor.RangedFloatNode;70;-143.0472,676.2065;Inherit;False;Property;_ca;_ca;18;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
  1360. Node;AmplifyShaderEditor.Vector2Node;13;-2019.255,-54.00905;Float;False;Property;_Turb_UV;Turb_UV;10;0;Create;True;0;0;0;False;0;False;0,0;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  1361. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;61;-1010.099,1219.268;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1362. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;66;-1862.703,86.37891;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1363. Node;AmplifyShaderEditor.RangedFloatNode;32;-1172.35,1948.927;Float;False;Property;_Diss_value;Diss_value;12;0;Create;True;0;0;0;False;0;False;0;1;0;0;0;1;FLOAT;0
  1364. Node;AmplifyShaderEditor.FunctionNode;67;-1395.932,1894.309;Inherit;False;CombatTiem;0;;8;1401d2ae4598ff34b8dfd9c35ce782b0;0;0;1;FLOAT;0
  1365. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;64;-1624.776,574.9052;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1366. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;5;0,0;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;True;1;1;False;;1;False;;4;1;False;;1;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1367. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;7;0,0;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1368. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;398.8127,118.6854;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;LT/AddMoveTurbDissolve;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;9;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;2;False;;False;False;False;False;False;False;False;False;False;True;False;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;5;True;7;d3d11;glcore;gles;gles3;metal;vulkan;ps5;0;True;True;1;1;False;;1;False;;4;1;False;;1;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;Hidden/InternalErrorShader;0;0;Standard;25;Surface;1;637910504726801164; Blend;2;637916603008026574;Two Sided;0;637920019439021414;Alpha Clipping;0;638816022277547753; Use Shadow Threshold;0;0;Forward Only;0;0;Cast Shadows;0;637910503133663964;Receive Shadows;0;637910503141455090;GPU Instancing;1;0;LOD CrossFade;0;0;Built-in Fog;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;Write Depth;0;0; Early Z;0;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;True;True;True;False;False;;False;0
  1369. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;9;0,0;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1370. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;8;0,0;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1371. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;6;0,0;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1372. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;4;0,0;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1373. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;0,118.6854;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1374. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;3;0,0;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1375. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;2;0,0;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1376. WireConnection;37;1;53;0
  1377. WireConnection;71;0;70;0
  1378. WireConnection;71;1;25;0
  1379. WireConnection;28;1;31;0
  1380. WireConnection;35;0;50;0
  1381. WireConnection;35;1;34;0
  1382. WireConnection;10;1;17;0
  1383. WireConnection;43;0;40;0
  1384. WireConnection;58;0;10;0
  1385. WireConnection;58;1;10;4
  1386. WireConnection;58;2;59;0
  1387. WireConnection;44;0;45;3
  1388. WireConnection;44;1;45;4
  1389. WireConnection;11;1;12;0
  1390. WireConnection;33;0;28;1
  1391. WireConnection;33;1;69;0
  1392. WireConnection;33;2;35;0
  1393. WireConnection;59;0;60;0
  1394. WireConnection;17;0;15;0
  1395. WireConnection;17;1;46;0
  1396. WireConnection;12;0;14;0
  1397. WireConnection;12;2;66;0
  1398. WireConnection;69;0;32;0
  1399. WireConnection;69;1;48;1
  1400. WireConnection;69;2;51;0
  1401. WireConnection;50;0;32;0
  1402. WireConnection;50;1;48;1
  1403. WireConnection;50;2;49;0
  1404. WireConnection;49;0;51;0
  1405. WireConnection;31;0;29;0
  1406. WireConnection;31;2;68;0
  1407. WireConnection;41;0;44;0
  1408. WireConnection;41;1;42;0
  1409. WireConnection;23;0;58;0
  1410. WireConnection;23;1;26;0
  1411. WireConnection;23;2;27;0
  1412. WireConnection;23;3;37;1
  1413. WireConnection;23;4;71;0
  1414. WireConnection;23;5;33;0
  1415. WireConnection;46;0;19;0
  1416. WireConnection;46;1;41;0
  1417. WireConnection;46;2;43;0
  1418. WireConnection;68;0;30;0
  1419. WireConnection;68;1;67;0
  1420. WireConnection;53;0;38;0
  1421. WireConnection;53;2;61;0
  1422. WireConnection;15;0;11;1
  1423. WireConnection;15;1;16;0
  1424. WireConnection;19;0;18;0
  1425. WireConnection;19;2;64;0
  1426. WireConnection;61;0;52;0
  1427. WireConnection;61;1;62;0
  1428. WireConnection;66;0;13;0
  1429. WireConnection;66;1;65;0
  1430. WireConnection;64;0;20;0
  1431. WireConnection;64;1;63;0
  1432. WireConnection;1;2;23;0
  1433. ASEEND*/
  1434. //CHKSM=119118C9B75F11BA1797972381142C8D4ACE4101