shandian.shader 93 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "LT/shandian"
  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]_alpha("alpha", Float) = 1
  10. _Color("Color", Color) = (1,1,1,1)
  11. _CTime("_CTime", Float) = 1
  12. _MainTex("MainTex", 2D) = "white" {}
  13. _MainTexQiangdu("MainTex强度", Float) = 1
  14. _TubTex("TubTex", 2D) = "white" {}
  15. _TubTexPanner("扰动Panner", Vector) = (1,0,1,1)
  16. _dissolve("dissolve", 2D) = "white" {}
  17. _dissolve_mask("dissolve_mask", 2D) = "white" {}
  18. _dissolve_qiangdu("dissolve强度", Float) = 1
  19. _dissolvePanner("溶解panner", Vector) = (0.3,0,1,0)
  20. _dissolvemaskqd("溶解mask强度", Float) = 1
  21. _dissolvevalue("溶解值", Float) = 0.9
  22. [Enum(dissolvevalue,0,UV2U,1)]_Int0("自定义参数溶解", Int) = 0
  23. [ASEEnd][Enum(off,0,on,1)]_Int1("自定义参数亮度", Int) = 0
  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 only_renderers d3d9 d3d11 glcore gles gles3 metal vulkan nomrt
  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_color : COLOR;
  177. float4 ase_texcoord1 : TEXCOORD1;
  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_color : COLOR;
  194. float4 ase_texcoord4 : TEXCOORD4;
  195. UNITY_VERTEX_INPUT_INSTANCE_ID
  196. UNITY_VERTEX_OUTPUT_STEREO
  197. };
  198. CBUFFER_START(UnityPerMaterial)
  199. float4 _Color;
  200. float4 _MainTex_ST;
  201. float4 _TubTexPanner;
  202. float4 _TubTex_ST;
  203. float4 _dissolvePanner;
  204. float4 _dissolve_ST;
  205. float4 _dissolve_mask_ST;
  206. float _CTime;
  207. float _MainTexQiangdu;
  208. int _Int1;
  209. float _alpha;
  210. float _dissolvevalue;
  211. int _Int0;
  212. float _dissolve_qiangdu;
  213. float _dissolvemaskqd;
  214. #ifdef TESSELLATION_ON
  215. float _TessPhongStrength;
  216. float _TessValue;
  217. float _TessMin;
  218. float _TessMax;
  219. float _TessEdgeLength;
  220. float _TessMaxDisp;
  221. #endif
  222. CBUFFER_END
  223. sampler2D _MainTex;
  224. sampler2D _TubTex;
  225. sampler2D _dissolve;
  226. sampler2D _dissolve_mask;
  227. VertexOutput VertexFunction ( VertexInput v )
  228. {
  229. VertexOutput o = (VertexOutput)0;
  230. UNITY_SETUP_INSTANCE_ID(v);
  231. UNITY_TRANSFER_INSTANCE_ID(v, o);
  232. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  233. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  234. o.ase_color = v.ase_color;
  235. o.ase_texcoord4 = v.ase_texcoord1;
  236. //setting value to unused interpolator channels and avoid initialization warnings
  237. o.ase_texcoord3.zw = 0;
  238. #ifdef ASE_ABSOLUTE_VERTEX_POS
  239. float3 defaultVertexValue = v.vertex.xyz;
  240. #else
  241. float3 defaultVertexValue = float3(0, 0, 0);
  242. #endif
  243. float3 vertexValue = defaultVertexValue;
  244. #ifdef ASE_ABSOLUTE_VERTEX_POS
  245. v.vertex.xyz = vertexValue;
  246. #else
  247. v.vertex.xyz += vertexValue;
  248. #endif
  249. v.ase_normal = v.ase_normal;
  250. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  251. float4 positionCS = TransformWorldToHClip( positionWS );
  252. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  253. o.worldPos = positionWS;
  254. #endif
  255. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  256. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  257. vertexInput.positionWS = positionWS;
  258. vertexInput.positionCS = positionCS;
  259. o.shadowCoord = GetShadowCoord( vertexInput );
  260. #endif
  261. #ifdef ASE_FOG
  262. o.fogFactor = ComputeFogFactor( positionCS.z );
  263. #endif
  264. o.clipPos = positionCS;
  265. return o;
  266. }
  267. #if defined(TESSELLATION_ON)
  268. struct VertexControl
  269. {
  270. float4 vertex : INTERNALTESSPOS;
  271. float3 ase_normal : NORMAL;
  272. float4 ase_texcoord : TEXCOORD0;
  273. float4 ase_color : COLOR;
  274. float4 ase_texcoord1 : TEXCOORD1;
  275. UNITY_VERTEX_INPUT_INSTANCE_ID
  276. };
  277. struct TessellationFactors
  278. {
  279. float edge[3] : SV_TessFactor;
  280. float inside : SV_InsideTessFactor;
  281. };
  282. VertexControl vert ( VertexInput v )
  283. {
  284. VertexControl o;
  285. UNITY_SETUP_INSTANCE_ID(v);
  286. UNITY_TRANSFER_INSTANCE_ID(v, o);
  287. o.vertex = v.vertex;
  288. o.ase_normal = v.ase_normal;
  289. o.ase_texcoord = v.ase_texcoord;
  290. o.ase_color = v.ase_color;
  291. o.ase_texcoord1 = v.ase_texcoord1;
  292. return o;
  293. }
  294. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  295. {
  296. TessellationFactors o;
  297. float4 tf = 1;
  298. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  299. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  300. #if defined(ASE_FIXED_TESSELLATION)
  301. tf = FixedTess( tessValue );
  302. #elif defined(ASE_DISTANCE_TESSELLATION)
  303. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  304. #elif defined(ASE_LENGTH_TESSELLATION)
  305. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  306. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  307. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  308. #endif
  309. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  310. return o;
  311. }
  312. [domain("tri")]
  313. [partitioning("fractional_odd")]
  314. [outputtopology("triangle_cw")]
  315. [patchconstantfunc("TessellationFunction")]
  316. [outputcontrolpoints(3)]
  317. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  318. {
  319. return patch[id];
  320. }
  321. [domain("tri")]
  322. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  323. {
  324. VertexInput o = (VertexInput) 0;
  325. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  326. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  327. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  328. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  329. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  330. #if defined(ASE_PHONG_TESSELLATION)
  331. float3 pp[3];
  332. for (int i = 0; i < 3; ++i)
  333. 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));
  334. float phongStrength = _TessPhongStrength;
  335. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  336. #endif
  337. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  338. return VertexFunction(o);
  339. }
  340. #else
  341. VertexOutput vert ( VertexInput v )
  342. {
  343. return VertexFunction( v );
  344. }
  345. #endif
  346. half4 frag ( VertexOutput IN ) : SV_Target
  347. {
  348. UNITY_SETUP_INSTANCE_ID( IN );
  349. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  350. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  351. float3 WorldPosition = IN.worldPos;
  352. #endif
  353. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  354. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  355. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  356. ShadowCoords = IN.shadowCoord;
  357. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  358. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  359. #endif
  360. #endif
  361. float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  362. float mulTime24 = _TimeParameters.x * _TubTexPanner.z;
  363. float2 appendResult23 = (float2(_TubTexPanner.x , _TubTexPanner.y));
  364. float2 uv_TubTex = IN.ase_texcoord3.xy * _TubTex_ST.xy + _TubTex_ST.zw;
  365. float2 panner16 = ( mulTime24 * ( appendResult23 * _CTime ) + uv_TubTex);
  366. float temp_output_30_0 = (-0.5 + (tex2D( _TubTex, panner16 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0));
  367. float4 tex2DNode10 = tex2D( _MainTex, ( uv_MainTex + ( temp_output_30_0 * _TubTexPanner.w ) ) );
  368. float4 texCoord62 = IN.ase_texcoord4;
  369. texCoord62.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  370. float lerpResult59 = lerp( 0.0 , texCoord62.y , (float)_Int1);
  371. float4 texCoord56 = IN.ase_texcoord4;
  372. texCoord56.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  373. float lerpResult57 = lerp( _dissolvevalue , texCoord56.x , (float)_Int0);
  374. float mulTime41 = _TimeParameters.x * _dissolvePanner.z;
  375. float2 appendResult40 = (float2(_dissolvePanner.x , _dissolvePanner.y));
  376. float2 uv_dissolve = IN.ase_texcoord3.xy * _dissolve_ST.xy + _dissolve_ST.zw;
  377. float2 panner37 = ( ( mulTime41 + _dissolvePanner.w ) * ( appendResult40 * _CTime ) + uv_dissolve);
  378. float2 uv_dissolve_mask = IN.ase_texcoord3.xy * _dissolve_mask_ST.xy + _dissolve_mask_ST.zw;
  379. float temp_output_44_0 = ( tex2D( _dissolve_mask, uv_dissolve_mask ).r * _dissolvemaskqd );
  380. float3 BakedAlbedo = 0;
  381. float3 BakedEmission = 0;
  382. float3 Color = ( _Color * tex2DNode10 * IN.ase_color * ( _MainTexQiangdu + lerpResult59 ) ).rgb;
  383. float Alpha = ( _Color.a * tex2DNode10.a * IN.ase_color.a * _alpha * step( lerpResult57 , ( ( ( tex2D( _dissolve, ( temp_output_30_0 + panner37 ) ).r * _dissolve_qiangdu ) * temp_output_44_0 ) + temp_output_44_0 ) ) );
  384. float AlphaClipThreshold = 0.5;
  385. float AlphaClipThresholdShadow = 0.5;
  386. #ifdef _ALPHATEST_ON
  387. clip( Alpha - AlphaClipThreshold );
  388. #endif
  389. #if defined(_DBUFFER)
  390. ApplyDecalToBaseColor(IN.clipPos, Color);
  391. #endif
  392. #if defined(_ALPHAPREMULTIPLY_ON)
  393. Color *= Alpha;
  394. #endif
  395. #ifdef LOD_FADE_CROSSFADE
  396. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  397. #endif
  398. #ifdef ASE_FOG
  399. Color = MixFog( Color, IN.fogFactor );
  400. #endif
  401. return half4( Color, Alpha );
  402. }
  403. ENDHLSL
  404. }
  405. Pass
  406. {
  407. Name "DepthOnly"
  408. Tags { "LightMode"="DepthOnly" }
  409. ZWrite On
  410. ColorMask 0
  411. AlphaToMask Off
  412. HLSLPROGRAM
  413. #pragma multi_compile_instancing
  414. #define _RECEIVE_SHADOWS_OFF 1
  415. #define ASE_SRP_VERSION 999999
  416. #pragma vertex vert
  417. #pragma fragment frag
  418. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  419. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  420. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  421. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  422. struct VertexInput
  423. {
  424. float4 vertex : POSITION;
  425. float3 ase_normal : NORMAL;
  426. float4 ase_texcoord : TEXCOORD0;
  427. float4 ase_color : COLOR;
  428. float4 ase_texcoord1 : TEXCOORD1;
  429. UNITY_VERTEX_INPUT_INSTANCE_ID
  430. };
  431. struct VertexOutput
  432. {
  433. float4 clipPos : SV_POSITION;
  434. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  435. float3 worldPos : TEXCOORD0;
  436. #endif
  437. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  438. float4 shadowCoord : TEXCOORD1;
  439. #endif
  440. float4 ase_texcoord2 : TEXCOORD2;
  441. float4 ase_color : COLOR;
  442. float4 ase_texcoord3 : TEXCOORD3;
  443. UNITY_VERTEX_INPUT_INSTANCE_ID
  444. UNITY_VERTEX_OUTPUT_STEREO
  445. };
  446. CBUFFER_START(UnityPerMaterial)
  447. float4 _Color;
  448. float4 _MainTex_ST;
  449. float4 _TubTexPanner;
  450. float4 _TubTex_ST;
  451. float4 _dissolvePanner;
  452. float4 _dissolve_ST;
  453. float4 _dissolve_mask_ST;
  454. float _CTime;
  455. float _MainTexQiangdu;
  456. int _Int1;
  457. float _alpha;
  458. float _dissolvevalue;
  459. int _Int0;
  460. float _dissolve_qiangdu;
  461. float _dissolvemaskqd;
  462. #ifdef TESSELLATION_ON
  463. float _TessPhongStrength;
  464. float _TessValue;
  465. float _TessMin;
  466. float _TessMax;
  467. float _TessEdgeLength;
  468. float _TessMaxDisp;
  469. #endif
  470. CBUFFER_END
  471. sampler2D _MainTex;
  472. sampler2D _TubTex;
  473. sampler2D _dissolve;
  474. sampler2D _dissolve_mask;
  475. VertexOutput VertexFunction( VertexInput v )
  476. {
  477. VertexOutput o = (VertexOutput)0;
  478. UNITY_SETUP_INSTANCE_ID(v);
  479. UNITY_TRANSFER_INSTANCE_ID(v, o);
  480. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  481. o.ase_texcoord2.xy = v.ase_texcoord.xy;
  482. o.ase_color = v.ase_color;
  483. o.ase_texcoord3 = v.ase_texcoord1;
  484. //setting value to unused interpolator channels and avoid initialization warnings
  485. o.ase_texcoord2.zw = 0;
  486. #ifdef ASE_ABSOLUTE_VERTEX_POS
  487. float3 defaultVertexValue = v.vertex.xyz;
  488. #else
  489. float3 defaultVertexValue = float3(0, 0, 0);
  490. #endif
  491. float3 vertexValue = defaultVertexValue;
  492. #ifdef ASE_ABSOLUTE_VERTEX_POS
  493. v.vertex.xyz = vertexValue;
  494. #else
  495. v.vertex.xyz += vertexValue;
  496. #endif
  497. v.ase_normal = v.ase_normal;
  498. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  499. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  500. o.worldPos = positionWS;
  501. #endif
  502. o.clipPos = TransformWorldToHClip( positionWS );
  503. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  504. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  505. vertexInput.positionWS = positionWS;
  506. vertexInput.positionCS = o.clipPos;
  507. o.shadowCoord = GetShadowCoord( vertexInput );
  508. #endif
  509. return o;
  510. }
  511. #if defined(TESSELLATION_ON)
  512. struct VertexControl
  513. {
  514. float4 vertex : INTERNALTESSPOS;
  515. float3 ase_normal : NORMAL;
  516. float4 ase_texcoord : TEXCOORD0;
  517. float4 ase_color : COLOR;
  518. float4 ase_texcoord1 : TEXCOORD1;
  519. UNITY_VERTEX_INPUT_INSTANCE_ID
  520. };
  521. struct TessellationFactors
  522. {
  523. float edge[3] : SV_TessFactor;
  524. float inside : SV_InsideTessFactor;
  525. };
  526. VertexControl vert ( VertexInput v )
  527. {
  528. VertexControl o;
  529. UNITY_SETUP_INSTANCE_ID(v);
  530. UNITY_TRANSFER_INSTANCE_ID(v, o);
  531. o.vertex = v.vertex;
  532. o.ase_normal = v.ase_normal;
  533. o.ase_texcoord = v.ase_texcoord;
  534. o.ase_color = v.ase_color;
  535. o.ase_texcoord1 = v.ase_texcoord1;
  536. return o;
  537. }
  538. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  539. {
  540. TessellationFactors o;
  541. float4 tf = 1;
  542. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  543. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  544. #if defined(ASE_FIXED_TESSELLATION)
  545. tf = FixedTess( tessValue );
  546. #elif defined(ASE_DISTANCE_TESSELLATION)
  547. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  548. #elif defined(ASE_LENGTH_TESSELLATION)
  549. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  550. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  551. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  552. #endif
  553. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  554. return o;
  555. }
  556. [domain("tri")]
  557. [partitioning("fractional_odd")]
  558. [outputtopology("triangle_cw")]
  559. [patchconstantfunc("TessellationFunction")]
  560. [outputcontrolpoints(3)]
  561. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  562. {
  563. return patch[id];
  564. }
  565. [domain("tri")]
  566. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  567. {
  568. VertexInput o = (VertexInput) 0;
  569. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  570. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  571. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  572. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  573. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  574. #if defined(ASE_PHONG_TESSELLATION)
  575. float3 pp[3];
  576. for (int i = 0; i < 3; ++i)
  577. 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));
  578. float phongStrength = _TessPhongStrength;
  579. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  580. #endif
  581. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  582. return VertexFunction(o);
  583. }
  584. #else
  585. VertexOutput vert ( VertexInput v )
  586. {
  587. return VertexFunction( v );
  588. }
  589. #endif
  590. half4 frag(VertexOutput IN ) : SV_TARGET
  591. {
  592. UNITY_SETUP_INSTANCE_ID(IN);
  593. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  594. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  595. float3 WorldPosition = IN.worldPos;
  596. #endif
  597. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  598. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  599. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  600. ShadowCoords = IN.shadowCoord;
  601. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  602. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  603. #endif
  604. #endif
  605. float2 uv_MainTex = IN.ase_texcoord2.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  606. float mulTime24 = _TimeParameters.x * _TubTexPanner.z;
  607. float2 appendResult23 = (float2(_TubTexPanner.x , _TubTexPanner.y));
  608. float2 uv_TubTex = IN.ase_texcoord2.xy * _TubTex_ST.xy + _TubTex_ST.zw;
  609. float2 panner16 = ( mulTime24 * ( appendResult23 * _CTime ) + uv_TubTex);
  610. float temp_output_30_0 = (-0.5 + (tex2D( _TubTex, panner16 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0));
  611. float4 tex2DNode10 = tex2D( _MainTex, ( uv_MainTex + ( temp_output_30_0 * _TubTexPanner.w ) ) );
  612. float4 texCoord56 = IN.ase_texcoord3;
  613. texCoord56.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 );
  614. float lerpResult57 = lerp( _dissolvevalue , texCoord56.x , (float)_Int0);
  615. float mulTime41 = _TimeParameters.x * _dissolvePanner.z;
  616. float2 appendResult40 = (float2(_dissolvePanner.x , _dissolvePanner.y));
  617. float2 uv_dissolve = IN.ase_texcoord2.xy * _dissolve_ST.xy + _dissolve_ST.zw;
  618. float2 panner37 = ( ( mulTime41 + _dissolvePanner.w ) * ( appendResult40 * _CTime ) + uv_dissolve);
  619. float2 uv_dissolve_mask = IN.ase_texcoord2.xy * _dissolve_mask_ST.xy + _dissolve_mask_ST.zw;
  620. float temp_output_44_0 = ( tex2D( _dissolve_mask, uv_dissolve_mask ).r * _dissolvemaskqd );
  621. float Alpha = ( _Color.a * tex2DNode10.a * IN.ase_color.a * _alpha * step( lerpResult57 , ( ( ( tex2D( _dissolve, ( temp_output_30_0 + panner37 ) ).r * _dissolve_qiangdu ) * temp_output_44_0 ) + temp_output_44_0 ) ) );
  622. float AlphaClipThreshold = 0.5;
  623. #ifdef _ALPHATEST_ON
  624. clip(Alpha - AlphaClipThreshold);
  625. #endif
  626. #ifdef LOD_FADE_CROSSFADE
  627. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  628. #endif
  629. return 0;
  630. }
  631. ENDHLSL
  632. }
  633. Pass
  634. {
  635. Name "Universal2D"
  636. Tags { "LightMode"="Universal2D" }
  637. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  638. ZWrite Off
  639. ZTest LEqual
  640. Offset 0 , 0
  641. ColorMask RGBA
  642. HLSLPROGRAM
  643. #pragma multi_compile_instancing
  644. #define _RECEIVE_SHADOWS_OFF 1
  645. #define ASE_SRP_VERSION 999999
  646. #pragma multi_compile _ LIGHTMAP_ON
  647. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  648. #pragma shader_feature _ _SAMPLE_GI
  649. #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  650. #pragma multi_compile _ DEBUG_DISPLAY
  651. #define SHADERPASS SHADERPASS_UNLIT
  652. #pragma vertex vert
  653. #pragma fragment frag
  654. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  655. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  656. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  657. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  658. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  659. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  660. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  661. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  662. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  663. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  664. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  665. #define ASE_NEEDS_FRAG_COLOR
  666. struct VertexInput
  667. {
  668. float4 vertex : POSITION;
  669. float3 ase_normal : NORMAL;
  670. float4 ase_texcoord : TEXCOORD0;
  671. float4 ase_color : COLOR;
  672. float4 ase_texcoord1 : TEXCOORD1;
  673. UNITY_VERTEX_INPUT_INSTANCE_ID
  674. };
  675. struct VertexOutput
  676. {
  677. float4 clipPos : SV_POSITION;
  678. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  679. float3 worldPos : TEXCOORD0;
  680. #endif
  681. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  682. float4 shadowCoord : TEXCOORD1;
  683. #endif
  684. #ifdef ASE_FOG
  685. float fogFactor : TEXCOORD2;
  686. #endif
  687. float4 ase_texcoord3 : TEXCOORD3;
  688. float4 ase_color : COLOR;
  689. float4 ase_texcoord4 : TEXCOORD4;
  690. UNITY_VERTEX_INPUT_INSTANCE_ID
  691. UNITY_VERTEX_OUTPUT_STEREO
  692. };
  693. CBUFFER_START(UnityPerMaterial)
  694. float4 _Color;
  695. float4 _MainTex_ST;
  696. float4 _TubTexPanner;
  697. float4 _TubTex_ST;
  698. float4 _dissolvePanner;
  699. float4 _dissolve_ST;
  700. float4 _dissolve_mask_ST;
  701. float _CTime;
  702. float _MainTexQiangdu;
  703. int _Int1;
  704. float _alpha;
  705. float _dissolvevalue;
  706. int _Int0;
  707. float _dissolve_qiangdu;
  708. float _dissolvemaskqd;
  709. #ifdef TESSELLATION_ON
  710. float _TessPhongStrength;
  711. float _TessValue;
  712. float _TessMin;
  713. float _TessMax;
  714. float _TessEdgeLength;
  715. float _TessMaxDisp;
  716. #endif
  717. CBUFFER_END
  718. sampler2D _MainTex;
  719. sampler2D _TubTex;
  720. sampler2D _dissolve;
  721. sampler2D _dissolve_mask;
  722. VertexOutput VertexFunction ( VertexInput v )
  723. {
  724. VertexOutput o = (VertexOutput)0;
  725. UNITY_SETUP_INSTANCE_ID(v);
  726. UNITY_TRANSFER_INSTANCE_ID(v, o);
  727. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  728. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  729. o.ase_color = v.ase_color;
  730. o.ase_texcoord4 = v.ase_texcoord1;
  731. //setting value to unused interpolator channels and avoid initialization warnings
  732. o.ase_texcoord3.zw = 0;
  733. #ifdef ASE_ABSOLUTE_VERTEX_POS
  734. float3 defaultVertexValue = v.vertex.xyz;
  735. #else
  736. float3 defaultVertexValue = float3(0, 0, 0);
  737. #endif
  738. float3 vertexValue = defaultVertexValue;
  739. #ifdef ASE_ABSOLUTE_VERTEX_POS
  740. v.vertex.xyz = vertexValue;
  741. #else
  742. v.vertex.xyz += vertexValue;
  743. #endif
  744. v.ase_normal = v.ase_normal;
  745. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  746. float4 positionCS = TransformWorldToHClip( positionWS );
  747. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  748. o.worldPos = positionWS;
  749. #endif
  750. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  751. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  752. vertexInput.positionWS = positionWS;
  753. vertexInput.positionCS = positionCS;
  754. o.shadowCoord = GetShadowCoord( vertexInput );
  755. #endif
  756. #ifdef ASE_FOG
  757. o.fogFactor = ComputeFogFactor( positionCS.z );
  758. #endif
  759. o.clipPos = positionCS;
  760. return o;
  761. }
  762. #if defined(TESSELLATION_ON)
  763. struct VertexControl
  764. {
  765. float4 vertex : INTERNALTESSPOS;
  766. float3 ase_normal : NORMAL;
  767. float4 ase_texcoord : TEXCOORD0;
  768. float4 ase_color : COLOR;
  769. float4 ase_texcoord1 : TEXCOORD1;
  770. UNITY_VERTEX_INPUT_INSTANCE_ID
  771. };
  772. struct TessellationFactors
  773. {
  774. float edge[3] : SV_TessFactor;
  775. float inside : SV_InsideTessFactor;
  776. };
  777. VertexControl vert ( VertexInput v )
  778. {
  779. VertexControl o;
  780. UNITY_SETUP_INSTANCE_ID(v);
  781. UNITY_TRANSFER_INSTANCE_ID(v, o);
  782. o.vertex = v.vertex;
  783. o.ase_normal = v.ase_normal;
  784. o.ase_texcoord = v.ase_texcoord;
  785. o.ase_color = v.ase_color;
  786. o.ase_texcoord1 = v.ase_texcoord1;
  787. return o;
  788. }
  789. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  790. {
  791. TessellationFactors o;
  792. float4 tf = 1;
  793. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  794. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  795. #if defined(ASE_FIXED_TESSELLATION)
  796. tf = FixedTess( tessValue );
  797. #elif defined(ASE_DISTANCE_TESSELLATION)
  798. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  799. #elif defined(ASE_LENGTH_TESSELLATION)
  800. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  801. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  802. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  803. #endif
  804. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  805. return o;
  806. }
  807. [domain("tri")]
  808. [partitioning("fractional_odd")]
  809. [outputtopology("triangle_cw")]
  810. [patchconstantfunc("TessellationFunction")]
  811. [outputcontrolpoints(3)]
  812. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  813. {
  814. return patch[id];
  815. }
  816. [domain("tri")]
  817. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  818. {
  819. VertexInput o = (VertexInput) 0;
  820. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  821. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  822. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  823. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  824. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  825. #if defined(ASE_PHONG_TESSELLATION)
  826. float3 pp[3];
  827. for (int i = 0; i < 3; ++i)
  828. 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));
  829. float phongStrength = _TessPhongStrength;
  830. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  831. #endif
  832. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  833. return VertexFunction(o);
  834. }
  835. #else
  836. VertexOutput vert ( VertexInput v )
  837. {
  838. return VertexFunction( v );
  839. }
  840. #endif
  841. half4 frag ( VertexOutput IN ) : SV_Target
  842. {
  843. UNITY_SETUP_INSTANCE_ID( IN );
  844. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  845. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  846. float3 WorldPosition = IN.worldPos;
  847. #endif
  848. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  849. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  850. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  851. ShadowCoords = IN.shadowCoord;
  852. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  853. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  854. #endif
  855. #endif
  856. float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  857. float mulTime24 = _TimeParameters.x * _TubTexPanner.z;
  858. float2 appendResult23 = (float2(_TubTexPanner.x , _TubTexPanner.y));
  859. float2 uv_TubTex = IN.ase_texcoord3.xy * _TubTex_ST.xy + _TubTex_ST.zw;
  860. float2 panner16 = ( mulTime24 * ( appendResult23 * _CTime ) + uv_TubTex);
  861. float temp_output_30_0 = (-0.5 + (tex2D( _TubTex, panner16 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0));
  862. float4 tex2DNode10 = tex2D( _MainTex, ( uv_MainTex + ( temp_output_30_0 * _TubTexPanner.w ) ) );
  863. float4 texCoord62 = IN.ase_texcoord4;
  864. texCoord62.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  865. float lerpResult59 = lerp( 0.0 , texCoord62.y , (float)_Int1);
  866. float4 texCoord56 = IN.ase_texcoord4;
  867. texCoord56.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  868. float lerpResult57 = lerp( _dissolvevalue , texCoord56.x , (float)_Int0);
  869. float mulTime41 = _TimeParameters.x * _dissolvePanner.z;
  870. float2 appendResult40 = (float2(_dissolvePanner.x , _dissolvePanner.y));
  871. float2 uv_dissolve = IN.ase_texcoord3.xy * _dissolve_ST.xy + _dissolve_ST.zw;
  872. float2 panner37 = ( ( mulTime41 + _dissolvePanner.w ) * ( appendResult40 * _CTime ) + uv_dissolve);
  873. float2 uv_dissolve_mask = IN.ase_texcoord3.xy * _dissolve_mask_ST.xy + _dissolve_mask_ST.zw;
  874. float temp_output_44_0 = ( tex2D( _dissolve_mask, uv_dissolve_mask ).r * _dissolvemaskqd );
  875. float3 BakedAlbedo = 0;
  876. float3 BakedEmission = 0;
  877. float3 Color = ( _Color * tex2DNode10 * IN.ase_color * ( _MainTexQiangdu + lerpResult59 ) ).rgb;
  878. float Alpha = ( _Color.a * tex2DNode10.a * IN.ase_color.a * _alpha * step( lerpResult57 , ( ( ( tex2D( _dissolve, ( temp_output_30_0 + panner37 ) ).r * _dissolve_qiangdu ) * temp_output_44_0 ) + temp_output_44_0 ) ) );
  879. float AlphaClipThreshold = 0.5;
  880. float AlphaClipThresholdShadow = 0.5;
  881. #ifdef _ALPHATEST_ON
  882. clip( Alpha - AlphaClipThreshold );
  883. #endif
  884. #if defined(_DBUFFER)
  885. ApplyDecalToBaseColor(IN.clipPos, Color);
  886. #endif
  887. #if defined(_ALPHAPREMULTIPLY_ON)
  888. Color *= Alpha;
  889. #endif
  890. #ifdef LOD_FADE_CROSSFADE
  891. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  892. #endif
  893. #ifdef ASE_FOG
  894. Color = MixFog( Color, IN.fogFactor );
  895. #endif
  896. return half4( Color, Alpha );
  897. }
  898. ENDHLSL
  899. }
  900. Pass
  901. {
  902. Name "SceneSelectionPass"
  903. Tags { "LightMode"="SceneSelectionPass" }
  904. Cull Off
  905. HLSLPROGRAM
  906. #pragma multi_compile_instancing
  907. #define _RECEIVE_SHADOWS_OFF 1
  908. #define ASE_SRP_VERSION 999999
  909. #pragma only_renderers d3d11 glcore gles gles3
  910. #pragma vertex vert
  911. #pragma fragment frag
  912. #define ATTRIBUTES_NEED_NORMAL
  913. #define ATTRIBUTES_NEED_TANGENT
  914. #define SHADERPASS SHADERPASS_DEPTHONLY
  915. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  916. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  917. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  918. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  919. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  920. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  921. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  922. struct VertexInput
  923. {
  924. float4 vertex : POSITION;
  925. float3 ase_normal : NORMAL;
  926. float4 ase_texcoord : TEXCOORD0;
  927. float4 ase_color : COLOR;
  928. float4 ase_texcoord1 : TEXCOORD1;
  929. UNITY_VERTEX_INPUT_INSTANCE_ID
  930. };
  931. struct VertexOutput
  932. {
  933. float4 clipPos : SV_POSITION;
  934. float4 ase_texcoord : TEXCOORD0;
  935. float4 ase_color : COLOR;
  936. float4 ase_texcoord1 : TEXCOORD1;
  937. UNITY_VERTEX_INPUT_INSTANCE_ID
  938. UNITY_VERTEX_OUTPUT_STEREO
  939. };
  940. CBUFFER_START(UnityPerMaterial)
  941. float4 _Color;
  942. float4 _MainTex_ST;
  943. float4 _TubTexPanner;
  944. float4 _TubTex_ST;
  945. float4 _dissolvePanner;
  946. float4 _dissolve_ST;
  947. float4 _dissolve_mask_ST;
  948. float _CTime;
  949. float _MainTexQiangdu;
  950. int _Int1;
  951. float _alpha;
  952. float _dissolvevalue;
  953. int _Int0;
  954. float _dissolve_qiangdu;
  955. float _dissolvemaskqd;
  956. #ifdef TESSELLATION_ON
  957. float _TessPhongStrength;
  958. float _TessValue;
  959. float _TessMin;
  960. float _TessMax;
  961. float _TessEdgeLength;
  962. float _TessMaxDisp;
  963. #endif
  964. CBUFFER_END
  965. sampler2D _MainTex;
  966. sampler2D _TubTex;
  967. sampler2D _dissolve;
  968. sampler2D _dissolve_mask;
  969. int _ObjectId;
  970. int _PassValue;
  971. struct SurfaceDescription
  972. {
  973. float Alpha;
  974. float AlphaClipThreshold;
  975. };
  976. VertexOutput VertexFunction(VertexInput v )
  977. {
  978. VertexOutput o;
  979. ZERO_INITIALIZE(VertexOutput, o);
  980. UNITY_SETUP_INSTANCE_ID(v);
  981. UNITY_TRANSFER_INSTANCE_ID(v, o);
  982. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  983. o.ase_texcoord.xy = v.ase_texcoord.xy;
  984. o.ase_color = v.ase_color;
  985. o.ase_texcoord1 = v.ase_texcoord1;
  986. //setting value to unused interpolator channels and avoid initialization warnings
  987. o.ase_texcoord.zw = 0;
  988. #ifdef ASE_ABSOLUTE_VERTEX_POS
  989. float3 defaultVertexValue = v.vertex.xyz;
  990. #else
  991. float3 defaultVertexValue = float3(0, 0, 0);
  992. #endif
  993. float3 vertexValue = defaultVertexValue;
  994. #ifdef ASE_ABSOLUTE_VERTEX_POS
  995. v.vertex.xyz = vertexValue;
  996. #else
  997. v.vertex.xyz += vertexValue;
  998. #endif
  999. v.ase_normal = v.ase_normal;
  1000. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1001. o.clipPos = TransformWorldToHClip(positionWS);
  1002. return o;
  1003. }
  1004. #if defined(TESSELLATION_ON)
  1005. struct VertexControl
  1006. {
  1007. float4 vertex : INTERNALTESSPOS;
  1008. float3 ase_normal : NORMAL;
  1009. float4 ase_texcoord : TEXCOORD0;
  1010. float4 ase_color : COLOR;
  1011. float4 ase_texcoord1 : TEXCOORD1;
  1012. UNITY_VERTEX_INPUT_INSTANCE_ID
  1013. };
  1014. struct TessellationFactors
  1015. {
  1016. float edge[3] : SV_TessFactor;
  1017. float inside : SV_InsideTessFactor;
  1018. };
  1019. VertexControl vert ( VertexInput v )
  1020. {
  1021. VertexControl o;
  1022. UNITY_SETUP_INSTANCE_ID(v);
  1023. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1024. o.vertex = v.vertex;
  1025. o.ase_normal = v.ase_normal;
  1026. o.ase_texcoord = v.ase_texcoord;
  1027. o.ase_color = v.ase_color;
  1028. o.ase_texcoord1 = v.ase_texcoord1;
  1029. return o;
  1030. }
  1031. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1032. {
  1033. TessellationFactors o;
  1034. float4 tf = 1;
  1035. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1036. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1037. #if defined(ASE_FIXED_TESSELLATION)
  1038. tf = FixedTess( tessValue );
  1039. #elif defined(ASE_DISTANCE_TESSELLATION)
  1040. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1041. #elif defined(ASE_LENGTH_TESSELLATION)
  1042. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1043. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1044. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1045. #endif
  1046. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1047. return o;
  1048. }
  1049. [domain("tri")]
  1050. [partitioning("fractional_odd")]
  1051. [outputtopology("triangle_cw")]
  1052. [patchconstantfunc("TessellationFunction")]
  1053. [outputcontrolpoints(3)]
  1054. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1055. {
  1056. return patch[id];
  1057. }
  1058. [domain("tri")]
  1059. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1060. {
  1061. VertexInput o = (VertexInput) 0;
  1062. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1063. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1064. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1065. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1066. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1067. #if defined(ASE_PHONG_TESSELLATION)
  1068. float3 pp[3];
  1069. for (int i = 0; i < 3; ++i)
  1070. 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));
  1071. float phongStrength = _TessPhongStrength;
  1072. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1073. #endif
  1074. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1075. return VertexFunction(o);
  1076. }
  1077. #else
  1078. VertexOutput vert ( VertexInput v )
  1079. {
  1080. return VertexFunction( v );
  1081. }
  1082. #endif
  1083. half4 frag(VertexOutput IN ) : SV_TARGET
  1084. {
  1085. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1086. float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1087. float mulTime24 = _TimeParameters.x * _TubTexPanner.z;
  1088. float2 appendResult23 = (float2(_TubTexPanner.x , _TubTexPanner.y));
  1089. float2 uv_TubTex = IN.ase_texcoord.xy * _TubTex_ST.xy + _TubTex_ST.zw;
  1090. float2 panner16 = ( mulTime24 * ( appendResult23 * _CTime ) + uv_TubTex);
  1091. float temp_output_30_0 = (-0.5 + (tex2D( _TubTex, panner16 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0));
  1092. float4 tex2DNode10 = tex2D( _MainTex, ( uv_MainTex + ( temp_output_30_0 * _TubTexPanner.w ) ) );
  1093. float4 texCoord56 = IN.ase_texcoord1;
  1094. texCoord56.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1095. float lerpResult57 = lerp( _dissolvevalue , texCoord56.x , (float)_Int0);
  1096. float mulTime41 = _TimeParameters.x * _dissolvePanner.z;
  1097. float2 appendResult40 = (float2(_dissolvePanner.x , _dissolvePanner.y));
  1098. float2 uv_dissolve = IN.ase_texcoord.xy * _dissolve_ST.xy + _dissolve_ST.zw;
  1099. float2 panner37 = ( ( mulTime41 + _dissolvePanner.w ) * ( appendResult40 * _CTime ) + uv_dissolve);
  1100. float2 uv_dissolve_mask = IN.ase_texcoord.xy * _dissolve_mask_ST.xy + _dissolve_mask_ST.zw;
  1101. float temp_output_44_0 = ( tex2D( _dissolve_mask, uv_dissolve_mask ).r * _dissolvemaskqd );
  1102. surfaceDescription.Alpha = ( _Color.a * tex2DNode10.a * IN.ase_color.a * _alpha * step( lerpResult57 , ( ( ( tex2D( _dissolve, ( temp_output_30_0 + panner37 ) ).r * _dissolve_qiangdu ) * temp_output_44_0 ) + temp_output_44_0 ) ) );
  1103. surfaceDescription.AlphaClipThreshold = 0.5;
  1104. #if _ALPHATEST_ON
  1105. float alphaClipThreshold = 0.01f;
  1106. #if ALPHA_CLIP_THRESHOLD
  1107. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1108. #endif
  1109. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1110. #endif
  1111. half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  1112. return outColor;
  1113. }
  1114. ENDHLSL
  1115. }
  1116. Pass
  1117. {
  1118. Name "ScenePickingPass"
  1119. Tags { "LightMode"="Picking" }
  1120. HLSLPROGRAM
  1121. #pragma multi_compile_instancing
  1122. #define _RECEIVE_SHADOWS_OFF 1
  1123. #define ASE_SRP_VERSION 999999
  1124. #pragma only_renderers d3d11 glcore gles gles3
  1125. #pragma vertex vert
  1126. #pragma fragment frag
  1127. #define ATTRIBUTES_NEED_NORMAL
  1128. #define ATTRIBUTES_NEED_TANGENT
  1129. #define SHADERPASS SHADERPASS_DEPTHONLY
  1130. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1131. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1132. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1133. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1134. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1135. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1136. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1137. struct VertexInput
  1138. {
  1139. float4 vertex : POSITION;
  1140. float3 ase_normal : NORMAL;
  1141. float4 ase_texcoord : TEXCOORD0;
  1142. float4 ase_color : COLOR;
  1143. float4 ase_texcoord1 : TEXCOORD1;
  1144. UNITY_VERTEX_INPUT_INSTANCE_ID
  1145. };
  1146. struct VertexOutput
  1147. {
  1148. float4 clipPos : SV_POSITION;
  1149. float4 ase_texcoord : TEXCOORD0;
  1150. float4 ase_color : COLOR;
  1151. float4 ase_texcoord1 : TEXCOORD1;
  1152. UNITY_VERTEX_INPUT_INSTANCE_ID
  1153. UNITY_VERTEX_OUTPUT_STEREO
  1154. };
  1155. CBUFFER_START(UnityPerMaterial)
  1156. float4 _Color;
  1157. float4 _MainTex_ST;
  1158. float4 _TubTexPanner;
  1159. float4 _TubTex_ST;
  1160. float4 _dissolvePanner;
  1161. float4 _dissolve_ST;
  1162. float4 _dissolve_mask_ST;
  1163. float _CTime;
  1164. float _MainTexQiangdu;
  1165. int _Int1;
  1166. float _alpha;
  1167. float _dissolvevalue;
  1168. int _Int0;
  1169. float _dissolve_qiangdu;
  1170. float _dissolvemaskqd;
  1171. #ifdef TESSELLATION_ON
  1172. float _TessPhongStrength;
  1173. float _TessValue;
  1174. float _TessMin;
  1175. float _TessMax;
  1176. float _TessEdgeLength;
  1177. float _TessMaxDisp;
  1178. #endif
  1179. CBUFFER_END
  1180. sampler2D _MainTex;
  1181. sampler2D _TubTex;
  1182. sampler2D _dissolve;
  1183. sampler2D _dissolve_mask;
  1184. float4 _SelectionID;
  1185. struct SurfaceDescription
  1186. {
  1187. float Alpha;
  1188. float AlphaClipThreshold;
  1189. };
  1190. VertexOutput VertexFunction(VertexInput v )
  1191. {
  1192. VertexOutput o;
  1193. ZERO_INITIALIZE(VertexOutput, o);
  1194. UNITY_SETUP_INSTANCE_ID(v);
  1195. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1196. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1197. o.ase_texcoord.xy = v.ase_texcoord.xy;
  1198. o.ase_color = v.ase_color;
  1199. o.ase_texcoord1 = v.ase_texcoord1;
  1200. //setting value to unused interpolator channels and avoid initialization warnings
  1201. o.ase_texcoord.zw = 0;
  1202. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1203. float3 defaultVertexValue = v.vertex.xyz;
  1204. #else
  1205. float3 defaultVertexValue = float3(0, 0, 0);
  1206. #endif
  1207. float3 vertexValue = defaultVertexValue;
  1208. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1209. v.vertex.xyz = vertexValue;
  1210. #else
  1211. v.vertex.xyz += vertexValue;
  1212. #endif
  1213. v.ase_normal = v.ase_normal;
  1214. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1215. o.clipPos = TransformWorldToHClip(positionWS);
  1216. return o;
  1217. }
  1218. #if defined(TESSELLATION_ON)
  1219. struct VertexControl
  1220. {
  1221. float4 vertex : INTERNALTESSPOS;
  1222. float3 ase_normal : NORMAL;
  1223. float4 ase_texcoord : TEXCOORD0;
  1224. float4 ase_color : COLOR;
  1225. float4 ase_texcoord1 : TEXCOORD1;
  1226. UNITY_VERTEX_INPUT_INSTANCE_ID
  1227. };
  1228. struct TessellationFactors
  1229. {
  1230. float edge[3] : SV_TessFactor;
  1231. float inside : SV_InsideTessFactor;
  1232. };
  1233. VertexControl vert ( VertexInput v )
  1234. {
  1235. VertexControl o;
  1236. UNITY_SETUP_INSTANCE_ID(v);
  1237. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1238. o.vertex = v.vertex;
  1239. o.ase_normal = v.ase_normal;
  1240. o.ase_texcoord = v.ase_texcoord;
  1241. o.ase_color = v.ase_color;
  1242. o.ase_texcoord1 = v.ase_texcoord1;
  1243. return o;
  1244. }
  1245. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1246. {
  1247. TessellationFactors o;
  1248. float4 tf = 1;
  1249. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1250. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1251. #if defined(ASE_FIXED_TESSELLATION)
  1252. tf = FixedTess( tessValue );
  1253. #elif defined(ASE_DISTANCE_TESSELLATION)
  1254. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1255. #elif defined(ASE_LENGTH_TESSELLATION)
  1256. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1257. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1258. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1259. #endif
  1260. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1261. return o;
  1262. }
  1263. [domain("tri")]
  1264. [partitioning("fractional_odd")]
  1265. [outputtopology("triangle_cw")]
  1266. [patchconstantfunc("TessellationFunction")]
  1267. [outputcontrolpoints(3)]
  1268. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1269. {
  1270. return patch[id];
  1271. }
  1272. [domain("tri")]
  1273. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1274. {
  1275. VertexInput o = (VertexInput) 0;
  1276. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1277. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1278. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1279. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1280. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1281. #if defined(ASE_PHONG_TESSELLATION)
  1282. float3 pp[3];
  1283. for (int i = 0; i < 3; ++i)
  1284. 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));
  1285. float phongStrength = _TessPhongStrength;
  1286. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1287. #endif
  1288. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1289. return VertexFunction(o);
  1290. }
  1291. #else
  1292. VertexOutput vert ( VertexInput v )
  1293. {
  1294. return VertexFunction( v );
  1295. }
  1296. #endif
  1297. half4 frag(VertexOutput IN ) : SV_TARGET
  1298. {
  1299. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1300. float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1301. float mulTime24 = _TimeParameters.x * _TubTexPanner.z;
  1302. float2 appendResult23 = (float2(_TubTexPanner.x , _TubTexPanner.y));
  1303. float2 uv_TubTex = IN.ase_texcoord.xy * _TubTex_ST.xy + _TubTex_ST.zw;
  1304. float2 panner16 = ( mulTime24 * ( appendResult23 * _CTime ) + uv_TubTex);
  1305. float temp_output_30_0 = (-0.5 + (tex2D( _TubTex, panner16 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0));
  1306. float4 tex2DNode10 = tex2D( _MainTex, ( uv_MainTex + ( temp_output_30_0 * _TubTexPanner.w ) ) );
  1307. float4 texCoord56 = IN.ase_texcoord1;
  1308. texCoord56.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1309. float lerpResult57 = lerp( _dissolvevalue , texCoord56.x , (float)_Int0);
  1310. float mulTime41 = _TimeParameters.x * _dissolvePanner.z;
  1311. float2 appendResult40 = (float2(_dissolvePanner.x , _dissolvePanner.y));
  1312. float2 uv_dissolve = IN.ase_texcoord.xy * _dissolve_ST.xy + _dissolve_ST.zw;
  1313. float2 panner37 = ( ( mulTime41 + _dissolvePanner.w ) * ( appendResult40 * _CTime ) + uv_dissolve);
  1314. float2 uv_dissolve_mask = IN.ase_texcoord.xy * _dissolve_mask_ST.xy + _dissolve_mask_ST.zw;
  1315. float temp_output_44_0 = ( tex2D( _dissolve_mask, uv_dissolve_mask ).r * _dissolvemaskqd );
  1316. surfaceDescription.Alpha = ( _Color.a * tex2DNode10.a * IN.ase_color.a * _alpha * step( lerpResult57 , ( ( ( tex2D( _dissolve, ( temp_output_30_0 + panner37 ) ).r * _dissolve_qiangdu ) * temp_output_44_0 ) + temp_output_44_0 ) ) );
  1317. surfaceDescription.AlphaClipThreshold = 0.5;
  1318. #if _ALPHATEST_ON
  1319. float alphaClipThreshold = 0.01f;
  1320. #if ALPHA_CLIP_THRESHOLD
  1321. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1322. #endif
  1323. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1324. #endif
  1325. half4 outColor = 0;
  1326. outColor = _SelectionID;
  1327. return outColor;
  1328. }
  1329. ENDHLSL
  1330. }
  1331. Pass
  1332. {
  1333. Name "DepthNormals"
  1334. Tags { "LightMode"="DepthNormalsOnly" }
  1335. ZTest LEqual
  1336. ZWrite On
  1337. HLSLPROGRAM
  1338. #pragma multi_compile_instancing
  1339. #define _RECEIVE_SHADOWS_OFF 1
  1340. #define ASE_SRP_VERSION 999999
  1341. #pragma only_renderers d3d11 glcore gles gles3
  1342. #pragma multi_compile_fog
  1343. #pragma instancing_options renderinglayer
  1344. #pragma vertex vert
  1345. #pragma fragment frag
  1346. #define ATTRIBUTES_NEED_NORMAL
  1347. #define ATTRIBUTES_NEED_TANGENT
  1348. #define VARYINGS_NEED_NORMAL_WS
  1349. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1350. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1351. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1352. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1353. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1354. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1355. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1356. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1357. struct VertexInput
  1358. {
  1359. float4 vertex : POSITION;
  1360. float3 ase_normal : NORMAL;
  1361. float4 ase_texcoord : TEXCOORD0;
  1362. float4 ase_color : COLOR;
  1363. float4 ase_texcoord1 : TEXCOORD1;
  1364. UNITY_VERTEX_INPUT_INSTANCE_ID
  1365. };
  1366. struct VertexOutput
  1367. {
  1368. float4 clipPos : SV_POSITION;
  1369. float3 normalWS : TEXCOORD0;
  1370. float4 ase_texcoord1 : TEXCOORD1;
  1371. float4 ase_color : COLOR;
  1372. float4 ase_texcoord2 : TEXCOORD2;
  1373. UNITY_VERTEX_INPUT_INSTANCE_ID
  1374. UNITY_VERTEX_OUTPUT_STEREO
  1375. };
  1376. CBUFFER_START(UnityPerMaterial)
  1377. float4 _Color;
  1378. float4 _MainTex_ST;
  1379. float4 _TubTexPanner;
  1380. float4 _TubTex_ST;
  1381. float4 _dissolvePanner;
  1382. float4 _dissolve_ST;
  1383. float4 _dissolve_mask_ST;
  1384. float _CTime;
  1385. float _MainTexQiangdu;
  1386. int _Int1;
  1387. float _alpha;
  1388. float _dissolvevalue;
  1389. int _Int0;
  1390. float _dissolve_qiangdu;
  1391. float _dissolvemaskqd;
  1392. #ifdef TESSELLATION_ON
  1393. float _TessPhongStrength;
  1394. float _TessValue;
  1395. float _TessMin;
  1396. float _TessMax;
  1397. float _TessEdgeLength;
  1398. float _TessMaxDisp;
  1399. #endif
  1400. CBUFFER_END
  1401. sampler2D _MainTex;
  1402. sampler2D _TubTex;
  1403. sampler2D _dissolve;
  1404. sampler2D _dissolve_mask;
  1405. struct SurfaceDescription
  1406. {
  1407. float Alpha;
  1408. float AlphaClipThreshold;
  1409. };
  1410. VertexOutput VertexFunction(VertexInput v )
  1411. {
  1412. VertexOutput o;
  1413. ZERO_INITIALIZE(VertexOutput, o);
  1414. UNITY_SETUP_INSTANCE_ID(v);
  1415. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1416. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1417. o.ase_texcoord1.xy = v.ase_texcoord.xy;
  1418. o.ase_color = v.ase_color;
  1419. o.ase_texcoord2 = v.ase_texcoord1;
  1420. //setting value to unused interpolator channels and avoid initialization warnings
  1421. o.ase_texcoord1.zw = 0;
  1422. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1423. float3 defaultVertexValue = v.vertex.xyz;
  1424. #else
  1425. float3 defaultVertexValue = float3(0, 0, 0);
  1426. #endif
  1427. float3 vertexValue = defaultVertexValue;
  1428. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1429. v.vertex.xyz = vertexValue;
  1430. #else
  1431. v.vertex.xyz += vertexValue;
  1432. #endif
  1433. v.ase_normal = v.ase_normal;
  1434. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1435. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1436. o.clipPos = TransformWorldToHClip(positionWS);
  1437. o.normalWS.xyz = normalWS;
  1438. return o;
  1439. }
  1440. #if defined(TESSELLATION_ON)
  1441. struct VertexControl
  1442. {
  1443. float4 vertex : INTERNALTESSPOS;
  1444. float3 ase_normal : NORMAL;
  1445. float4 ase_texcoord : TEXCOORD0;
  1446. float4 ase_color : COLOR;
  1447. float4 ase_texcoord1 : TEXCOORD1;
  1448. UNITY_VERTEX_INPUT_INSTANCE_ID
  1449. };
  1450. struct TessellationFactors
  1451. {
  1452. float edge[3] : SV_TessFactor;
  1453. float inside : SV_InsideTessFactor;
  1454. };
  1455. VertexControl vert ( VertexInput v )
  1456. {
  1457. VertexControl o;
  1458. UNITY_SETUP_INSTANCE_ID(v);
  1459. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1460. o.vertex = v.vertex;
  1461. o.ase_normal = v.ase_normal;
  1462. o.ase_texcoord = v.ase_texcoord;
  1463. o.ase_color = v.ase_color;
  1464. o.ase_texcoord1 = v.ase_texcoord1;
  1465. return o;
  1466. }
  1467. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1468. {
  1469. TessellationFactors o;
  1470. float4 tf = 1;
  1471. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1472. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1473. #if defined(ASE_FIXED_TESSELLATION)
  1474. tf = FixedTess( tessValue );
  1475. #elif defined(ASE_DISTANCE_TESSELLATION)
  1476. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1477. #elif defined(ASE_LENGTH_TESSELLATION)
  1478. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1479. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1480. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1481. #endif
  1482. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1483. return o;
  1484. }
  1485. [domain("tri")]
  1486. [partitioning("fractional_odd")]
  1487. [outputtopology("triangle_cw")]
  1488. [patchconstantfunc("TessellationFunction")]
  1489. [outputcontrolpoints(3)]
  1490. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1491. {
  1492. return patch[id];
  1493. }
  1494. [domain("tri")]
  1495. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1496. {
  1497. VertexInput o = (VertexInput) 0;
  1498. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1499. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1500. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1501. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1502. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1503. #if defined(ASE_PHONG_TESSELLATION)
  1504. float3 pp[3];
  1505. for (int i = 0; i < 3; ++i)
  1506. 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));
  1507. float phongStrength = _TessPhongStrength;
  1508. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1509. #endif
  1510. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1511. return VertexFunction(o);
  1512. }
  1513. #else
  1514. VertexOutput vert ( VertexInput v )
  1515. {
  1516. return VertexFunction( v );
  1517. }
  1518. #endif
  1519. half4 frag(VertexOutput IN ) : SV_TARGET
  1520. {
  1521. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1522. float2 uv_MainTex = IN.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1523. float mulTime24 = _TimeParameters.x * _TubTexPanner.z;
  1524. float2 appendResult23 = (float2(_TubTexPanner.x , _TubTexPanner.y));
  1525. float2 uv_TubTex = IN.ase_texcoord1.xy * _TubTex_ST.xy + _TubTex_ST.zw;
  1526. float2 panner16 = ( mulTime24 * ( appendResult23 * _CTime ) + uv_TubTex);
  1527. float temp_output_30_0 = (-0.5 + (tex2D( _TubTex, panner16 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0));
  1528. float4 tex2DNode10 = tex2D( _MainTex, ( uv_MainTex + ( temp_output_30_0 * _TubTexPanner.w ) ) );
  1529. float4 texCoord56 = IN.ase_texcoord2;
  1530. texCoord56.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1531. float lerpResult57 = lerp( _dissolvevalue , texCoord56.x , (float)_Int0);
  1532. float mulTime41 = _TimeParameters.x * _dissolvePanner.z;
  1533. float2 appendResult40 = (float2(_dissolvePanner.x , _dissolvePanner.y));
  1534. float2 uv_dissolve = IN.ase_texcoord1.xy * _dissolve_ST.xy + _dissolve_ST.zw;
  1535. float2 panner37 = ( ( mulTime41 + _dissolvePanner.w ) * ( appendResult40 * _CTime ) + uv_dissolve);
  1536. float2 uv_dissolve_mask = IN.ase_texcoord1.xy * _dissolve_mask_ST.xy + _dissolve_mask_ST.zw;
  1537. float temp_output_44_0 = ( tex2D( _dissolve_mask, uv_dissolve_mask ).r * _dissolvemaskqd );
  1538. surfaceDescription.Alpha = ( _Color.a * tex2DNode10.a * IN.ase_color.a * _alpha * step( lerpResult57 , ( ( ( tex2D( _dissolve, ( temp_output_30_0 + panner37 ) ).r * _dissolve_qiangdu ) * temp_output_44_0 ) + temp_output_44_0 ) ) );
  1539. surfaceDescription.AlphaClipThreshold = 0.5;
  1540. #if _ALPHATEST_ON
  1541. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1542. #endif
  1543. #ifdef LOD_FADE_CROSSFADE
  1544. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1545. #endif
  1546. float3 normalWS = IN.normalWS;
  1547. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1548. }
  1549. ENDHLSL
  1550. }
  1551. Pass
  1552. {
  1553. Name "DepthNormalsOnly"
  1554. Tags { "LightMode"="DepthNormalsOnly" }
  1555. ZTest LEqual
  1556. ZWrite On
  1557. HLSLPROGRAM
  1558. #pragma multi_compile_instancing
  1559. #define _RECEIVE_SHADOWS_OFF 1
  1560. #define ASE_SRP_VERSION 999999
  1561. #pragma exclude_renderers glcore gles gles3
  1562. #pragma vertex vert
  1563. #pragma fragment frag
  1564. #define ATTRIBUTES_NEED_NORMAL
  1565. #define ATTRIBUTES_NEED_TANGENT
  1566. #define ATTRIBUTES_NEED_TEXCOORD1
  1567. #define VARYINGS_NEED_NORMAL_WS
  1568. #define VARYINGS_NEED_TANGENT_WS
  1569. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1570. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1571. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1572. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1573. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1574. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1575. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1576. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1577. struct VertexInput
  1578. {
  1579. float4 vertex : POSITION;
  1580. float3 ase_normal : NORMAL;
  1581. float4 ase_texcoord : TEXCOORD0;
  1582. float4 ase_color : COLOR;
  1583. float4 ase_texcoord1 : TEXCOORD1;
  1584. UNITY_VERTEX_INPUT_INSTANCE_ID
  1585. };
  1586. struct VertexOutput
  1587. {
  1588. float4 clipPos : SV_POSITION;
  1589. float3 normalWS : TEXCOORD0;
  1590. float4 ase_texcoord1 : TEXCOORD1;
  1591. float4 ase_color : COLOR;
  1592. float4 ase_texcoord2 : TEXCOORD2;
  1593. UNITY_VERTEX_INPUT_INSTANCE_ID
  1594. UNITY_VERTEX_OUTPUT_STEREO
  1595. };
  1596. CBUFFER_START(UnityPerMaterial)
  1597. float4 _Color;
  1598. float4 _MainTex_ST;
  1599. float4 _TubTexPanner;
  1600. float4 _TubTex_ST;
  1601. float4 _dissolvePanner;
  1602. float4 _dissolve_ST;
  1603. float4 _dissolve_mask_ST;
  1604. float _CTime;
  1605. float _MainTexQiangdu;
  1606. int _Int1;
  1607. float _alpha;
  1608. float _dissolvevalue;
  1609. int _Int0;
  1610. float _dissolve_qiangdu;
  1611. float _dissolvemaskqd;
  1612. #ifdef TESSELLATION_ON
  1613. float _TessPhongStrength;
  1614. float _TessValue;
  1615. float _TessMin;
  1616. float _TessMax;
  1617. float _TessEdgeLength;
  1618. float _TessMaxDisp;
  1619. #endif
  1620. CBUFFER_END
  1621. sampler2D _MainTex;
  1622. sampler2D _TubTex;
  1623. sampler2D _dissolve;
  1624. sampler2D _dissolve_mask;
  1625. struct SurfaceDescription
  1626. {
  1627. float Alpha;
  1628. float AlphaClipThreshold;
  1629. };
  1630. VertexOutput VertexFunction(VertexInput v )
  1631. {
  1632. VertexOutput o;
  1633. ZERO_INITIALIZE(VertexOutput, o);
  1634. UNITY_SETUP_INSTANCE_ID(v);
  1635. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1636. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1637. o.ase_texcoord1.xy = v.ase_texcoord.xy;
  1638. o.ase_color = v.ase_color;
  1639. o.ase_texcoord2 = v.ase_texcoord1;
  1640. //setting value to unused interpolator channels and avoid initialization warnings
  1641. o.ase_texcoord1.zw = 0;
  1642. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1643. float3 defaultVertexValue = v.vertex.xyz;
  1644. #else
  1645. float3 defaultVertexValue = float3(0, 0, 0);
  1646. #endif
  1647. float3 vertexValue = defaultVertexValue;
  1648. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1649. v.vertex.xyz = vertexValue;
  1650. #else
  1651. v.vertex.xyz += vertexValue;
  1652. #endif
  1653. v.ase_normal = v.ase_normal;
  1654. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1655. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1656. o.clipPos = TransformWorldToHClip(positionWS);
  1657. o.normalWS.xyz = normalWS;
  1658. return o;
  1659. }
  1660. #if defined(TESSELLATION_ON)
  1661. struct VertexControl
  1662. {
  1663. float4 vertex : INTERNALTESSPOS;
  1664. float3 ase_normal : NORMAL;
  1665. float4 ase_texcoord : TEXCOORD0;
  1666. float4 ase_color : COLOR;
  1667. float4 ase_texcoord1 : TEXCOORD1;
  1668. UNITY_VERTEX_INPUT_INSTANCE_ID
  1669. };
  1670. struct TessellationFactors
  1671. {
  1672. float edge[3] : SV_TessFactor;
  1673. float inside : SV_InsideTessFactor;
  1674. };
  1675. VertexControl vert ( VertexInput v )
  1676. {
  1677. VertexControl o;
  1678. UNITY_SETUP_INSTANCE_ID(v);
  1679. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1680. o.vertex = v.vertex;
  1681. o.ase_normal = v.ase_normal;
  1682. o.ase_texcoord = v.ase_texcoord;
  1683. o.ase_color = v.ase_color;
  1684. o.ase_texcoord1 = v.ase_texcoord1;
  1685. return o;
  1686. }
  1687. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1688. {
  1689. TessellationFactors o;
  1690. float4 tf = 1;
  1691. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1692. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1693. #if defined(ASE_FIXED_TESSELLATION)
  1694. tf = FixedTess( tessValue );
  1695. #elif defined(ASE_DISTANCE_TESSELLATION)
  1696. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1697. #elif defined(ASE_LENGTH_TESSELLATION)
  1698. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1699. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1700. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1701. #endif
  1702. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1703. return o;
  1704. }
  1705. [domain("tri")]
  1706. [partitioning("fractional_odd")]
  1707. [outputtopology("triangle_cw")]
  1708. [patchconstantfunc("TessellationFunction")]
  1709. [outputcontrolpoints(3)]
  1710. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1711. {
  1712. return patch[id];
  1713. }
  1714. [domain("tri")]
  1715. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1716. {
  1717. VertexInput o = (VertexInput) 0;
  1718. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1719. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1720. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1721. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1722. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1723. #if defined(ASE_PHONG_TESSELLATION)
  1724. float3 pp[3];
  1725. for (int i = 0; i < 3; ++i)
  1726. 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));
  1727. float phongStrength = _TessPhongStrength;
  1728. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1729. #endif
  1730. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1731. return VertexFunction(o);
  1732. }
  1733. #else
  1734. VertexOutput vert ( VertexInput v )
  1735. {
  1736. return VertexFunction( v );
  1737. }
  1738. #endif
  1739. half4 frag(VertexOutput IN ) : SV_TARGET
  1740. {
  1741. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1742. float2 uv_MainTex = IN.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1743. float mulTime24 = _TimeParameters.x * _TubTexPanner.z;
  1744. float2 appendResult23 = (float2(_TubTexPanner.x , _TubTexPanner.y));
  1745. float2 uv_TubTex = IN.ase_texcoord1.xy * _TubTex_ST.xy + _TubTex_ST.zw;
  1746. float2 panner16 = ( mulTime24 * ( appendResult23 * _CTime ) + uv_TubTex);
  1747. float temp_output_30_0 = (-0.5 + (tex2D( _TubTex, panner16 ).r - 0.0) * (0.5 - -0.5) / (1.0 - 0.0));
  1748. float4 tex2DNode10 = tex2D( _MainTex, ( uv_MainTex + ( temp_output_30_0 * _TubTexPanner.w ) ) );
  1749. float4 texCoord56 = IN.ase_texcoord2;
  1750. texCoord56.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1751. float lerpResult57 = lerp( _dissolvevalue , texCoord56.x , (float)_Int0);
  1752. float mulTime41 = _TimeParameters.x * _dissolvePanner.z;
  1753. float2 appendResult40 = (float2(_dissolvePanner.x , _dissolvePanner.y));
  1754. float2 uv_dissolve = IN.ase_texcoord1.xy * _dissolve_ST.xy + _dissolve_ST.zw;
  1755. float2 panner37 = ( ( mulTime41 + _dissolvePanner.w ) * ( appendResult40 * _CTime ) + uv_dissolve);
  1756. float2 uv_dissolve_mask = IN.ase_texcoord1.xy * _dissolve_mask_ST.xy + _dissolve_mask_ST.zw;
  1757. float temp_output_44_0 = ( tex2D( _dissolve_mask, uv_dissolve_mask ).r * _dissolvemaskqd );
  1758. surfaceDescription.Alpha = ( _Color.a * tex2DNode10.a * IN.ase_color.a * _alpha * step( lerpResult57 , ( ( ( tex2D( _dissolve, ( temp_output_30_0 + panner37 ) ).r * _dissolve_qiangdu ) * temp_output_44_0 ) + temp_output_44_0 ) ) );
  1759. surfaceDescription.AlphaClipThreshold = 0.5;
  1760. #if _ALPHATEST_ON
  1761. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1762. #endif
  1763. #ifdef LOD_FADE_CROSSFADE
  1764. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1765. #endif
  1766. float3 normalWS = IN.normalWS;
  1767. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1768. }
  1769. ENDHLSL
  1770. }
  1771. }
  1772. CustomEditor "UnityEditor.ShaderGraphUnlitGUI"
  1773. Fallback "Hidden/InternalErrorShader"
  1774. }
  1775. /*ASEBEGIN
  1776. Version=18935
  1777. -1865.6;240;1760;891.8;3761.252;273.0711;2.272748;True;False
  1778. Node;AmplifyShaderEditor.Vector4Node;22;-2503.5,-239.3279;Inherit;False;Property;_TubTexPanner;扰动Panner;7;0;Create;False;0;0;0;False;0;False;1,0,1,1;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1779. Node;AmplifyShaderEditor.DynamicAppendNode;23;-2260.603,-213.4104;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1780. Node;AmplifyShaderEditor.FunctionNode;63;-2325.186,130.7543;Inherit;False;CombatTiem;2;;3;baa0c5cb73677dd46acb62f0afb31b96;0;0;1;FLOAT;0
  1781. Node;AmplifyShaderEditor.SimpleTimeNode;24;-2273.082,-89.95923;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
  1782. Node;AmplifyShaderEditor.TextureCoordinatesNode;20;-2211.614,-420.7908;Inherit;False;0;15;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
  1783. Node;AmplifyShaderEditor.Vector4Node;39;-2576.537,755.6047;Inherit;False;Property;_dissolvePanner;溶解panner;11;0;Create;False;0;0;0;False;0;False;0.3,0,1,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1784. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;64;-2032.286,140.8543;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1785. Node;AmplifyShaderEditor.PannerNode;16;-1930.24,-163.5338;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1786. Node;AmplifyShaderEditor.SimpleTimeNode;41;-2339.6,837.6212;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
  1787. Node;AmplifyShaderEditor.DynamicAppendNode;40;-2334.393,717.8513;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1788. Node;AmplifyShaderEditor.FunctionNode;66;-2504.548,1023.261;Inherit;False;CombatTiem;2;;4;baa0c5cb73677dd46acb62f0afb31b96;0;0;1;FLOAT;0
  1789. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;65;-2202.542,991.6884;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1790. Node;AmplifyShaderEditor.SamplerNode;15;-1651.546,-214.4492;Inherit;True;Property;_TubTex;TubTex;6;0;Create;True;0;0;0;False;0;False;-1;3d0080a1107b2fb4ca479dec7b44ff5a;3d0080a1107b2fb4ca479dec7b44ff5a;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
  1791. Node;AmplifyShaderEditor.TextureCoordinatesNode;38;-2317.117,534.0848;Inherit;False;0;33;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
  1792. Node;AmplifyShaderEditor.SimpleAddOpNode;42;-2105.268,850.6399;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1793. Node;AmplifyShaderEditor.TFHCRemapNode;30;-1253.347,-273.9267;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;-0.5;False;4;FLOAT;0.5;False;1;FLOAT;0
  1794. Node;AmplifyShaderEditor.PannerNode;37;-2025.087,628.4547;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1795. Node;AmplifyShaderEditor.SimpleAddOpNode;50;-1745.005,609.2891;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1796. Node;AmplifyShaderEditor.TextureCoordinatesNode;43;-1848.637,983.9622;Inherit;False;0;34;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
  1797. Node;AmplifyShaderEditor.SamplerNode;34;-1468.63,1043.282;Inherit;True;Property;_dissolve_mask;dissolve_mask;9;0;Create;True;0;0;0;False;0;False;-1;3cf172bdbeba56f42b97c3757929a1f4;3cf172bdbeba56f42b97c3757929a1f4;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
  1798. Node;AmplifyShaderEditor.RangedFloatNode;36;-1476.49,839.1823;Inherit;False;Property;_dissolve_qiangdu;dissolve强度;10;0;Create;False;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  1799. Node;AmplifyShaderEditor.SamplerNode;33;-1538.89,614.2823;Inherit;True;Property;_dissolve;dissolve;8;0;Create;True;0;0;0;False;0;False;-1;893077602610eaf4e9b93d85a92b7323;893077602610eaf4e9b93d85a92b7323;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
  1800. Node;AmplifyShaderEditor.RangedFloatNode;45;-1377.532,1290.156;Inherit;False;Property;_dissolvemaskqd;溶解mask强度;12;0;Create;False;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  1801. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;35;-1161.89,778.0823;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1802. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;44;-1076.255,1113.88;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1803. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;46;-870.8089,836.6782;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1804. Node;AmplifyShaderEditor.RangedFloatNode;48;-698.1848,430.4902;Inherit;False;Property;_dissolvevalue;溶解值;13;0;Create;False;0;0;0;False;0;False;0.9;0.94;0;0;0;1;FLOAT;0
  1805. Node;AmplifyShaderEditor.TextureCoordinatesNode;29;-1014.974,-438.5799;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
  1806. Node;AmplifyShaderEditor.IntNode;55;-714.6384,677.1638;Inherit;False;Property;_Int0;自定义参数溶解;14;1;[Enum];Create;False;0;2;dissolvevalue;0;UV2U;1;0;True;0;False;0;0;False;0;1;INT;0
  1807. Node;AmplifyShaderEditor.TextureCoordinatesNode;56;-791.8202,505.7548;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
  1808. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;27;-872.0806,-89.52875;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1809. Node;AmplifyShaderEditor.LerpOp;57;-417.9571,475.073;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  1810. Node;AmplifyShaderEditor.SimpleAddOpNode;49;-675.0849,1087.162;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1811. Node;AmplifyShaderEditor.SimpleAddOpNode;28;-776.1437,-273.1334;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1812. Node;AmplifyShaderEditor.SamplerNode;10;-605.8022,-458.397;Inherit;True;Property;_MainTex;MainTex;4;0;Create;True;0;0;0;False;0;False;-1;aca93b3b6c5e81547822f2dadba8cf27;aca93b3b6c5e81547822f2dadba8cf27;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
  1813. Node;AmplifyShaderEditor.ColorNode;12;-562.1715,-655.6741;Inherit;False;Property;_Color;Color;1;0;Create;True;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
  1814. Node;AmplifyShaderEditor.StepOpNode;47;-262.2218,637.2561;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1815. Node;AmplifyShaderEditor.RangedFloatNode;32;-229.7394,244.9962;Inherit;False;Property;_alpha;alpha;0;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  1816. Node;AmplifyShaderEditor.VertexColorNode;13;-543.4133,-225.5728;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1817. Node;AmplifyShaderEditor.LerpOp;59;-801.1196,166.2723;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  1818. Node;AmplifyShaderEditor.TextureCoordinatesNode;62;-1304.12,249.2723;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
  1819. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;11;-176.2862,-285.8673;Inherit;False;4;4;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;FLOAT;0;False;1;COLOR;0
  1820. Node;AmplifyShaderEditor.RangedFloatNode;14;-894.3342,43.59175;Inherit;False;Property;_MainTexQiangdu;MainTex强度;5;0;Create;False;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
  1821. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;31;-51.473,103.0016;Inherit;False;5;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;FLOAT;0
  1822. Node;AmplifyShaderEditor.RangedFloatNode;61;-1048.12,141.2723;Inherit;False;Constant;_Float0;Float 0;14;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  1823. Node;AmplifyShaderEditor.IntNode;60;-979.1196,373.2723;Inherit;False;Property;_Int1;自定义参数亮度;15;1;[Enum];Create;False;0;2;off;0;on;1;0;False;0;False;0;0;False;0;1;INT;0
  1824. Node;AmplifyShaderEditor.SimpleAddOpNode;26;-2072.965,-10.27245;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1825. Node;AmplifyShaderEditor.SimpleAddOpNode;58;-541.1196,49.27228;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1826. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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
  1827. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;7;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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
  1828. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;3;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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
  1829. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;9;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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
  1830. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;8;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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
  1831. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;4;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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
  1832. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;5;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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
  1833. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;6;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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
  1834. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;2;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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
  1835. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;149,-112;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;LT/shandian;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;8;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;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;637983077858542633; Blend;0;0;Two Sided;0;637986479055684874;Cast Shadows;0;637983077873094310; Use Shadow Threshold;0;0;Receive Shadows;0;637983077902670611;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
  1836. WireConnection;23;0;22;1
  1837. WireConnection;23;1;22;2
  1838. WireConnection;24;0;22;3
  1839. WireConnection;64;0;23;0
  1840. WireConnection;64;1;63;0
  1841. WireConnection;16;0;20;0
  1842. WireConnection;16;2;64;0
  1843. WireConnection;16;1;24;0
  1844. WireConnection;41;0;39;3
  1845. WireConnection;40;0;39;1
  1846. WireConnection;40;1;39;2
  1847. WireConnection;65;0;40;0
  1848. WireConnection;65;1;66;0
  1849. WireConnection;15;1;16;0
  1850. WireConnection;42;0;41;0
  1851. WireConnection;42;1;39;4
  1852. WireConnection;30;0;15;1
  1853. WireConnection;37;0;38;0
  1854. WireConnection;37;2;65;0
  1855. WireConnection;37;1;42;0
  1856. WireConnection;50;0;30;0
  1857. WireConnection;50;1;37;0
  1858. WireConnection;34;1;43;0
  1859. WireConnection;33;1;50;0
  1860. WireConnection;35;0;33;1
  1861. WireConnection;35;1;36;0
  1862. WireConnection;44;0;34;1
  1863. WireConnection;44;1;45;0
  1864. WireConnection;46;0;35;0
  1865. WireConnection;46;1;44;0
  1866. WireConnection;27;0;30;0
  1867. WireConnection;27;1;22;4
  1868. WireConnection;57;0;48;0
  1869. WireConnection;57;1;56;1
  1870. WireConnection;57;2;55;0
  1871. WireConnection;49;0;46;0
  1872. WireConnection;49;1;44;0
  1873. WireConnection;28;0;29;0
  1874. WireConnection;28;1;27;0
  1875. WireConnection;10;1;28;0
  1876. WireConnection;47;0;57;0
  1877. WireConnection;47;1;49;0
  1878. WireConnection;59;0;61;0
  1879. WireConnection;59;1;62;2
  1880. WireConnection;59;2;60;0
  1881. WireConnection;11;0;12;0
  1882. WireConnection;11;1;10;0
  1883. WireConnection;11;2;13;0
  1884. WireConnection;11;3;58;0
  1885. WireConnection;31;0;12;4
  1886. WireConnection;31;1;10;4
  1887. WireConnection;31;2;13;4
  1888. WireConnection;31;3;32;0
  1889. WireConnection;31;4;47;0
  1890. WireConnection;26;0;24;0
  1891. WireConnection;58;0;14;0
  1892. WireConnection;58;1;59;0
  1893. WireConnection;1;2;11;0
  1894. WireConnection;1;3;31;0
  1895. ASEEND*/
  1896. //CHKSM=2B585590441CDCA48928046566945716AA4222A6