Samplerefine.shader 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "LT/Samplerefine"
  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. [ASEBegin]_MainTex("MainTex", 2D) = "white" {}
  10. _power("power", Float) = 1
  11. _Liangbu("Liangbu", Float) = 1
  12. _CTime("_CTime", Float) = 1
  13. _zhongjian("zhongjian", Float) = 1
  14. _lerp("lerp", Float) = 0.5
  15. [HDR]_Color("Color", Color) = (1,1,1,1)
  16. _alpha("alpha", Float) = 1
  17. _Main_UV("Main_UV", Vector) = (0,0,0,0)
  18. _CustomDataMainUV("CustomDataMainUV", Range( 0 , 1)) = 0
  19. _Turb_Noise("Turb_Noise", 2D) = "white" {}
  20. _Turb_Value("Turb_Value", Float) = 0
  21. _Turb_UV("Turb_UV", Vector) = (0,0,0,0)
  22. [ASEEnd]_Mask("Mask", 2D) = "white" {}
  23. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  24. [HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
  25. [HideInInspector]_QueueControl("_QueueControl", Float) = -1
  26. [HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  27. [HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  28. [HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  29. //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
  30. //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
  31. //_TessMin( "Tess Min Distance", Float ) = 10
  32. //_TessMax( "Tess Max Distance", Float ) = 25
  33. //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
  34. //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
  35. }
  36. SubShader
  37. {
  38. LOD 0
  39. Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" }
  40. Cull Off
  41. AlphaToMask Off
  42. HLSLINCLUDE
  43. #pragma target 3.0
  44. #pragma prefer_hlslcc gles
  45. #pragma exclude_renderers d3d11_9x
  46. #ifndef ASE_TESS_FUNCS
  47. #define ASE_TESS_FUNCS
  48. float4 FixedTess( float tessValue )
  49. {
  50. return tessValue;
  51. }
  52. float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
  53. {
  54. float3 wpos = mul(o2w,vertex).xyz;
  55. float dist = distance (wpos, cameraPos);
  56. float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
  57. return f;
  58. }
  59. float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
  60. {
  61. float4 tess;
  62. tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
  63. tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
  64. tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
  65. tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
  66. return tess;
  67. }
  68. float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
  69. {
  70. float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
  71. float len = distance(wpos0, wpos1);
  72. float f = max(len * scParams.y / (edgeLen * dist), 1.0);
  73. return f;
  74. }
  75. float DistanceFromPlane (float3 pos, float4 plane)
  76. {
  77. float d = dot (float4(pos,1.0f), plane);
  78. return d;
  79. }
  80. bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
  81. {
  82. float4 planeTest;
  83. planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  84. (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  85. (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
  86. planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  87. (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  88. (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
  89. planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  90. (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  91. (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
  92. planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  93. (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  94. (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
  95. return !all (planeTest);
  96. }
  97. float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
  98. {
  99. float3 f;
  100. f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
  101. f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
  102. f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
  103. return CalcTriEdgeTessFactors (f);
  104. }
  105. float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
  106. {
  107. float3 pos0 = mul(o2w,v0).xyz;
  108. float3 pos1 = mul(o2w,v1).xyz;
  109. float3 pos2 = mul(o2w,v2).xyz;
  110. float4 tess;
  111. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  112. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  113. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  114. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  115. return tess;
  116. }
  117. float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
  118. {
  119. float3 pos0 = mul(o2w,v0).xyz;
  120. float3 pos1 = mul(o2w,v1).xyz;
  121. float3 pos2 = mul(o2w,v2).xyz;
  122. float4 tess;
  123. if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
  124. {
  125. tess = 0.0f;
  126. }
  127. else
  128. {
  129. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  130. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  131. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  132. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  133. }
  134. return tess;
  135. }
  136. #endif //ASE_TESS_FUNCS
  137. ENDHLSL
  138. Pass
  139. {
  140. Name "Forward"
  141. Tags { "LightMode"="UniversalForwardOnly" }
  142. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  143. ZWrite Off
  144. ZTest LEqual
  145. Offset 0 , 0
  146. ColorMask RGBA
  147. HLSLPROGRAM
  148. #pragma multi_compile_instancing
  149. #define _RECEIVE_SHADOWS_OFF 1
  150. #define ASE_SRP_VERSION 999999
  151. #pragma multi_compile _ LIGHTMAP_ON
  152. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  153. #pragma shader_feature _ _SAMPLE_GI
  154. #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  155. #pragma multi_compile _ DEBUG_DISPLAY
  156. #define SHADERPASS SHADERPASS_UNLIT
  157. #pragma vertex vert
  158. #pragma fragment frag
  159. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  160. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  161. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  162. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  163. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  164. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  165. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  166. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  167. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  168. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  169. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  170. #define ASE_NEEDS_FRAG_COLOR
  171. struct VertexInput
  172. {
  173. float4 vertex : POSITION;
  174. float3 ase_normal : NORMAL;
  175. float4 ase_texcoord : TEXCOORD0;
  176. float4 ase_texcoord1 : TEXCOORD1;
  177. float4 ase_color : COLOR;
  178. UNITY_VERTEX_INPUT_INSTANCE_ID
  179. };
  180. struct VertexOutput
  181. {
  182. float4 clipPos : SV_POSITION;
  183. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  184. float3 worldPos : TEXCOORD0;
  185. #endif
  186. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  187. float4 shadowCoord : TEXCOORD1;
  188. #endif
  189. #ifdef ASE_FOG
  190. float fogFactor : TEXCOORD2;
  191. #endif
  192. float4 ase_texcoord3 : TEXCOORD3;
  193. float4 ase_texcoord4 : TEXCOORD4;
  194. float4 ase_color : COLOR;
  195. UNITY_VERTEX_INPUT_INSTANCE_ID
  196. UNITY_VERTEX_OUTPUT_STEREO
  197. };
  198. CBUFFER_START(UnityPerMaterial)
  199. float4 _Turb_Noise_ST;
  200. float4 _MainTex_ST;
  201. float4 _Color;
  202. float4 _Mask_ST;
  203. float2 _Turb_UV;
  204. float2 _Main_UV;
  205. float _CTime;
  206. float _Turb_Value;
  207. float _CustomDataMainUV;
  208. float _power;
  209. float _Liangbu;
  210. float _zhongjian;
  211. float _lerp;
  212. float _alpha;
  213. #ifdef TESSELLATION_ON
  214. float _TessPhongStrength;
  215. float _TessValue;
  216. float _TessMin;
  217. float _TessMax;
  218. float _TessEdgeLength;
  219. float _TessMaxDisp;
  220. #endif
  221. CBUFFER_END
  222. sampler2D _MainTex;
  223. sampler2D _Turb_Noise;
  224. sampler2D _Mask;
  225. VertexOutput VertexFunction ( VertexInput v )
  226. {
  227. VertexOutput o = (VertexOutput)0;
  228. UNITY_SETUP_INSTANCE_ID(v);
  229. UNITY_TRANSFER_INSTANCE_ID(v, o);
  230. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  231. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  232. o.ase_texcoord4 = v.ase_texcoord1;
  233. o.ase_color = v.ase_color;
  234. //setting value to unused interpolator channels and avoid initialization warnings
  235. o.ase_texcoord3.zw = 0;
  236. #ifdef ASE_ABSOLUTE_VERTEX_POS
  237. float3 defaultVertexValue = v.vertex.xyz;
  238. #else
  239. float3 defaultVertexValue = float3(0, 0, 0);
  240. #endif
  241. float3 vertexValue = defaultVertexValue;
  242. #ifdef ASE_ABSOLUTE_VERTEX_POS
  243. v.vertex.xyz = vertexValue;
  244. #else
  245. v.vertex.xyz += vertexValue;
  246. #endif
  247. v.ase_normal = v.ase_normal;
  248. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  249. float4 positionCS = TransformWorldToHClip( positionWS );
  250. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  251. o.worldPos = positionWS;
  252. #endif
  253. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  254. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  255. vertexInput.positionWS = positionWS;
  256. vertexInput.positionCS = positionCS;
  257. o.shadowCoord = GetShadowCoord( vertexInput );
  258. #endif
  259. #ifdef ASE_FOG
  260. o.fogFactor = ComputeFogFactor( positionCS.z );
  261. #endif
  262. o.clipPos = positionCS;
  263. return o;
  264. }
  265. #if defined(TESSELLATION_ON)
  266. struct VertexControl
  267. {
  268. float4 vertex : INTERNALTESSPOS;
  269. float3 ase_normal : NORMAL;
  270. float4 ase_texcoord : TEXCOORD0;
  271. float4 ase_texcoord1 : TEXCOORD1;
  272. float4 ase_color : COLOR;
  273. UNITY_VERTEX_INPUT_INSTANCE_ID
  274. };
  275. struct TessellationFactors
  276. {
  277. float edge[3] : SV_TessFactor;
  278. float inside : SV_InsideTessFactor;
  279. };
  280. VertexControl vert ( VertexInput v )
  281. {
  282. VertexControl o;
  283. UNITY_SETUP_INSTANCE_ID(v);
  284. UNITY_TRANSFER_INSTANCE_ID(v, o);
  285. o.vertex = v.vertex;
  286. o.ase_normal = v.ase_normal;
  287. o.ase_texcoord = v.ase_texcoord;
  288. o.ase_texcoord1 = v.ase_texcoord1;
  289. o.ase_color = v.ase_color;
  290. return o;
  291. }
  292. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  293. {
  294. TessellationFactors o;
  295. float4 tf = 1;
  296. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  297. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  298. #if defined(ASE_FIXED_TESSELLATION)
  299. tf = FixedTess( tessValue );
  300. #elif defined(ASE_DISTANCE_TESSELLATION)
  301. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  302. #elif defined(ASE_LENGTH_TESSELLATION)
  303. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  304. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  305. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  306. #endif
  307. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  308. return o;
  309. }
  310. [domain("tri")]
  311. [partitioning("fractional_odd")]
  312. [outputtopology("triangle_cw")]
  313. [patchconstantfunc("TessellationFunction")]
  314. [outputcontrolpoints(3)]
  315. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  316. {
  317. return patch[id];
  318. }
  319. [domain("tri")]
  320. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  321. {
  322. VertexInput o = (VertexInput) 0;
  323. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  324. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  325. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  326. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  327. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  328. #if defined(ASE_PHONG_TESSELLATION)
  329. float3 pp[3];
  330. for (int i = 0; i < 3; ++i)
  331. 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));
  332. float phongStrength = _TessPhongStrength;
  333. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  334. #endif
  335. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  336. return VertexFunction(o);
  337. }
  338. #else
  339. VertexOutput vert ( VertexInput v )
  340. {
  341. return VertexFunction( v );
  342. }
  343. #endif
  344. half4 frag ( VertexOutput IN ) : SV_Target
  345. {
  346. UNITY_SETUP_INSTANCE_ID( IN );
  347. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  348. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  349. float3 WorldPosition = IN.worldPos;
  350. #endif
  351. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  352. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  353. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  354. ShadowCoords = IN.shadowCoord;
  355. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  356. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  357. #endif
  358. #endif
  359. float2 uv_Turb_Noise = IN.ase_texcoord3.xy * _Turb_Noise_ST.xy + _Turb_Noise_ST.zw;
  360. float2 panner65 = ( 1.0 * _Time.y * ( _Turb_UV * _CTime ) + uv_Turb_Noise);
  361. float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  362. float2 panner57 = ( 1.0 * _Time.y * ( _Main_UV * _CTime ) + uv_MainTex);
  363. float4 texCoord69 = IN.ase_texcoord4;
  364. texCoord69.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  365. float2 appendResult70 = (float2(texCoord69.z , texCoord69.w));
  366. float2 lerpResult59 = lerp( panner57 , ( appendResult70 + uv_MainTex ) , round( _CustomDataMainUV ));
  367. float4 tex2DNode10 = tex2D( _MainTex, ( ( tex2D( _Turb_Noise, panner65 ).r * _Turb_Value ) + lerpResult59 ) );
  368. float4 temp_cast_0 = (_power).xxxx;
  369. float4 lerpResult41 = lerp( ( pow( tex2DNode10 , temp_cast_0 ) * _Liangbu ) , ( tex2DNode10 * _zhongjian ) , _lerp);
  370. float2 uv_Mask = IN.ase_texcoord3.xy * _Mask_ST.xy + _Mask_ST.zw;
  371. float3 BakedAlbedo = 0;
  372. float3 BakedEmission = 0;
  373. float3 Color = ( ( lerpResult41 * _Color ) * IN.ase_color ).rgb;
  374. float Alpha = ( ( ( tex2DNode10.a * tex2D( _Mask, uv_Mask ).r ) * _alpha ) * IN.ase_color.a );
  375. float AlphaClipThreshold = 0.5;
  376. float AlphaClipThresholdShadow = 0.5;
  377. #ifdef _ALPHATEST_ON
  378. clip( Alpha - AlphaClipThreshold );
  379. #endif
  380. #if defined(_DBUFFER)
  381. ApplyDecalToBaseColor(IN.clipPos, Color);
  382. #endif
  383. #if defined(_ALPHAPREMULTIPLY_ON)
  384. Color *= Alpha;
  385. #endif
  386. #ifdef LOD_FADE_CROSSFADE
  387. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  388. #endif
  389. #ifdef ASE_FOG
  390. Color = MixFog( Color, IN.fogFactor );
  391. #endif
  392. return half4( Color, Alpha );
  393. }
  394. ENDHLSL
  395. }
  396. Pass
  397. {
  398. Name "DepthOnly"
  399. Tags { "LightMode"="DepthOnly" }
  400. ZWrite On
  401. ColorMask 0
  402. AlphaToMask Off
  403. HLSLPROGRAM
  404. #pragma multi_compile_instancing
  405. #define _RECEIVE_SHADOWS_OFF 1
  406. #define ASE_SRP_VERSION 999999
  407. #pragma vertex vert
  408. #pragma fragment frag
  409. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  410. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  411. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  412. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  413. struct VertexInput
  414. {
  415. float4 vertex : POSITION;
  416. float3 ase_normal : NORMAL;
  417. float4 ase_texcoord : TEXCOORD0;
  418. float4 ase_texcoord1 : TEXCOORD1;
  419. float4 ase_color : COLOR;
  420. UNITY_VERTEX_INPUT_INSTANCE_ID
  421. };
  422. struct VertexOutput
  423. {
  424. float4 clipPos : SV_POSITION;
  425. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  426. float3 worldPos : TEXCOORD0;
  427. #endif
  428. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  429. float4 shadowCoord : TEXCOORD1;
  430. #endif
  431. float4 ase_texcoord2 : TEXCOORD2;
  432. float4 ase_texcoord3 : TEXCOORD3;
  433. float4 ase_color : COLOR;
  434. UNITY_VERTEX_INPUT_INSTANCE_ID
  435. UNITY_VERTEX_OUTPUT_STEREO
  436. };
  437. CBUFFER_START(UnityPerMaterial)
  438. float4 _Turb_Noise_ST;
  439. float4 _MainTex_ST;
  440. float4 _Color;
  441. float4 _Mask_ST;
  442. float2 _Turb_UV;
  443. float2 _Main_UV;
  444. float _CTime;
  445. float _Turb_Value;
  446. float _CustomDataMainUV;
  447. float _power;
  448. float _Liangbu;
  449. float _zhongjian;
  450. float _lerp;
  451. float _alpha;
  452. #ifdef TESSELLATION_ON
  453. float _TessPhongStrength;
  454. float _TessValue;
  455. float _TessMin;
  456. float _TessMax;
  457. float _TessEdgeLength;
  458. float _TessMaxDisp;
  459. #endif
  460. CBUFFER_END
  461. sampler2D _MainTex;
  462. sampler2D _Turb_Noise;
  463. sampler2D _Mask;
  464. VertexOutput VertexFunction( VertexInput v )
  465. {
  466. VertexOutput o = (VertexOutput)0;
  467. UNITY_SETUP_INSTANCE_ID(v);
  468. UNITY_TRANSFER_INSTANCE_ID(v, o);
  469. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  470. o.ase_texcoord2.xy = v.ase_texcoord.xy;
  471. o.ase_texcoord3 = v.ase_texcoord1;
  472. o.ase_color = v.ase_color;
  473. //setting value to unused interpolator channels and avoid initialization warnings
  474. o.ase_texcoord2.zw = 0;
  475. #ifdef ASE_ABSOLUTE_VERTEX_POS
  476. float3 defaultVertexValue = v.vertex.xyz;
  477. #else
  478. float3 defaultVertexValue = float3(0, 0, 0);
  479. #endif
  480. float3 vertexValue = defaultVertexValue;
  481. #ifdef ASE_ABSOLUTE_VERTEX_POS
  482. v.vertex.xyz = vertexValue;
  483. #else
  484. v.vertex.xyz += vertexValue;
  485. #endif
  486. v.ase_normal = v.ase_normal;
  487. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  488. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  489. o.worldPos = positionWS;
  490. #endif
  491. o.clipPos = TransformWorldToHClip( positionWS );
  492. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  493. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  494. vertexInput.positionWS = positionWS;
  495. vertexInput.positionCS = o.clipPos;
  496. o.shadowCoord = GetShadowCoord( vertexInput );
  497. #endif
  498. return o;
  499. }
  500. #if defined(TESSELLATION_ON)
  501. struct VertexControl
  502. {
  503. float4 vertex : INTERNALTESSPOS;
  504. float3 ase_normal : NORMAL;
  505. float4 ase_texcoord : TEXCOORD0;
  506. float4 ase_texcoord1 : TEXCOORD1;
  507. float4 ase_color : COLOR;
  508. UNITY_VERTEX_INPUT_INSTANCE_ID
  509. };
  510. struct TessellationFactors
  511. {
  512. float edge[3] : SV_TessFactor;
  513. float inside : SV_InsideTessFactor;
  514. };
  515. VertexControl vert ( VertexInput v )
  516. {
  517. VertexControl o;
  518. UNITY_SETUP_INSTANCE_ID(v);
  519. UNITY_TRANSFER_INSTANCE_ID(v, o);
  520. o.vertex = v.vertex;
  521. o.ase_normal = v.ase_normal;
  522. o.ase_texcoord = v.ase_texcoord;
  523. o.ase_texcoord1 = v.ase_texcoord1;
  524. o.ase_color = v.ase_color;
  525. return o;
  526. }
  527. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  528. {
  529. TessellationFactors o;
  530. float4 tf = 1;
  531. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  532. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  533. #if defined(ASE_FIXED_TESSELLATION)
  534. tf = FixedTess( tessValue );
  535. #elif defined(ASE_DISTANCE_TESSELLATION)
  536. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  537. #elif defined(ASE_LENGTH_TESSELLATION)
  538. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  539. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  540. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  541. #endif
  542. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  543. return o;
  544. }
  545. [domain("tri")]
  546. [partitioning("fractional_odd")]
  547. [outputtopology("triangle_cw")]
  548. [patchconstantfunc("TessellationFunction")]
  549. [outputcontrolpoints(3)]
  550. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  551. {
  552. return patch[id];
  553. }
  554. [domain("tri")]
  555. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  556. {
  557. VertexInput o = (VertexInput) 0;
  558. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  559. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  560. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  561. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  562. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  563. #if defined(ASE_PHONG_TESSELLATION)
  564. float3 pp[3];
  565. for (int i = 0; i < 3; ++i)
  566. 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));
  567. float phongStrength = _TessPhongStrength;
  568. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  569. #endif
  570. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  571. return VertexFunction(o);
  572. }
  573. #else
  574. VertexOutput vert ( VertexInput v )
  575. {
  576. return VertexFunction( v );
  577. }
  578. #endif
  579. half4 frag(VertexOutput IN ) : SV_TARGET
  580. {
  581. UNITY_SETUP_INSTANCE_ID(IN);
  582. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  583. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  584. float3 WorldPosition = IN.worldPos;
  585. #endif
  586. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  587. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  588. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  589. ShadowCoords = IN.shadowCoord;
  590. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  591. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  592. #endif
  593. #endif
  594. float2 uv_Turb_Noise = IN.ase_texcoord2.xy * _Turb_Noise_ST.xy + _Turb_Noise_ST.zw;
  595. float2 panner65 = ( 1.0 * _Time.y * ( _Turb_UV * _CTime ) + uv_Turb_Noise);
  596. float2 uv_MainTex = IN.ase_texcoord2.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  597. float2 panner57 = ( 1.0 * _Time.y * ( _Main_UV * _CTime ) + uv_MainTex);
  598. float4 texCoord69 = IN.ase_texcoord3;
  599. texCoord69.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 );
  600. float2 appendResult70 = (float2(texCoord69.z , texCoord69.w));
  601. float2 lerpResult59 = lerp( panner57 , ( appendResult70 + uv_MainTex ) , round( _CustomDataMainUV ));
  602. float4 tex2DNode10 = tex2D( _MainTex, ( ( tex2D( _Turb_Noise, panner65 ).r * _Turb_Value ) + lerpResult59 ) );
  603. float2 uv_Mask = IN.ase_texcoord2.xy * _Mask_ST.xy + _Mask_ST.zw;
  604. float Alpha = ( ( ( tex2DNode10.a * tex2D( _Mask, uv_Mask ).r ) * _alpha ) * IN.ase_color.a );
  605. float AlphaClipThreshold = 0.5;
  606. #ifdef _ALPHATEST_ON
  607. clip(Alpha - AlphaClipThreshold);
  608. #endif
  609. #ifdef LOD_FADE_CROSSFADE
  610. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  611. #endif
  612. return 0;
  613. }
  614. ENDHLSL
  615. }
  616. Pass
  617. {
  618. Name "Universal2D"
  619. Tags { "LightMode"="Universal2D" }
  620. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  621. ZWrite Off
  622. ZTest LEqual
  623. Offset 0 , 0
  624. ColorMask RGBA
  625. HLSLPROGRAM
  626. #pragma multi_compile_instancing
  627. #define _RECEIVE_SHADOWS_OFF 1
  628. #define ASE_SRP_VERSION 999999
  629. #pragma multi_compile _ LIGHTMAP_ON
  630. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  631. #pragma shader_feature _ _SAMPLE_GI
  632. #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  633. #pragma multi_compile _ DEBUG_DISPLAY
  634. #define SHADERPASS SHADERPASS_UNLIT
  635. #pragma vertex vert
  636. #pragma fragment frag
  637. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  638. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  639. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  640. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  641. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  642. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  643. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  644. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  645. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  646. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  647. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  648. #define ASE_NEEDS_FRAG_COLOR
  649. struct VertexInput
  650. {
  651. float4 vertex : POSITION;
  652. float3 ase_normal : NORMAL;
  653. float4 ase_texcoord : TEXCOORD0;
  654. float4 ase_texcoord1 : TEXCOORD1;
  655. float4 ase_color : COLOR;
  656. UNITY_VERTEX_INPUT_INSTANCE_ID
  657. };
  658. struct VertexOutput
  659. {
  660. float4 clipPos : SV_POSITION;
  661. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  662. float3 worldPos : TEXCOORD0;
  663. #endif
  664. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  665. float4 shadowCoord : TEXCOORD1;
  666. #endif
  667. #ifdef ASE_FOG
  668. float fogFactor : TEXCOORD2;
  669. #endif
  670. float4 ase_texcoord3 : TEXCOORD3;
  671. float4 ase_texcoord4 : TEXCOORD4;
  672. float4 ase_color : COLOR;
  673. UNITY_VERTEX_INPUT_INSTANCE_ID
  674. UNITY_VERTEX_OUTPUT_STEREO
  675. };
  676. CBUFFER_START(UnityPerMaterial)
  677. float4 _Turb_Noise_ST;
  678. float4 _MainTex_ST;
  679. float4 _Color;
  680. float4 _Mask_ST;
  681. float2 _Turb_UV;
  682. float2 _Main_UV;
  683. float _CTime;
  684. float _Turb_Value;
  685. float _CustomDataMainUV;
  686. float _power;
  687. float _Liangbu;
  688. float _zhongjian;
  689. float _lerp;
  690. float _alpha;
  691. #ifdef TESSELLATION_ON
  692. float _TessPhongStrength;
  693. float _TessValue;
  694. float _TessMin;
  695. float _TessMax;
  696. float _TessEdgeLength;
  697. float _TessMaxDisp;
  698. #endif
  699. CBUFFER_END
  700. sampler2D _MainTex;
  701. sampler2D _Turb_Noise;
  702. sampler2D _Mask;
  703. VertexOutput VertexFunction ( VertexInput v )
  704. {
  705. VertexOutput o = (VertexOutput)0;
  706. UNITY_SETUP_INSTANCE_ID(v);
  707. UNITY_TRANSFER_INSTANCE_ID(v, o);
  708. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  709. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  710. o.ase_texcoord4 = v.ase_texcoord1;
  711. o.ase_color = v.ase_color;
  712. //setting value to unused interpolator channels and avoid initialization warnings
  713. o.ase_texcoord3.zw = 0;
  714. #ifdef ASE_ABSOLUTE_VERTEX_POS
  715. float3 defaultVertexValue = v.vertex.xyz;
  716. #else
  717. float3 defaultVertexValue = float3(0, 0, 0);
  718. #endif
  719. float3 vertexValue = defaultVertexValue;
  720. #ifdef ASE_ABSOLUTE_VERTEX_POS
  721. v.vertex.xyz = vertexValue;
  722. #else
  723. v.vertex.xyz += vertexValue;
  724. #endif
  725. v.ase_normal = v.ase_normal;
  726. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  727. float4 positionCS = TransformWorldToHClip( positionWS );
  728. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  729. o.worldPos = positionWS;
  730. #endif
  731. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  732. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  733. vertexInput.positionWS = positionWS;
  734. vertexInput.positionCS = positionCS;
  735. o.shadowCoord = GetShadowCoord( vertexInput );
  736. #endif
  737. #ifdef ASE_FOG
  738. o.fogFactor = ComputeFogFactor( positionCS.z );
  739. #endif
  740. o.clipPos = positionCS;
  741. return o;
  742. }
  743. #if defined(TESSELLATION_ON)
  744. struct VertexControl
  745. {
  746. float4 vertex : INTERNALTESSPOS;
  747. float3 ase_normal : NORMAL;
  748. float4 ase_texcoord : TEXCOORD0;
  749. float4 ase_texcoord1 : TEXCOORD1;
  750. float4 ase_color : COLOR;
  751. UNITY_VERTEX_INPUT_INSTANCE_ID
  752. };
  753. struct TessellationFactors
  754. {
  755. float edge[3] : SV_TessFactor;
  756. float inside : SV_InsideTessFactor;
  757. };
  758. VertexControl vert ( VertexInput v )
  759. {
  760. VertexControl o;
  761. UNITY_SETUP_INSTANCE_ID(v);
  762. UNITY_TRANSFER_INSTANCE_ID(v, o);
  763. o.vertex = v.vertex;
  764. o.ase_normal = v.ase_normal;
  765. o.ase_texcoord = v.ase_texcoord;
  766. o.ase_texcoord1 = v.ase_texcoord1;
  767. o.ase_color = v.ase_color;
  768. return o;
  769. }
  770. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  771. {
  772. TessellationFactors o;
  773. float4 tf = 1;
  774. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  775. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  776. #if defined(ASE_FIXED_TESSELLATION)
  777. tf = FixedTess( tessValue );
  778. #elif defined(ASE_DISTANCE_TESSELLATION)
  779. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  780. #elif defined(ASE_LENGTH_TESSELLATION)
  781. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  782. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  783. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  784. #endif
  785. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  786. return o;
  787. }
  788. [domain("tri")]
  789. [partitioning("fractional_odd")]
  790. [outputtopology("triangle_cw")]
  791. [patchconstantfunc("TessellationFunction")]
  792. [outputcontrolpoints(3)]
  793. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  794. {
  795. return patch[id];
  796. }
  797. [domain("tri")]
  798. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  799. {
  800. VertexInput o = (VertexInput) 0;
  801. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  802. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  803. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  804. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  805. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  806. #if defined(ASE_PHONG_TESSELLATION)
  807. float3 pp[3];
  808. for (int i = 0; i < 3; ++i)
  809. 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));
  810. float phongStrength = _TessPhongStrength;
  811. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  812. #endif
  813. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  814. return VertexFunction(o);
  815. }
  816. #else
  817. VertexOutput vert ( VertexInput v )
  818. {
  819. return VertexFunction( v );
  820. }
  821. #endif
  822. half4 frag ( VertexOutput IN ) : SV_Target
  823. {
  824. UNITY_SETUP_INSTANCE_ID( IN );
  825. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  826. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  827. float3 WorldPosition = IN.worldPos;
  828. #endif
  829. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  830. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  831. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  832. ShadowCoords = IN.shadowCoord;
  833. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  834. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  835. #endif
  836. #endif
  837. float2 uv_Turb_Noise = IN.ase_texcoord3.xy * _Turb_Noise_ST.xy + _Turb_Noise_ST.zw;
  838. float2 panner65 = ( 1.0 * _Time.y * ( _Turb_UV * _CTime ) + uv_Turb_Noise);
  839. float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  840. float2 panner57 = ( 1.0 * _Time.y * ( _Main_UV * _CTime ) + uv_MainTex);
  841. float4 texCoord69 = IN.ase_texcoord4;
  842. texCoord69.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  843. float2 appendResult70 = (float2(texCoord69.z , texCoord69.w));
  844. float2 lerpResult59 = lerp( panner57 , ( appendResult70 + uv_MainTex ) , round( _CustomDataMainUV ));
  845. float4 tex2DNode10 = tex2D( _MainTex, ( ( tex2D( _Turb_Noise, panner65 ).r * _Turb_Value ) + lerpResult59 ) );
  846. float4 temp_cast_0 = (_power).xxxx;
  847. float4 lerpResult41 = lerp( ( pow( tex2DNode10 , temp_cast_0 ) * _Liangbu ) , ( tex2DNode10 * _zhongjian ) , _lerp);
  848. float2 uv_Mask = IN.ase_texcoord3.xy * _Mask_ST.xy + _Mask_ST.zw;
  849. float3 BakedAlbedo = 0;
  850. float3 BakedEmission = 0;
  851. float3 Color = ( ( lerpResult41 * _Color ) * IN.ase_color ).rgb;
  852. float Alpha = ( ( ( tex2DNode10.a * tex2D( _Mask, uv_Mask ).r ) * _alpha ) * IN.ase_color.a );
  853. float AlphaClipThreshold = 0.5;
  854. float AlphaClipThresholdShadow = 0.5;
  855. #ifdef _ALPHATEST_ON
  856. clip( Alpha - AlphaClipThreshold );
  857. #endif
  858. #if defined(_DBUFFER)
  859. ApplyDecalToBaseColor(IN.clipPos, Color);
  860. #endif
  861. #if defined(_ALPHAPREMULTIPLY_ON)
  862. Color *= Alpha;
  863. #endif
  864. #ifdef LOD_FADE_CROSSFADE
  865. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  866. #endif
  867. #ifdef ASE_FOG
  868. Color = MixFog( Color, IN.fogFactor );
  869. #endif
  870. return half4( Color, Alpha );
  871. }
  872. ENDHLSL
  873. }
  874. Pass
  875. {
  876. Name "SceneSelectionPass"
  877. Tags { "LightMode"="SceneSelectionPass" }
  878. Cull Off
  879. HLSLPROGRAM
  880. #pragma multi_compile_instancing
  881. #define _RECEIVE_SHADOWS_OFF 1
  882. #define ASE_SRP_VERSION 999999
  883. #pragma only_renderers d3d11 glcore gles gles3
  884. #pragma vertex vert
  885. #pragma fragment frag
  886. #define ATTRIBUTES_NEED_NORMAL
  887. #define ATTRIBUTES_NEED_TANGENT
  888. #define SHADERPASS SHADERPASS_DEPTHONLY
  889. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  890. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  891. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  892. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  893. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  894. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  895. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  896. struct VertexInput
  897. {
  898. float4 vertex : POSITION;
  899. float3 ase_normal : NORMAL;
  900. float4 ase_texcoord : TEXCOORD0;
  901. float4 ase_texcoord1 : TEXCOORD1;
  902. float4 ase_color : COLOR;
  903. UNITY_VERTEX_INPUT_INSTANCE_ID
  904. };
  905. struct VertexOutput
  906. {
  907. float4 clipPos : SV_POSITION;
  908. float4 ase_texcoord : TEXCOORD0;
  909. float4 ase_texcoord1 : TEXCOORD1;
  910. float4 ase_color : COLOR;
  911. UNITY_VERTEX_INPUT_INSTANCE_ID
  912. UNITY_VERTEX_OUTPUT_STEREO
  913. };
  914. CBUFFER_START(UnityPerMaterial)
  915. float4 _Turb_Noise_ST;
  916. float4 _MainTex_ST;
  917. float4 _Color;
  918. float4 _Mask_ST;
  919. float2 _Turb_UV;
  920. float2 _Main_UV;
  921. float _CTime;
  922. float _Turb_Value;
  923. float _CustomDataMainUV;
  924. float _power;
  925. float _Liangbu;
  926. float _zhongjian;
  927. float _lerp;
  928. float _alpha;
  929. #ifdef TESSELLATION_ON
  930. float _TessPhongStrength;
  931. float _TessValue;
  932. float _TessMin;
  933. float _TessMax;
  934. float _TessEdgeLength;
  935. float _TessMaxDisp;
  936. #endif
  937. CBUFFER_END
  938. sampler2D _MainTex;
  939. sampler2D _Turb_Noise;
  940. sampler2D _Mask;
  941. int _ObjectId;
  942. int _PassValue;
  943. struct SurfaceDescription
  944. {
  945. float Alpha;
  946. float AlphaClipThreshold;
  947. };
  948. VertexOutput VertexFunction(VertexInput v )
  949. {
  950. VertexOutput o;
  951. ZERO_INITIALIZE(VertexOutput, o);
  952. UNITY_SETUP_INSTANCE_ID(v);
  953. UNITY_TRANSFER_INSTANCE_ID(v, o);
  954. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  955. o.ase_texcoord.xy = v.ase_texcoord.xy;
  956. o.ase_texcoord1 = v.ase_texcoord1;
  957. o.ase_color = v.ase_color;
  958. //setting value to unused interpolator channels and avoid initialization warnings
  959. o.ase_texcoord.zw = 0;
  960. #ifdef ASE_ABSOLUTE_VERTEX_POS
  961. float3 defaultVertexValue = v.vertex.xyz;
  962. #else
  963. float3 defaultVertexValue = float3(0, 0, 0);
  964. #endif
  965. float3 vertexValue = defaultVertexValue;
  966. #ifdef ASE_ABSOLUTE_VERTEX_POS
  967. v.vertex.xyz = vertexValue;
  968. #else
  969. v.vertex.xyz += vertexValue;
  970. #endif
  971. v.ase_normal = v.ase_normal;
  972. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  973. o.clipPos = TransformWorldToHClip(positionWS);
  974. return o;
  975. }
  976. #if defined(TESSELLATION_ON)
  977. struct VertexControl
  978. {
  979. float4 vertex : INTERNALTESSPOS;
  980. float3 ase_normal : NORMAL;
  981. float4 ase_texcoord : TEXCOORD0;
  982. float4 ase_texcoord1 : TEXCOORD1;
  983. float4 ase_color : COLOR;
  984. UNITY_VERTEX_INPUT_INSTANCE_ID
  985. };
  986. struct TessellationFactors
  987. {
  988. float edge[3] : SV_TessFactor;
  989. float inside : SV_InsideTessFactor;
  990. };
  991. VertexControl vert ( VertexInput v )
  992. {
  993. VertexControl o;
  994. UNITY_SETUP_INSTANCE_ID(v);
  995. UNITY_TRANSFER_INSTANCE_ID(v, o);
  996. o.vertex = v.vertex;
  997. o.ase_normal = v.ase_normal;
  998. o.ase_texcoord = v.ase_texcoord;
  999. o.ase_texcoord1 = v.ase_texcoord1;
  1000. o.ase_color = v.ase_color;
  1001. return o;
  1002. }
  1003. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1004. {
  1005. TessellationFactors o;
  1006. float4 tf = 1;
  1007. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1008. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1009. #if defined(ASE_FIXED_TESSELLATION)
  1010. tf = FixedTess( tessValue );
  1011. #elif defined(ASE_DISTANCE_TESSELLATION)
  1012. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1013. #elif defined(ASE_LENGTH_TESSELLATION)
  1014. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1015. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1016. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1017. #endif
  1018. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1019. return o;
  1020. }
  1021. [domain("tri")]
  1022. [partitioning("fractional_odd")]
  1023. [outputtopology("triangle_cw")]
  1024. [patchconstantfunc("TessellationFunction")]
  1025. [outputcontrolpoints(3)]
  1026. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1027. {
  1028. return patch[id];
  1029. }
  1030. [domain("tri")]
  1031. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1032. {
  1033. VertexInput o = (VertexInput) 0;
  1034. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1035. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1036. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1037. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1038. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1039. #if defined(ASE_PHONG_TESSELLATION)
  1040. float3 pp[3];
  1041. for (int i = 0; i < 3; ++i)
  1042. 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));
  1043. float phongStrength = _TessPhongStrength;
  1044. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1045. #endif
  1046. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1047. return VertexFunction(o);
  1048. }
  1049. #else
  1050. VertexOutput vert ( VertexInput v )
  1051. {
  1052. return VertexFunction( v );
  1053. }
  1054. #endif
  1055. half4 frag(VertexOutput IN ) : SV_TARGET
  1056. {
  1057. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1058. float2 uv_Turb_Noise = IN.ase_texcoord.xy * _Turb_Noise_ST.xy + _Turb_Noise_ST.zw;
  1059. float2 panner65 = ( 1.0 * _Time.y * ( _Turb_UV * _CTime ) + uv_Turb_Noise);
  1060. float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1061. float2 panner57 = ( 1.0 * _Time.y * ( _Main_UV * _CTime ) + uv_MainTex);
  1062. float4 texCoord69 = IN.ase_texcoord1;
  1063. texCoord69.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1064. float2 appendResult70 = (float2(texCoord69.z , texCoord69.w));
  1065. float2 lerpResult59 = lerp( panner57 , ( appendResult70 + uv_MainTex ) , round( _CustomDataMainUV ));
  1066. float4 tex2DNode10 = tex2D( _MainTex, ( ( tex2D( _Turb_Noise, panner65 ).r * _Turb_Value ) + lerpResult59 ) );
  1067. float2 uv_Mask = IN.ase_texcoord.xy * _Mask_ST.xy + _Mask_ST.zw;
  1068. surfaceDescription.Alpha = ( ( ( tex2DNode10.a * tex2D( _Mask, uv_Mask ).r ) * _alpha ) * IN.ase_color.a );
  1069. surfaceDescription.AlphaClipThreshold = 0.5;
  1070. #if _ALPHATEST_ON
  1071. float alphaClipThreshold = 0.01f;
  1072. #if ALPHA_CLIP_THRESHOLD
  1073. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1074. #endif
  1075. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1076. #endif
  1077. half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  1078. return outColor;
  1079. }
  1080. ENDHLSL
  1081. }
  1082. Pass
  1083. {
  1084. Name "ScenePickingPass"
  1085. Tags { "LightMode"="Picking" }
  1086. HLSLPROGRAM
  1087. #pragma multi_compile_instancing
  1088. #define _RECEIVE_SHADOWS_OFF 1
  1089. #define ASE_SRP_VERSION 999999
  1090. #pragma only_renderers d3d11 glcore gles gles3
  1091. #pragma vertex vert
  1092. #pragma fragment frag
  1093. #define ATTRIBUTES_NEED_NORMAL
  1094. #define ATTRIBUTES_NEED_TANGENT
  1095. #define SHADERPASS SHADERPASS_DEPTHONLY
  1096. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1097. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1098. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1099. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1100. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1101. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1102. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1103. struct VertexInput
  1104. {
  1105. float4 vertex : POSITION;
  1106. float3 ase_normal : NORMAL;
  1107. float4 ase_texcoord : TEXCOORD0;
  1108. float4 ase_texcoord1 : TEXCOORD1;
  1109. float4 ase_color : COLOR;
  1110. UNITY_VERTEX_INPUT_INSTANCE_ID
  1111. };
  1112. struct VertexOutput
  1113. {
  1114. float4 clipPos : SV_POSITION;
  1115. float4 ase_texcoord : TEXCOORD0;
  1116. float4 ase_texcoord1 : TEXCOORD1;
  1117. float4 ase_color : COLOR;
  1118. UNITY_VERTEX_INPUT_INSTANCE_ID
  1119. UNITY_VERTEX_OUTPUT_STEREO
  1120. };
  1121. CBUFFER_START(UnityPerMaterial)
  1122. float4 _Turb_Noise_ST;
  1123. float4 _MainTex_ST;
  1124. float4 _Color;
  1125. float4 _Mask_ST;
  1126. float2 _Turb_UV;
  1127. float2 _Main_UV;
  1128. float _CTime;
  1129. float _Turb_Value;
  1130. float _CustomDataMainUV;
  1131. float _power;
  1132. float _Liangbu;
  1133. float _zhongjian;
  1134. float _lerp;
  1135. float _alpha;
  1136. #ifdef TESSELLATION_ON
  1137. float _TessPhongStrength;
  1138. float _TessValue;
  1139. float _TessMin;
  1140. float _TessMax;
  1141. float _TessEdgeLength;
  1142. float _TessMaxDisp;
  1143. #endif
  1144. CBUFFER_END
  1145. sampler2D _MainTex;
  1146. sampler2D _Turb_Noise;
  1147. sampler2D _Mask;
  1148. float4 _SelectionID;
  1149. struct SurfaceDescription
  1150. {
  1151. float Alpha;
  1152. float AlphaClipThreshold;
  1153. };
  1154. VertexOutput VertexFunction(VertexInput v )
  1155. {
  1156. VertexOutput o;
  1157. ZERO_INITIALIZE(VertexOutput, o);
  1158. UNITY_SETUP_INSTANCE_ID(v);
  1159. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1160. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1161. o.ase_texcoord.xy = v.ase_texcoord.xy;
  1162. o.ase_texcoord1 = v.ase_texcoord1;
  1163. o.ase_color = v.ase_color;
  1164. //setting value to unused interpolator channels and avoid initialization warnings
  1165. o.ase_texcoord.zw = 0;
  1166. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1167. float3 defaultVertexValue = v.vertex.xyz;
  1168. #else
  1169. float3 defaultVertexValue = float3(0, 0, 0);
  1170. #endif
  1171. float3 vertexValue = defaultVertexValue;
  1172. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1173. v.vertex.xyz = vertexValue;
  1174. #else
  1175. v.vertex.xyz += vertexValue;
  1176. #endif
  1177. v.ase_normal = v.ase_normal;
  1178. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1179. o.clipPos = TransformWorldToHClip(positionWS);
  1180. return o;
  1181. }
  1182. #if defined(TESSELLATION_ON)
  1183. struct VertexControl
  1184. {
  1185. float4 vertex : INTERNALTESSPOS;
  1186. float3 ase_normal : NORMAL;
  1187. float4 ase_texcoord : TEXCOORD0;
  1188. float4 ase_texcoord1 : TEXCOORD1;
  1189. float4 ase_color : COLOR;
  1190. UNITY_VERTEX_INPUT_INSTANCE_ID
  1191. };
  1192. struct TessellationFactors
  1193. {
  1194. float edge[3] : SV_TessFactor;
  1195. float inside : SV_InsideTessFactor;
  1196. };
  1197. VertexControl vert ( VertexInput v )
  1198. {
  1199. VertexControl o;
  1200. UNITY_SETUP_INSTANCE_ID(v);
  1201. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1202. o.vertex = v.vertex;
  1203. o.ase_normal = v.ase_normal;
  1204. o.ase_texcoord = v.ase_texcoord;
  1205. o.ase_texcoord1 = v.ase_texcoord1;
  1206. o.ase_color = v.ase_color;
  1207. return o;
  1208. }
  1209. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1210. {
  1211. TessellationFactors o;
  1212. float4 tf = 1;
  1213. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1214. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1215. #if defined(ASE_FIXED_TESSELLATION)
  1216. tf = FixedTess( tessValue );
  1217. #elif defined(ASE_DISTANCE_TESSELLATION)
  1218. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1219. #elif defined(ASE_LENGTH_TESSELLATION)
  1220. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1221. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1222. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1223. #endif
  1224. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1225. return o;
  1226. }
  1227. [domain("tri")]
  1228. [partitioning("fractional_odd")]
  1229. [outputtopology("triangle_cw")]
  1230. [patchconstantfunc("TessellationFunction")]
  1231. [outputcontrolpoints(3)]
  1232. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1233. {
  1234. return patch[id];
  1235. }
  1236. [domain("tri")]
  1237. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1238. {
  1239. VertexInput o = (VertexInput) 0;
  1240. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1241. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1242. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1243. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1244. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1245. #if defined(ASE_PHONG_TESSELLATION)
  1246. float3 pp[3];
  1247. for (int i = 0; i < 3; ++i)
  1248. 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));
  1249. float phongStrength = _TessPhongStrength;
  1250. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1251. #endif
  1252. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1253. return VertexFunction(o);
  1254. }
  1255. #else
  1256. VertexOutput vert ( VertexInput v )
  1257. {
  1258. return VertexFunction( v );
  1259. }
  1260. #endif
  1261. half4 frag(VertexOutput IN ) : SV_TARGET
  1262. {
  1263. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1264. float2 uv_Turb_Noise = IN.ase_texcoord.xy * _Turb_Noise_ST.xy + _Turb_Noise_ST.zw;
  1265. float2 panner65 = ( 1.0 * _Time.y * ( _Turb_UV * _CTime ) + uv_Turb_Noise);
  1266. float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1267. float2 panner57 = ( 1.0 * _Time.y * ( _Main_UV * _CTime ) + uv_MainTex);
  1268. float4 texCoord69 = IN.ase_texcoord1;
  1269. texCoord69.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1270. float2 appendResult70 = (float2(texCoord69.z , texCoord69.w));
  1271. float2 lerpResult59 = lerp( panner57 , ( appendResult70 + uv_MainTex ) , round( _CustomDataMainUV ));
  1272. float4 tex2DNode10 = tex2D( _MainTex, ( ( tex2D( _Turb_Noise, panner65 ).r * _Turb_Value ) + lerpResult59 ) );
  1273. float2 uv_Mask = IN.ase_texcoord.xy * _Mask_ST.xy + _Mask_ST.zw;
  1274. surfaceDescription.Alpha = ( ( ( tex2DNode10.a * tex2D( _Mask, uv_Mask ).r ) * _alpha ) * IN.ase_color.a );
  1275. surfaceDescription.AlphaClipThreshold = 0.5;
  1276. #if _ALPHATEST_ON
  1277. float alphaClipThreshold = 0.01f;
  1278. #if ALPHA_CLIP_THRESHOLD
  1279. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1280. #endif
  1281. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1282. #endif
  1283. half4 outColor = 0;
  1284. outColor = _SelectionID;
  1285. return outColor;
  1286. }
  1287. ENDHLSL
  1288. }
  1289. Pass
  1290. {
  1291. Name "DepthNormals"
  1292. Tags { "LightMode"="DepthNormalsOnly" }
  1293. ZTest LEqual
  1294. ZWrite On
  1295. HLSLPROGRAM
  1296. #pragma multi_compile_instancing
  1297. #define _RECEIVE_SHADOWS_OFF 1
  1298. #define ASE_SRP_VERSION 999999
  1299. #pragma only_renderers d3d11 glcore gles gles3
  1300. #pragma multi_compile_fog
  1301. #pragma instancing_options renderinglayer
  1302. #pragma vertex vert
  1303. #pragma fragment frag
  1304. #define ATTRIBUTES_NEED_NORMAL
  1305. #define ATTRIBUTES_NEED_TANGENT
  1306. #define VARYINGS_NEED_NORMAL_WS
  1307. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1308. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1309. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1310. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1311. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1312. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1313. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1314. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1315. struct VertexInput
  1316. {
  1317. float4 vertex : POSITION;
  1318. float3 ase_normal : NORMAL;
  1319. float4 ase_texcoord : TEXCOORD0;
  1320. float4 ase_texcoord1 : TEXCOORD1;
  1321. float4 ase_color : COLOR;
  1322. UNITY_VERTEX_INPUT_INSTANCE_ID
  1323. };
  1324. struct VertexOutput
  1325. {
  1326. float4 clipPos : SV_POSITION;
  1327. float3 normalWS : TEXCOORD0;
  1328. float4 ase_texcoord1 : TEXCOORD1;
  1329. float4 ase_texcoord2 : TEXCOORD2;
  1330. float4 ase_color : COLOR;
  1331. UNITY_VERTEX_INPUT_INSTANCE_ID
  1332. UNITY_VERTEX_OUTPUT_STEREO
  1333. };
  1334. CBUFFER_START(UnityPerMaterial)
  1335. float4 _Turb_Noise_ST;
  1336. float4 _MainTex_ST;
  1337. float4 _Color;
  1338. float4 _Mask_ST;
  1339. float2 _Turb_UV;
  1340. float2 _Main_UV;
  1341. float _CTime;
  1342. float _Turb_Value;
  1343. float _CustomDataMainUV;
  1344. float _power;
  1345. float _Liangbu;
  1346. float _zhongjian;
  1347. float _lerp;
  1348. float _alpha;
  1349. #ifdef TESSELLATION_ON
  1350. float _TessPhongStrength;
  1351. float _TessValue;
  1352. float _TessMin;
  1353. float _TessMax;
  1354. float _TessEdgeLength;
  1355. float _TessMaxDisp;
  1356. #endif
  1357. CBUFFER_END
  1358. sampler2D _MainTex;
  1359. sampler2D _Turb_Noise;
  1360. sampler2D _Mask;
  1361. struct SurfaceDescription
  1362. {
  1363. float Alpha;
  1364. float AlphaClipThreshold;
  1365. };
  1366. VertexOutput VertexFunction(VertexInput v )
  1367. {
  1368. VertexOutput o;
  1369. ZERO_INITIALIZE(VertexOutput, o);
  1370. UNITY_SETUP_INSTANCE_ID(v);
  1371. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1372. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1373. o.ase_texcoord1.xy = v.ase_texcoord.xy;
  1374. o.ase_texcoord2 = v.ase_texcoord1;
  1375. o.ase_color = v.ase_color;
  1376. //setting value to unused interpolator channels and avoid initialization warnings
  1377. o.ase_texcoord1.zw = 0;
  1378. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1379. float3 defaultVertexValue = v.vertex.xyz;
  1380. #else
  1381. float3 defaultVertexValue = float3(0, 0, 0);
  1382. #endif
  1383. float3 vertexValue = defaultVertexValue;
  1384. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1385. v.vertex.xyz = vertexValue;
  1386. #else
  1387. v.vertex.xyz += vertexValue;
  1388. #endif
  1389. v.ase_normal = v.ase_normal;
  1390. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1391. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1392. o.clipPos = TransformWorldToHClip(positionWS);
  1393. o.normalWS.xyz = normalWS;
  1394. return o;
  1395. }
  1396. #if defined(TESSELLATION_ON)
  1397. struct VertexControl
  1398. {
  1399. float4 vertex : INTERNALTESSPOS;
  1400. float3 ase_normal : NORMAL;
  1401. float4 ase_texcoord : TEXCOORD0;
  1402. float4 ase_texcoord1 : TEXCOORD1;
  1403. float4 ase_color : COLOR;
  1404. UNITY_VERTEX_INPUT_INSTANCE_ID
  1405. };
  1406. struct TessellationFactors
  1407. {
  1408. float edge[3] : SV_TessFactor;
  1409. float inside : SV_InsideTessFactor;
  1410. };
  1411. VertexControl vert ( VertexInput v )
  1412. {
  1413. VertexControl o;
  1414. UNITY_SETUP_INSTANCE_ID(v);
  1415. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1416. o.vertex = v.vertex;
  1417. o.ase_normal = v.ase_normal;
  1418. o.ase_texcoord = v.ase_texcoord;
  1419. o.ase_texcoord1 = v.ase_texcoord1;
  1420. o.ase_color = v.ase_color;
  1421. return o;
  1422. }
  1423. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1424. {
  1425. TessellationFactors o;
  1426. float4 tf = 1;
  1427. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1428. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1429. #if defined(ASE_FIXED_TESSELLATION)
  1430. tf = FixedTess( tessValue );
  1431. #elif defined(ASE_DISTANCE_TESSELLATION)
  1432. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1433. #elif defined(ASE_LENGTH_TESSELLATION)
  1434. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1435. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1436. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1437. #endif
  1438. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1439. return o;
  1440. }
  1441. [domain("tri")]
  1442. [partitioning("fractional_odd")]
  1443. [outputtopology("triangle_cw")]
  1444. [patchconstantfunc("TessellationFunction")]
  1445. [outputcontrolpoints(3)]
  1446. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1447. {
  1448. return patch[id];
  1449. }
  1450. [domain("tri")]
  1451. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1452. {
  1453. VertexInput o = (VertexInput) 0;
  1454. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1455. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1456. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1457. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1458. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1459. #if defined(ASE_PHONG_TESSELLATION)
  1460. float3 pp[3];
  1461. for (int i = 0; i < 3; ++i)
  1462. 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));
  1463. float phongStrength = _TessPhongStrength;
  1464. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1465. #endif
  1466. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1467. return VertexFunction(o);
  1468. }
  1469. #else
  1470. VertexOutput vert ( VertexInput v )
  1471. {
  1472. return VertexFunction( v );
  1473. }
  1474. #endif
  1475. half4 frag(VertexOutput IN ) : SV_TARGET
  1476. {
  1477. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1478. float2 uv_Turb_Noise = IN.ase_texcoord1.xy * _Turb_Noise_ST.xy + _Turb_Noise_ST.zw;
  1479. float2 panner65 = ( 1.0 * _Time.y * ( _Turb_UV * _CTime ) + uv_Turb_Noise);
  1480. float2 uv_MainTex = IN.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1481. float2 panner57 = ( 1.0 * _Time.y * ( _Main_UV * _CTime ) + uv_MainTex);
  1482. float4 texCoord69 = IN.ase_texcoord2;
  1483. texCoord69.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1484. float2 appendResult70 = (float2(texCoord69.z , texCoord69.w));
  1485. float2 lerpResult59 = lerp( panner57 , ( appendResult70 + uv_MainTex ) , round( _CustomDataMainUV ));
  1486. float4 tex2DNode10 = tex2D( _MainTex, ( ( tex2D( _Turb_Noise, panner65 ).r * _Turb_Value ) + lerpResult59 ) );
  1487. float2 uv_Mask = IN.ase_texcoord1.xy * _Mask_ST.xy + _Mask_ST.zw;
  1488. surfaceDescription.Alpha = ( ( ( tex2DNode10.a * tex2D( _Mask, uv_Mask ).r ) * _alpha ) * IN.ase_color.a );
  1489. surfaceDescription.AlphaClipThreshold = 0.5;
  1490. #if _ALPHATEST_ON
  1491. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1492. #endif
  1493. #ifdef LOD_FADE_CROSSFADE
  1494. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1495. #endif
  1496. float3 normalWS = IN.normalWS;
  1497. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1498. }
  1499. ENDHLSL
  1500. }
  1501. Pass
  1502. {
  1503. Name "DepthNormalsOnly"
  1504. Tags { "LightMode"="DepthNormalsOnly" }
  1505. ZTest LEqual
  1506. ZWrite On
  1507. HLSLPROGRAM
  1508. #pragma multi_compile_instancing
  1509. #define _RECEIVE_SHADOWS_OFF 1
  1510. #define ASE_SRP_VERSION 999999
  1511. #pragma exclude_renderers glcore gles gles3
  1512. #pragma vertex vert
  1513. #pragma fragment frag
  1514. #define ATTRIBUTES_NEED_NORMAL
  1515. #define ATTRIBUTES_NEED_TANGENT
  1516. #define ATTRIBUTES_NEED_TEXCOORD1
  1517. #define VARYINGS_NEED_NORMAL_WS
  1518. #define VARYINGS_NEED_TANGENT_WS
  1519. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1520. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1521. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1522. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1523. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1524. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1525. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1526. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1527. struct VertexInput
  1528. {
  1529. float4 vertex : POSITION;
  1530. float3 ase_normal : NORMAL;
  1531. float4 ase_texcoord : TEXCOORD0;
  1532. float4 ase_texcoord1 : TEXCOORD1;
  1533. float4 ase_color : COLOR;
  1534. UNITY_VERTEX_INPUT_INSTANCE_ID
  1535. };
  1536. struct VertexOutput
  1537. {
  1538. float4 clipPos : SV_POSITION;
  1539. float3 normalWS : TEXCOORD0;
  1540. float4 ase_texcoord1 : TEXCOORD1;
  1541. float4 ase_texcoord2 : TEXCOORD2;
  1542. float4 ase_color : COLOR;
  1543. UNITY_VERTEX_INPUT_INSTANCE_ID
  1544. UNITY_VERTEX_OUTPUT_STEREO
  1545. };
  1546. CBUFFER_START(UnityPerMaterial)
  1547. float4 _Turb_Noise_ST;
  1548. float4 _MainTex_ST;
  1549. float4 _Color;
  1550. float4 _Mask_ST;
  1551. float2 _Turb_UV;
  1552. float2 _Main_UV;
  1553. float _CTime;
  1554. float _Turb_Value;
  1555. float _CustomDataMainUV;
  1556. float _power;
  1557. float _Liangbu;
  1558. float _zhongjian;
  1559. float _lerp;
  1560. float _alpha;
  1561. #ifdef TESSELLATION_ON
  1562. float _TessPhongStrength;
  1563. float _TessValue;
  1564. float _TessMin;
  1565. float _TessMax;
  1566. float _TessEdgeLength;
  1567. float _TessMaxDisp;
  1568. #endif
  1569. CBUFFER_END
  1570. sampler2D _MainTex;
  1571. sampler2D _Turb_Noise;
  1572. sampler2D _Mask;
  1573. struct SurfaceDescription
  1574. {
  1575. float Alpha;
  1576. float AlphaClipThreshold;
  1577. };
  1578. VertexOutput VertexFunction(VertexInput v )
  1579. {
  1580. VertexOutput o;
  1581. ZERO_INITIALIZE(VertexOutput, o);
  1582. UNITY_SETUP_INSTANCE_ID(v);
  1583. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1584. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1585. o.ase_texcoord1.xy = v.ase_texcoord.xy;
  1586. o.ase_texcoord2 = v.ase_texcoord1;
  1587. o.ase_color = v.ase_color;
  1588. //setting value to unused interpolator channels and avoid initialization warnings
  1589. o.ase_texcoord1.zw = 0;
  1590. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1591. float3 defaultVertexValue = v.vertex.xyz;
  1592. #else
  1593. float3 defaultVertexValue = float3(0, 0, 0);
  1594. #endif
  1595. float3 vertexValue = defaultVertexValue;
  1596. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1597. v.vertex.xyz = vertexValue;
  1598. #else
  1599. v.vertex.xyz += vertexValue;
  1600. #endif
  1601. v.ase_normal = v.ase_normal;
  1602. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1603. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1604. o.clipPos = TransformWorldToHClip(positionWS);
  1605. o.normalWS.xyz = normalWS;
  1606. return o;
  1607. }
  1608. #if defined(TESSELLATION_ON)
  1609. struct VertexControl
  1610. {
  1611. float4 vertex : INTERNALTESSPOS;
  1612. float3 ase_normal : NORMAL;
  1613. float4 ase_texcoord : TEXCOORD0;
  1614. float4 ase_texcoord1 : TEXCOORD1;
  1615. float4 ase_color : COLOR;
  1616. UNITY_VERTEX_INPUT_INSTANCE_ID
  1617. };
  1618. struct TessellationFactors
  1619. {
  1620. float edge[3] : SV_TessFactor;
  1621. float inside : SV_InsideTessFactor;
  1622. };
  1623. VertexControl vert ( VertexInput v )
  1624. {
  1625. VertexControl o;
  1626. UNITY_SETUP_INSTANCE_ID(v);
  1627. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1628. o.vertex = v.vertex;
  1629. o.ase_normal = v.ase_normal;
  1630. o.ase_texcoord = v.ase_texcoord;
  1631. o.ase_texcoord1 = v.ase_texcoord1;
  1632. o.ase_color = v.ase_color;
  1633. return o;
  1634. }
  1635. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1636. {
  1637. TessellationFactors o;
  1638. float4 tf = 1;
  1639. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1640. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1641. #if defined(ASE_FIXED_TESSELLATION)
  1642. tf = FixedTess( tessValue );
  1643. #elif defined(ASE_DISTANCE_TESSELLATION)
  1644. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1645. #elif defined(ASE_LENGTH_TESSELLATION)
  1646. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1647. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1648. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1649. #endif
  1650. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1651. return o;
  1652. }
  1653. [domain("tri")]
  1654. [partitioning("fractional_odd")]
  1655. [outputtopology("triangle_cw")]
  1656. [patchconstantfunc("TessellationFunction")]
  1657. [outputcontrolpoints(3)]
  1658. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1659. {
  1660. return patch[id];
  1661. }
  1662. [domain("tri")]
  1663. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1664. {
  1665. VertexInput o = (VertexInput) 0;
  1666. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1667. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1668. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1669. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1670. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1671. #if defined(ASE_PHONG_TESSELLATION)
  1672. float3 pp[3];
  1673. for (int i = 0; i < 3; ++i)
  1674. 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));
  1675. float phongStrength = _TessPhongStrength;
  1676. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1677. #endif
  1678. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1679. return VertexFunction(o);
  1680. }
  1681. #else
  1682. VertexOutput vert ( VertexInput v )
  1683. {
  1684. return VertexFunction( v );
  1685. }
  1686. #endif
  1687. half4 frag(VertexOutput IN ) : SV_TARGET
  1688. {
  1689. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1690. float2 uv_Turb_Noise = IN.ase_texcoord1.xy * _Turb_Noise_ST.xy + _Turb_Noise_ST.zw;
  1691. float2 panner65 = ( 1.0 * _Time.y * ( _Turb_UV * _CTime ) + uv_Turb_Noise);
  1692. float2 uv_MainTex = IN.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1693. float2 panner57 = ( 1.0 * _Time.y * ( _Main_UV * _CTime ) + uv_MainTex);
  1694. float4 texCoord69 = IN.ase_texcoord2;
  1695. texCoord69.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1696. float2 appendResult70 = (float2(texCoord69.z , texCoord69.w));
  1697. float2 lerpResult59 = lerp( panner57 , ( appendResult70 + uv_MainTex ) , round( _CustomDataMainUV ));
  1698. float4 tex2DNode10 = tex2D( _MainTex, ( ( tex2D( _Turb_Noise, panner65 ).r * _Turb_Value ) + lerpResult59 ) );
  1699. float2 uv_Mask = IN.ase_texcoord1.xy * _Mask_ST.xy + _Mask_ST.zw;
  1700. surfaceDescription.Alpha = ( ( ( tex2DNode10.a * tex2D( _Mask, uv_Mask ).r ) * _alpha ) * IN.ase_color.a );
  1701. surfaceDescription.AlphaClipThreshold = 0.5;
  1702. #if _ALPHATEST_ON
  1703. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1704. #endif
  1705. #ifdef LOD_FADE_CROSSFADE
  1706. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1707. #endif
  1708. float3 normalWS = IN.normalWS;
  1709. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1710. }
  1711. ENDHLSL
  1712. }
  1713. }
  1714. CustomEditor "UnityEditor.ShaderGraphUnlitGUI"
  1715. Fallback "Hidden/InternalErrorShader"
  1716. }
  1717. /*ASEBEGIN
  1718. Version=18935
  1719. 132.8;434.4;2036.8;1087.8;762.5352;145.2778;1.3;True;False
  1720. Node;AmplifyShaderEditor.CommentaryNode;52;-2365.192,209.8123;Inherit;False;1495.365;1020.31;Comment;15;67;66;65;64;63;62;61;60;59;58;57;56;55;54;53;;1,1,1,1;0;0
  1721. Node;AmplifyShaderEditor.CommentaryNode;68;-2355.195,1326.076;Inherit;False;808.6021;543.3561;Comment;6;74;73;72;71;70;69;数据流控制 uv 滚动;1,1,1,1;0;0
  1722. Node;AmplifyShaderEditor.FunctionNode;64;-2292.894,594.541;Inherit;False;CombatTiem;3;;4;baa0c5cb73677dd46acb62f0afb31b96;0;0;1;FLOAT;0
  1723. Node;AmplifyShaderEditor.Vector2Node;63;-2290.062,428.0891;Float;False;Property;_Turb_UV;Turb_UV;13;0;Create;True;0;0;0;False;0;False;0,0;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  1724. Node;AmplifyShaderEditor.FunctionNode;53;-2217.411,1135.523;Inherit;False;CombatTiem;3;;5;baa0c5cb73677dd46acb62f0afb31b96;0;0;1;FLOAT;0
  1725. Node;AmplifyShaderEditor.TextureCoordinatesNode;62;-2313.1,259.8123;Inherit;False;0;58;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
  1726. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;54;-2103.894,522.541;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1727. Node;AmplifyShaderEditor.Vector2Node;55;-2216.179,997.4608;Float;False;Property;_Main_UV;Main_UV;9;0;Create;True;0;0;0;False;0;False;0,0;0,-0.2;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  1728. Node;AmplifyShaderEditor.TextureCoordinatesNode;69;-2305.194,1376.077;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
  1729. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;56;-2003.887,1061.573;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1730. Node;AmplifyShaderEditor.TextureCoordinatesNode;67;-2178.88,852.9286;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
  1731. Node;AmplifyShaderEditor.DynamicAppendNode;70;-2039.49,1401.026;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1732. Node;AmplifyShaderEditor.RangedFloatNode;71;-2096.613,1757.588;Inherit;False;Property;_CustomDataMainUV;CustomDataMainUV;10;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0
  1733. Node;AmplifyShaderEditor.PannerNode;65;-1970.558,411.5042;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1734. Node;AmplifyShaderEditor.TextureCoordinatesNode;72;-2063.835,1572.037;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
  1735. Node;AmplifyShaderEditor.SimpleAddOpNode;73;-1839.938,1403.4;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1736. Node;AmplifyShaderEditor.SamplerNode;58;-1714.015,382.6518;Inherit;True;Property;_Turb_Noise;Turb_Noise;11;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
  1737. Node;AmplifyShaderEditor.RangedFloatNode;66;-1623.155,630.5004;Float;False;Property;_Turb_Value;Turb_Value;12;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  1738. Node;AmplifyShaderEditor.RoundOpNode;74;-1698.595,1604.588;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  1739. Node;AmplifyShaderEditor.PannerNode;57;-1880.886,915.2996;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1740. Node;AmplifyShaderEditor.LerpOp;59;-1468.949,965.9954;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0
  1741. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;60;-1400.001,473.1313;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1742. Node;AmplifyShaderEditor.SimpleAddOpNode;61;-1104.828,493.8094;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1743. Node;AmplifyShaderEditor.SamplerNode;10;-349.5017,9.774245;Inherit;True;Property;_MainTex;MainTex;0;0;Create;True;0;0;0;False;0;False;-1;cdf2a69571afdc141959b4e6d0f2150d;55b804d38a5b96941b3655f392435275;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
  1744. Node;AmplifyShaderEditor.SamplerNode;75;-21.15808,738.26;Inherit;True;Property;_Mask;Mask;14;0;Create;True;0;0;0;False;0;False;-1;None;d934f6a6df9022a43981f28151507b74;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
  1745. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;76;297.795,734.992;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1746. Node;AmplifyShaderEditor.RangedFloatNode;49;599.3696,664.052;Inherit;False;Property;_alpha;alpha;8;0;Create;False;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  1747. Node;AmplifyShaderEditor.VertexColorNode;77;857.829,809.2369;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1748. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;48;819.3696,581.652;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1749. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;78;1085.029,469.2368;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1750. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;46;826.5696,304.852;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1751. Node;AmplifyShaderEditor.PowerNode;37;133.9806,-23.7496;Inherit;False;False;2;0;COLOR;0,0,0,0;False;1;FLOAT;1;False;1;COLOR;0
  1752. Node;AmplifyShaderEditor.RangedFloatNode;38;4.288601,207.5552;Inherit;False;Property;_power;power;1;0;Create;False;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  1753. Node;AmplifyShaderEditor.RangedFloatNode;40;178.9507,252.3869;Inherit;False;Property;_Liangbu;Liangbu;2;0;Create;False;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
  1754. Node;AmplifyShaderEditor.ColorNode;47;548.1697,442.452;Inherit;False;Property;_Color;Color;7;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
  1755. Node;AmplifyShaderEditor.RangedFloatNode;44;322.5696,444.0521;Inherit;False;Property;_lerp;lerp;6;0;Create;False;0;0;0;False;0;False;0.5;0;0;0;0;1;FLOAT;0
  1756. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;42;149.9046,354.7523;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1757. Node;AmplifyShaderEditor.RangedFloatNode;43;-50.28542,387.83;Inherit;False;Property;_zhongjian;zhongjian;5;0;Create;False;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  1758. Node;AmplifyShaderEditor.LerpOp;41;624.1993,235.5712;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
  1759. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;39;414.812,135.3924;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1760. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;79;1150.629,720.437;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1761. 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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;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;-1;True;3;False;-1;False;True;1;LightMode=DepthNormalsOnly;False;True;4;d3d11;glcore;gles;gles3;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1762. 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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;-1;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
  1763. 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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;True;False;False;False;False;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=ShadowCaster;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1764. 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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;True;1;5;False;-1;10;False;-1;1;1;False;-1;10;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;2;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=Universal2D;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1765. 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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;True;False;False;False;False;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;False;False;True;1;LightMode=DepthOnly;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1766. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;1020.469,-43.23972;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;True;1;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;0;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1767. 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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;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;True;4;d3d11;glcore;gles;gles3;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1768. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;1350.098,203.4634;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;LT/Samplerefine;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;2;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;True;1;5;False;-1;10;False;-1;1;1;False;-1;10;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;2;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=UniversalForwardOnly;False;False;0;Hidden/InternalErrorShader;0;0;Standard;22;Surface;1;638790107019606333; Blend;0;0;Two Sided;0;638790107095196893;Cast Shadows;0;638790107708195711; Use Shadow Threshold;0;0;Receive Shadows;0;638790107728436123;GPU Instancing;1;0;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,-1;0; Type;0;0; Tess;16,False,-1;0; Min;10,False,-1;0; Max;25,False,-1;0; Edge Length;16,False,-1;0; Max Displacement;25,False,-1;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;True;True;True;True;True;False;;False;0
  1769. 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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;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;-1;True;3;False;-1;False;True;1;LightMode=DepthNormalsOnly;False;True;15;d3d9;d3d11_9x;d3d11;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1770. 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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;True;4;d3d11;glcore;gles;gles3;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1771. WireConnection;54;0;63;0
  1772. WireConnection;54;1;64;0
  1773. WireConnection;56;0;55;0
  1774. WireConnection;56;1;53;0
  1775. WireConnection;70;0;69;3
  1776. WireConnection;70;1;69;4
  1777. WireConnection;65;0;62;0
  1778. WireConnection;65;2;54;0
  1779. WireConnection;73;0;70;0
  1780. WireConnection;73;1;72;0
  1781. WireConnection;58;1;65;0
  1782. WireConnection;74;0;71;0
  1783. WireConnection;57;0;67;0
  1784. WireConnection;57;2;56;0
  1785. WireConnection;59;0;57;0
  1786. WireConnection;59;1;73;0
  1787. WireConnection;59;2;74;0
  1788. WireConnection;60;0;58;1
  1789. WireConnection;60;1;66;0
  1790. WireConnection;61;0;60;0
  1791. WireConnection;61;1;59;0
  1792. WireConnection;10;1;61;0
  1793. WireConnection;76;0;10;4
  1794. WireConnection;76;1;75;1
  1795. WireConnection;48;0;76;0
  1796. WireConnection;48;1;49;0
  1797. WireConnection;78;0;46;0
  1798. WireConnection;78;1;77;0
  1799. WireConnection;46;0;41;0
  1800. WireConnection;46;1;47;0
  1801. WireConnection;37;0;10;0
  1802. WireConnection;37;1;38;0
  1803. WireConnection;42;0;10;0
  1804. WireConnection;42;1;43;0
  1805. WireConnection;41;0;39;0
  1806. WireConnection;41;1;42;0
  1807. WireConnection;41;2;44;0
  1808. WireConnection;39;0;37;0
  1809. WireConnection;39;1;40;0
  1810. WireConnection;79;0;48;0
  1811. WireConnection;79;1;77;4
  1812. WireConnection;1;2;78;0
  1813. WireConnection;1;3;79;0
  1814. ASEEND*/
  1815. //CHKSM=5E06A494CD0F9054CB54137A9AD2F30A0DBCFD7A