WeaponDissolve.shader 126 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428
  1. // Made with Amplify Shader Editor v1.9.1.5
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "LT/WeaponDissolve"
  4. {
  5. Properties
  6. {
  7. [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
  8. [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
  9. [ASEBegin]_MainTex("MainTex", 2D) = "white" {}
  10. _zhouxiang("轴向高度", Float) = -0.15
  11. [HDR]_Colorzhouxiang("轴向溶解光边颜色", Color) = (1,1,1,1)
  12. [HDR]_Colorhuawen("花纹颜色", Color) = (1,1,1,1)
  13. _huawen("花纹", 2D) = "white" {}
  14. _HuawenLighting("花纹亮度", Range( 0 , 1)) = 1
  15. _AllLighting("整体亮度", Range( 0 , 1)) = 0
  16. _Dissolve("溶解图", 2D) = "white" {}
  17. [ASEEnd]_DissolveValue("溶解值", Range( 0 , 1.5)) = 0.158529
  18. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  19. //_TransmissionShadow( "Transmission Shadow", Range( 0, 1 ) ) = 0.5
  20. //_TransStrength( "Trans Strength", Range( 0, 50 ) ) = 1
  21. //_TransNormal( "Trans Normal Distortion", Range( 0, 1 ) ) = 0.5
  22. //_TransScattering( "Trans Scattering", Range( 1, 50 ) ) = 2
  23. //_TransDirect( "Trans Direct", Range( 0, 1 ) ) = 0.9
  24. //_TransAmbient( "Trans Ambient", Range( 0, 1 ) ) = 0.1
  25. //_TransShadow( "Trans Shadow", Range( 0, 1 ) ) = 0.5
  26. //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
  27. //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
  28. //_TessMin( "Tess Min Distance", Float ) = 10
  29. //_TessMax( "Tess Max Distance", Float ) = 25
  30. //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
  31. //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
  32. [HideInInspector][ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0
  33. [HideInInspector][ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0
  34. [HideInInspector][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 1.0
  35. [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0
  36. [HideInInspector] _QueueControl("_QueueControl", Float) = -1
  37. [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  38. [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  39. [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  40. }
  41. SubShader
  42. {
  43. LOD 0
  44. Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Lit" }
  45. Cull Back
  46. ZWrite Off
  47. ZTest LEqual
  48. Offset 0 , 0
  49. AlphaToMask Off
  50. HLSLINCLUDE
  51. #pragma target 3.5
  52. #pragma prefer_hlslcc gles
  53. #pragma exclude_renderers xboxone xboxseries playstation ps4 ps5 // ensure rendering platforms toggle list is visible
  54. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
  55. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
  56. #ifndef ASE_TESS_FUNCS
  57. #define ASE_TESS_FUNCS
  58. float4 FixedTess( float tessValue )
  59. {
  60. return tessValue;
  61. }
  62. float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
  63. {
  64. float3 wpos = mul(o2w,vertex).xyz;
  65. float dist = distance (wpos, cameraPos);
  66. float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
  67. return f;
  68. }
  69. float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
  70. {
  71. float4 tess;
  72. tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
  73. tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
  74. tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
  75. tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
  76. return tess;
  77. }
  78. float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
  79. {
  80. float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
  81. float len = distance(wpos0, wpos1);
  82. float f = max(len * scParams.y / (edgeLen * dist), 1.0);
  83. return f;
  84. }
  85. float DistanceFromPlane (float3 pos, float4 plane)
  86. {
  87. float d = dot (float4(pos,1.0f), plane);
  88. return d;
  89. }
  90. bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
  91. {
  92. float4 planeTest;
  93. planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  94. (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  95. (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
  96. planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  97. (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  98. (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
  99. planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  100. (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  101. (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
  102. planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  103. (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  104. (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
  105. return !all (planeTest);
  106. }
  107. float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
  108. {
  109. float3 f;
  110. f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
  111. f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
  112. f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
  113. return CalcTriEdgeTessFactors (f);
  114. }
  115. float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
  116. {
  117. float3 pos0 = mul(o2w,v0).xyz;
  118. float3 pos1 = mul(o2w,v1).xyz;
  119. float3 pos2 = mul(o2w,v2).xyz;
  120. float4 tess;
  121. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  122. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  123. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  124. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  125. return tess;
  126. }
  127. float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
  128. {
  129. float3 pos0 = mul(o2w,v0).xyz;
  130. float3 pos1 = mul(o2w,v1).xyz;
  131. float3 pos2 = mul(o2w,v2).xyz;
  132. float4 tess;
  133. if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
  134. {
  135. tess = 0.0f;
  136. }
  137. else
  138. {
  139. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  140. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  141. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  142. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  143. }
  144. return tess;
  145. }
  146. #endif //ASE_TESS_FUNCS
  147. ENDHLSL
  148. Pass
  149. {
  150. Name "Forward"
  151. Tags { "LightMode"="UniversalForward" }
  152. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  153. ZWrite On
  154. ZTest LEqual
  155. Offset 0 , 0
  156. ColorMask RGBA
  157. HLSLPROGRAM
  158. #define _NORMAL_DROPOFF_TS 1
  159. #pragma multi_compile_instancing
  160. #pragma instancing_options renderinglayer
  161. #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE
  162. #pragma multi_compile_fog
  163. #define ASE_FOG 1
  164. #define _SURFACE_TYPE_TRANSPARENT 1
  165. #define ASE_SRP_VERSION 120108
  166. #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
  167. #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
  168. #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
  169. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
  170. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION
  171. #pragma multi_compile_fragment _ _SHADOWS_SOFT
  172. #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
  173. #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  174. #pragma multi_compile_fragment _ _LIGHT_LAYERS
  175. #pragma multi_compile_fragment _ _LIGHT_COOKIES
  176. #pragma multi_compile _ _CLUSTERED_RENDERING
  177. #pragma shader_feature_local _RECEIVE_SHADOWS_OFF
  178. #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF
  179. #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF
  180. #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
  181. #pragma multi_compile _ SHADOWS_SHADOWMASK
  182. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  183. #pragma multi_compile _ LIGHTMAP_ON
  184. #pragma multi_compile _ DYNAMICLIGHTMAP_ON
  185. #pragma multi_compile_fragment _ DEBUG_DISPLAY
  186. #pragma vertex vert
  187. #pragma fragment frag
  188. #define SHADERPASS SHADERPASS_FORWARD
  189. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  190. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  191. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  192. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  193. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  194. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  195. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
  196. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  197. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  198. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  199. #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL)
  200. #define ENABLE_TERRAIN_PERPIXEL_NORMAL
  201. #endif
  202. struct VertexInput
  203. {
  204. float4 vertex : POSITION;
  205. float3 ase_normal : NORMAL;
  206. float4 ase_tangent : TANGENT;
  207. float4 texcoord : TEXCOORD0;
  208. float4 texcoord1 : TEXCOORD1;
  209. float4 texcoord2 : TEXCOORD2;
  210. UNITY_VERTEX_INPUT_INSTANCE_ID
  211. };
  212. struct VertexOutput
  213. {
  214. float4 clipPos : SV_POSITION;
  215. float4 lightmapUVOrVertexSH : TEXCOORD0;
  216. half4 fogFactorAndVertexLight : TEXCOORD1;
  217. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  218. float4 shadowCoord : TEXCOORD2;
  219. #endif
  220. float4 tSpace0 : TEXCOORD3;
  221. float4 tSpace1 : TEXCOORD4;
  222. float4 tSpace2 : TEXCOORD5;
  223. #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
  224. float4 screenPos : TEXCOORD6;
  225. #endif
  226. #if defined(DYNAMICLIGHTMAP_ON)
  227. float2 dynamicLightmapUV : TEXCOORD7;
  228. #endif
  229. float4 ase_texcoord8 : TEXCOORD8;
  230. UNITY_VERTEX_INPUT_INSTANCE_ID
  231. UNITY_VERTEX_OUTPUT_STEREO
  232. };
  233. CBUFFER_START(UnityPerMaterial)
  234. float4 _Colorhuawen;
  235. float4 _MainTex_ST;
  236. float4 _Colorzhouxiang;
  237. float4 _Dissolve_ST;
  238. float _HuawenLighting;
  239. float _AllLighting;
  240. float _DissolveValue;
  241. float _zhouxiang;
  242. #ifdef ASE_TRANSMISSION
  243. float _TransmissionShadow;
  244. #endif
  245. #ifdef ASE_TRANSLUCENCY
  246. float _TransStrength;
  247. float _TransNormal;
  248. float _TransScattering;
  249. float _TransDirect;
  250. float _TransAmbient;
  251. float _TransShadow;
  252. #endif
  253. #ifdef ASE_TESSELLATION
  254. float _TessPhongStrength;
  255. float _TessValue;
  256. float _TessMin;
  257. float _TessMax;
  258. float _TessEdgeLength;
  259. float _TessMaxDisp;
  260. #endif
  261. CBUFFER_END
  262. // Property used by ScenePickingPass
  263. #ifdef SCENEPICKINGPASS
  264. float4 _SelectionID;
  265. #endif
  266. // Properties used by SceneSelectionPass
  267. #ifdef SCENESELECTIONPASS
  268. int _ObjectId;
  269. int _PassValue;
  270. #endif
  271. sampler2D _huawen;
  272. sampler2D _MainTex;
  273. sampler2D _Dissolve;
  274. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
  275. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRForwardPass.hlsl"
  276. //#ifdef HAVE_VFX_MODIFICATION
  277. //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
  278. //#endif
  279. VertexOutput VertexFunction( VertexInput v )
  280. {
  281. VertexOutput o = (VertexOutput)0;
  282. UNITY_SETUP_INSTANCE_ID(v);
  283. UNITY_TRANSFER_INSTANCE_ID(v, o);
  284. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  285. o.ase_texcoord8.xy = v.texcoord2.xy;
  286. o.ase_texcoord8.zw = v.texcoord.xy;
  287. #ifdef ASE_ABSOLUTE_VERTEX_POS
  288. float3 defaultVertexValue = v.vertex.xyz;
  289. #else
  290. float3 defaultVertexValue = float3(0, 0, 0);
  291. #endif
  292. float3 vertexValue = defaultVertexValue;
  293. #ifdef ASE_ABSOLUTE_VERTEX_POS
  294. v.vertex.xyz = vertexValue;
  295. #else
  296. v.vertex.xyz += vertexValue;
  297. #endif
  298. v.ase_normal = v.ase_normal;
  299. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  300. float3 positionVS = TransformWorldToView( positionWS );
  301. float4 positionCS = TransformWorldToHClip( positionWS );
  302. VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent );
  303. o.tSpace0 = float4( normalInput.normalWS, positionWS.x);
  304. o.tSpace1 = float4( normalInput.tangentWS, positionWS.y);
  305. o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z);
  306. #if defined(LIGHTMAP_ON)
  307. OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy );
  308. #endif
  309. #if !defined(LIGHTMAP_ON)
  310. OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz );
  311. #endif
  312. #if defined(DYNAMICLIGHTMAP_ON)
  313. o.dynamicLightmapUV.xy = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
  314. #endif
  315. #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
  316. o.lightmapUVOrVertexSH.zw = v.texcoord;
  317. o.lightmapUVOrVertexSH.xy = v.texcoord * unity_LightmapST.xy + unity_LightmapST.zw;
  318. #endif
  319. half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS );
  320. #ifdef ASE_FOG
  321. half fogFactor = ComputeFogFactor( positionCS.z );
  322. #else
  323. half fogFactor = 0;
  324. #endif
  325. o.fogFactorAndVertexLight = half4(fogFactor, vertexLight);
  326. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  327. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  328. vertexInput.positionWS = positionWS;
  329. vertexInput.positionCS = positionCS;
  330. o.shadowCoord = GetShadowCoord( vertexInput );
  331. #endif
  332. o.clipPos = positionCS;
  333. #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
  334. o.screenPos = ComputeScreenPos(positionCS);
  335. #endif
  336. return o;
  337. }
  338. #if defined(ASE_TESSELLATION)
  339. struct VertexControl
  340. {
  341. float4 vertex : INTERNALTESSPOS;
  342. float3 ase_normal : NORMAL;
  343. float4 ase_tangent : TANGENT;
  344. float4 texcoord : TEXCOORD0;
  345. float4 texcoord1 : TEXCOORD1;
  346. float4 texcoord2 : TEXCOORD2;
  347. UNITY_VERTEX_INPUT_INSTANCE_ID
  348. };
  349. struct TessellationFactors
  350. {
  351. float edge[3] : SV_TessFactor;
  352. float inside : SV_InsideTessFactor;
  353. };
  354. VertexControl vert ( VertexInput v )
  355. {
  356. VertexControl o;
  357. UNITY_SETUP_INSTANCE_ID(v);
  358. UNITY_TRANSFER_INSTANCE_ID(v, o);
  359. o.vertex = v.vertex;
  360. o.ase_normal = v.ase_normal;
  361. o.ase_tangent = v.ase_tangent;
  362. o.texcoord = v.texcoord;
  363. o.texcoord1 = v.texcoord1;
  364. o.texcoord2 = v.texcoord2;
  365. return o;
  366. }
  367. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  368. {
  369. TessellationFactors o;
  370. float4 tf = 1;
  371. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  372. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  373. #if defined(ASE_FIXED_TESSELLATION)
  374. tf = FixedTess( tessValue );
  375. #elif defined(ASE_DISTANCE_TESSELLATION)
  376. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  377. #elif defined(ASE_LENGTH_TESSELLATION)
  378. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  379. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  380. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  381. #endif
  382. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  383. return o;
  384. }
  385. [domain("tri")]
  386. [partitioning("fractional_odd")]
  387. [outputtopology("triangle_cw")]
  388. [patchconstantfunc("TessellationFunction")]
  389. [outputcontrolpoints(3)]
  390. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  391. {
  392. return patch[id];
  393. }
  394. [domain("tri")]
  395. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  396. {
  397. VertexInput o = (VertexInput) 0;
  398. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  399. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  400. o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z;
  401. o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z;
  402. o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
  403. o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z;
  404. #if defined(ASE_PHONG_TESSELLATION)
  405. float3 pp[3];
  406. for (int i = 0; i < 3; ++i)
  407. 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));
  408. float phongStrength = _TessPhongStrength;
  409. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  410. #endif
  411. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  412. return VertexFunction(o);
  413. }
  414. #else
  415. VertexOutput vert ( VertexInput v )
  416. {
  417. return VertexFunction( v );
  418. }
  419. #endif
  420. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
  421. #define ASE_SV_DEPTH SV_DepthLessEqual
  422. #else
  423. #define ASE_SV_DEPTH SV_Depth
  424. #endif
  425. half4 frag ( VertexOutput IN
  426. #ifdef ASE_DEPTH_WRITE_ON
  427. ,out float outputDepth : ASE_SV_DEPTH
  428. #endif
  429. ) : SV_Target
  430. {
  431. UNITY_SETUP_INSTANCE_ID(IN);
  432. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
  433. #ifdef LOD_FADE_CROSSFADE
  434. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  435. #endif
  436. #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
  437. float2 sampleCoords = (IN.lightmapUVOrVertexSH.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy;
  438. float3 WorldNormal = TransformObjectToWorldNormal(normalize(SAMPLE_TEXTURE2D(_TerrainNormalmapTexture, sampler_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1));
  439. float3 WorldTangent = -cross(GetObjectToWorldMatrix()._13_23_33, WorldNormal);
  440. float3 WorldBiTangent = cross(WorldNormal, -WorldTangent);
  441. #else
  442. float3 WorldNormal = normalize( IN.tSpace0.xyz );
  443. float3 WorldTangent = IN.tSpace1.xyz;
  444. float3 WorldBiTangent = IN.tSpace2.xyz;
  445. #endif
  446. float3 WorldPosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w);
  447. float3 WorldViewDirection = _WorldSpaceCameraPos.xyz - WorldPosition;
  448. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  449. #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
  450. float4 ScreenPos = IN.screenPos;
  451. #endif
  452. float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.clipPos);
  453. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  454. ShadowCoords = IN.shadowCoord;
  455. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  456. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  457. #endif
  458. WorldViewDirection = SafeNormalize( WorldViewDirection );
  459. float2 texCoord37 = IN.ase_texcoord8.xy * float2( 1,1 ) + float2( 0,0 );
  460. float2 uv_MainTex = IN.ase_texcoord8.zw * _MainTex_ST.xy + _MainTex_ST.zw;
  461. float2 uv_Dissolve = IN.ase_texcoord8.zw * _Dissolve_ST.xy + _Dissolve_ST.zw;
  462. float4 tex2DNode46 = tex2D( _Dissolve, uv_Dissolve );
  463. float temp_output_51_0 = step( _DissolveValue , ( tex2DNode46.r + 0.05 ) );
  464. float2 texCoord21 = IN.ase_texcoord8.xy * float2( 1,1 ) + float2( 0,0 );
  465. float temp_output_23_0 = ( texCoord21.y + _zhouxiang );
  466. float temp_output_29_0 = ( 1.0 - step( temp_output_23_0 , 0.49 ) );
  467. float3 BaseColor = ( ( ( tex2D( _huawen, texCoord37 ).r * _Colorhuawen * _HuawenLighting ) + ( _Colorhuawen * _AllLighting ) ) + tex2D( _MainTex, uv_MainTex ) + ( _Colorzhouxiang * ( temp_output_51_0 - step( _DissolveValue , tex2DNode46.r ) ) ) + ( ( temp_output_29_0 - ( 1.0 - step( temp_output_23_0 , 0.5 ) ) ) * _Colorzhouxiang ) ).rgb;
  468. float3 Normal = float3(0, 0, 1);
  469. float3 Emission = 0;
  470. float3 Specular = 0.5;
  471. float Metallic = 0;
  472. float Smoothness = 0.5;
  473. float Occlusion = 1;
  474. float Alpha = saturate( ( saturate( temp_output_29_0 ) * temp_output_51_0 ) );
  475. float AlphaClipThreshold = 0.5;
  476. float AlphaClipThresholdShadow = 0.5;
  477. float3 BakedGI = 0;
  478. float3 RefractionColor = 1;
  479. float RefractionIndex = 1;
  480. float3 Transmission = 1;
  481. float3 Translucency = 1;
  482. #ifdef ASE_DEPTH_WRITE_ON
  483. float DepthValue = 0;
  484. #endif
  485. #ifdef _CLEARCOAT
  486. float CoatMask = 0;
  487. float CoatSmoothness = 0;
  488. #endif
  489. #ifdef _ALPHATEST_ON
  490. clip(Alpha - AlphaClipThreshold);
  491. #endif
  492. InputData inputData = (InputData)0;
  493. inputData.positionWS = WorldPosition;
  494. inputData.viewDirectionWS = WorldViewDirection;
  495. #ifdef _NORMALMAP
  496. #if _NORMAL_DROPOFF_TS
  497. inputData.normalWS = TransformTangentToWorld(Normal, half3x3(WorldTangent, WorldBiTangent, WorldNormal));
  498. #elif _NORMAL_DROPOFF_OS
  499. inputData.normalWS = TransformObjectToWorldNormal(Normal);
  500. #elif _NORMAL_DROPOFF_WS
  501. inputData.normalWS = Normal;
  502. #endif
  503. inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS);
  504. #else
  505. inputData.normalWS = WorldNormal;
  506. #endif
  507. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  508. inputData.shadowCoord = ShadowCoords;
  509. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  510. inputData.shadowCoord = TransformWorldToShadowCoord(inputData.positionWS);
  511. #else
  512. inputData.shadowCoord = float4(0, 0, 0, 0);
  513. #endif
  514. #ifdef ASE_FOG
  515. inputData.fogCoord = IN.fogFactorAndVertexLight.x;
  516. #endif
  517. inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw;
  518. #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
  519. float3 SH = SampleSH(inputData.normalWS.xyz);
  520. #else
  521. float3 SH = IN.lightmapUVOrVertexSH.xyz;
  522. #endif
  523. #if defined(DYNAMICLIGHTMAP_ON)
  524. inputData.bakedGI = SAMPLE_GI(IN.lightmapUVOrVertexSH.xy, IN.dynamicLightmapUV.xy, SH, inputData.normalWS);
  525. #else
  526. inputData.bakedGI = SAMPLE_GI(IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS);
  527. #endif
  528. #ifdef ASE_BAKEDGI
  529. inputData.bakedGI = BakedGI;
  530. #endif
  531. inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV;
  532. inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy);
  533. #if defined(DEBUG_DISPLAY)
  534. #if defined(DYNAMICLIGHTMAP_ON)
  535. inputData.dynamicLightmapUV = IN.dynamicLightmapUV.xy;
  536. #endif
  537. #if defined(LIGHTMAP_ON)
  538. inputData.staticLightmapUV = IN.lightmapUVOrVertexSH.xy;
  539. #else
  540. inputData.vertexSH = SH;
  541. #endif
  542. #endif
  543. SurfaceData surfaceData;
  544. surfaceData.albedo = BaseColor;
  545. surfaceData.metallic = saturate(Metallic);
  546. surfaceData.specular = Specular;
  547. surfaceData.smoothness = saturate(Smoothness),
  548. surfaceData.occlusion = Occlusion,
  549. surfaceData.emission = Emission,
  550. surfaceData.alpha = saturate(Alpha);
  551. surfaceData.normalTS = Normal;
  552. surfaceData.clearCoatMask = 0;
  553. surfaceData.clearCoatSmoothness = 1;
  554. #ifdef _CLEARCOAT
  555. surfaceData.clearCoatMask = saturate(CoatMask);
  556. surfaceData.clearCoatSmoothness = saturate(CoatSmoothness);
  557. #endif
  558. #ifdef _DBUFFER
  559. ApplyDecalToSurfaceData(IN.clipPos, surfaceData, inputData);
  560. #endif
  561. half4 color = UniversalFragmentPBR( inputData, surfaceData);
  562. #ifdef ASE_TRANSMISSION
  563. {
  564. float shadow = _TransmissionShadow;
  565. Light mainLight = GetMainLight( inputData.shadowCoord );
  566. float3 mainAtten = mainLight.color * mainLight.distanceAttenuation;
  567. mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow );
  568. half3 mainTransmission = max(0 , -dot(inputData.normalWS, mainLight.direction)) * mainAtten * Transmission;
  569. color.rgb += BaseColor * mainTransmission;
  570. #ifdef _ADDITIONAL_LIGHTS
  571. int transPixelLightCount = GetAdditionalLightsCount();
  572. for (int i = 0; i < transPixelLightCount; ++i)
  573. {
  574. Light light = GetAdditionalLight(i, inputData.positionWS);
  575. float3 atten = light.color * light.distanceAttenuation;
  576. atten = lerp( atten, atten * light.shadowAttenuation, shadow );
  577. half3 transmission = max(0 , -dot(inputData.normalWS, light.direction)) * atten * Transmission;
  578. color.rgb += BaseColor * transmission;
  579. }
  580. #endif
  581. }
  582. #endif
  583. #ifdef ASE_TRANSLUCENCY
  584. {
  585. float shadow = _TransShadow;
  586. float normal = _TransNormal;
  587. float scattering = _TransScattering;
  588. float direct = _TransDirect;
  589. float ambient = _TransAmbient;
  590. float strength = _TransStrength;
  591. Light mainLight = GetMainLight( inputData.shadowCoord );
  592. float3 mainAtten = mainLight.color * mainLight.distanceAttenuation;
  593. mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow );
  594. half3 mainLightDir = mainLight.direction + inputData.normalWS * normal;
  595. half mainVdotL = pow( saturate( dot( inputData.viewDirectionWS, -mainLightDir ) ), scattering );
  596. half3 mainTranslucency = mainAtten * ( mainVdotL * direct + inputData.bakedGI * ambient ) * Translucency;
  597. color.rgb += BaseColor * mainTranslucency * strength;
  598. #ifdef _ADDITIONAL_LIGHTS
  599. int transPixelLightCount = GetAdditionalLightsCount();
  600. for (int i = 0; i < transPixelLightCount; ++i)
  601. {
  602. Light light = GetAdditionalLight(i, inputData.positionWS);
  603. float3 atten = light.color * light.distanceAttenuation;
  604. atten = lerp( atten, atten * light.shadowAttenuation, shadow );
  605. half3 lightDir = light.direction + inputData.normalWS * normal;
  606. half VdotL = pow( saturate( dot( inputData.viewDirectionWS, -lightDir ) ), scattering );
  607. half3 translucency = atten * ( VdotL * direct + inputData.bakedGI * ambient ) * Translucency;
  608. color.rgb += BaseColor * translucency * strength;
  609. }
  610. #endif
  611. }
  612. #endif
  613. #ifdef ASE_REFRACTION
  614. float4 projScreenPos = ScreenPos / ScreenPos.w;
  615. float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, float4( WorldNormal,0 ) ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) );
  616. projScreenPos.xy += refractionOffset.xy;
  617. float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos.xy ) * RefractionColor;
  618. color.rgb = lerp( refraction, color.rgb, color.a );
  619. color.a = 1;
  620. #endif
  621. #ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY
  622. color.rgb *= color.a;
  623. #endif
  624. #ifdef ASE_FOG
  625. #ifdef TERRAIN_SPLAT_ADDPASS
  626. color.rgb = MixFogColor(color.rgb, half3( 0, 0, 0 ), IN.fogFactorAndVertexLight.x );
  627. #else
  628. color.rgb = MixFog(color.rgb, IN.fogFactorAndVertexLight.x);
  629. #endif
  630. #endif
  631. #ifdef ASE_DEPTH_WRITE_ON
  632. outputDepth = DepthValue;
  633. #endif
  634. return color;
  635. }
  636. ENDHLSL
  637. }
  638. Pass
  639. {
  640. Name "ShadowCaster"
  641. Tags { "LightMode"="ShadowCaster" }
  642. ZWrite On
  643. ZTest LEqual
  644. AlphaToMask Off
  645. ColorMask 0
  646. HLSLPROGRAM
  647. #define _NORMAL_DROPOFF_TS 1
  648. #pragma multi_compile_instancing
  649. #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE
  650. #define ASE_FOG 1
  651. #define _SURFACE_TYPE_TRANSPARENT 1
  652. #define ASE_SRP_VERSION 120108
  653. #pragma vertex vert
  654. #pragma fragment frag
  655. #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW
  656. #define SHADERPASS SHADERPASS_SHADOWCASTER
  657. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  658. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  659. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  660. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  661. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  662. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  663. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  664. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  665. struct VertexInput
  666. {
  667. float4 vertex : POSITION;
  668. float3 ase_normal : NORMAL;
  669. float4 ase_texcoord2 : TEXCOORD2;
  670. float4 ase_texcoord : TEXCOORD0;
  671. UNITY_VERTEX_INPUT_INSTANCE_ID
  672. };
  673. struct VertexOutput
  674. {
  675. float4 clipPos : SV_POSITION;
  676. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  677. float3 worldPos : TEXCOORD0;
  678. #endif
  679. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  680. float4 shadowCoord : TEXCOORD1;
  681. #endif
  682. float4 ase_texcoord2 : TEXCOORD2;
  683. UNITY_VERTEX_INPUT_INSTANCE_ID
  684. UNITY_VERTEX_OUTPUT_STEREO
  685. };
  686. CBUFFER_START(UnityPerMaterial)
  687. float4 _Colorhuawen;
  688. float4 _MainTex_ST;
  689. float4 _Colorzhouxiang;
  690. float4 _Dissolve_ST;
  691. float _HuawenLighting;
  692. float _AllLighting;
  693. float _DissolveValue;
  694. float _zhouxiang;
  695. #ifdef ASE_TRANSMISSION
  696. float _TransmissionShadow;
  697. #endif
  698. #ifdef ASE_TRANSLUCENCY
  699. float _TransStrength;
  700. float _TransNormal;
  701. float _TransScattering;
  702. float _TransDirect;
  703. float _TransAmbient;
  704. float _TransShadow;
  705. #endif
  706. #ifdef ASE_TESSELLATION
  707. float _TessPhongStrength;
  708. float _TessValue;
  709. float _TessMin;
  710. float _TessMax;
  711. float _TessEdgeLength;
  712. float _TessMaxDisp;
  713. #endif
  714. CBUFFER_END
  715. // Property used by ScenePickingPass
  716. #ifdef SCENEPICKINGPASS
  717. float4 _SelectionID;
  718. #endif
  719. // Properties used by SceneSelectionPass
  720. #ifdef SCENESELECTIONPASS
  721. int _ObjectId;
  722. int _PassValue;
  723. #endif
  724. sampler2D _Dissolve;
  725. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
  726. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShadowCasterPass.hlsl"
  727. //#ifdef HAVE_VFX_MODIFICATION
  728. //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
  729. //#endif
  730. float3 _LightDirection;
  731. float3 _LightPosition;
  732. VertexOutput VertexFunction( VertexInput v )
  733. {
  734. VertexOutput o;
  735. UNITY_SETUP_INSTANCE_ID(v);
  736. UNITY_TRANSFER_INSTANCE_ID(v, o);
  737. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
  738. o.ase_texcoord2.xy = v.ase_texcoord2.xy;
  739. o.ase_texcoord2.zw = v.ase_texcoord.xy;
  740. #ifdef ASE_ABSOLUTE_VERTEX_POS
  741. float3 defaultVertexValue = v.vertex.xyz;
  742. #else
  743. float3 defaultVertexValue = float3(0, 0, 0);
  744. #endif
  745. float3 vertexValue = defaultVertexValue;
  746. #ifdef ASE_ABSOLUTE_VERTEX_POS
  747. v.vertex.xyz = vertexValue;
  748. #else
  749. v.vertex.xyz += vertexValue;
  750. #endif
  751. v.ase_normal = v.ase_normal;
  752. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  753. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  754. o.worldPos = positionWS;
  755. #endif
  756. float3 normalWS = TransformObjectToWorldDir(v.ase_normal);
  757. #if _CASTING_PUNCTUAL_LIGHT_SHADOW
  758. float3 lightDirectionWS = normalize(_LightPosition - positionWS);
  759. #else
  760. float3 lightDirectionWS = _LightDirection;
  761. #endif
  762. float4 clipPos = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, lightDirectionWS));
  763. #if UNITY_REVERSED_Z
  764. clipPos.z = min(clipPos.z, UNITY_NEAR_CLIP_VALUE);
  765. #else
  766. clipPos.z = max(clipPos.z, UNITY_NEAR_CLIP_VALUE);
  767. #endif
  768. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  769. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  770. vertexInput.positionWS = positionWS;
  771. vertexInput.positionCS = clipPos;
  772. o.shadowCoord = GetShadowCoord( vertexInput );
  773. #endif
  774. o.clipPos = clipPos;
  775. return o;
  776. }
  777. #if defined(ASE_TESSELLATION)
  778. struct VertexControl
  779. {
  780. float4 vertex : INTERNALTESSPOS;
  781. float3 ase_normal : NORMAL;
  782. float4 ase_texcoord2 : TEXCOORD2;
  783. float4 ase_texcoord : TEXCOORD0;
  784. UNITY_VERTEX_INPUT_INSTANCE_ID
  785. };
  786. struct TessellationFactors
  787. {
  788. float edge[3] : SV_TessFactor;
  789. float inside : SV_InsideTessFactor;
  790. };
  791. VertexControl vert ( VertexInput v )
  792. {
  793. VertexControl o;
  794. UNITY_SETUP_INSTANCE_ID(v);
  795. UNITY_TRANSFER_INSTANCE_ID(v, o);
  796. o.vertex = v.vertex;
  797. o.ase_normal = v.ase_normal;
  798. o.ase_texcoord2 = v.ase_texcoord2;
  799. o.ase_texcoord = v.ase_texcoord;
  800. return o;
  801. }
  802. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  803. {
  804. TessellationFactors o;
  805. float4 tf = 1;
  806. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  807. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  808. #if defined(ASE_FIXED_TESSELLATION)
  809. tf = FixedTess( tessValue );
  810. #elif defined(ASE_DISTANCE_TESSELLATION)
  811. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  812. #elif defined(ASE_LENGTH_TESSELLATION)
  813. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  814. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  815. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  816. #endif
  817. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  818. return o;
  819. }
  820. [domain("tri")]
  821. [partitioning("fractional_odd")]
  822. [outputtopology("triangle_cw")]
  823. [patchconstantfunc("TessellationFunction")]
  824. [outputcontrolpoints(3)]
  825. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  826. {
  827. return patch[id];
  828. }
  829. [domain("tri")]
  830. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  831. {
  832. VertexInput o = (VertexInput) 0;
  833. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  834. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  835. o.ase_texcoord2 = patch[0].ase_texcoord2 * bary.x + patch[1].ase_texcoord2 * bary.y + patch[2].ase_texcoord2 * bary.z;
  836. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  837. #if defined(ASE_PHONG_TESSELLATION)
  838. float3 pp[3];
  839. for (int i = 0; i < 3; ++i)
  840. 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));
  841. float phongStrength = _TessPhongStrength;
  842. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  843. #endif
  844. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  845. return VertexFunction(o);
  846. }
  847. #else
  848. VertexOutput vert ( VertexInput v )
  849. {
  850. return VertexFunction( v );
  851. }
  852. #endif
  853. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
  854. #define ASE_SV_DEPTH SV_DepthLessEqual
  855. #else
  856. #define ASE_SV_DEPTH SV_Depth
  857. #endif
  858. half4 frag( VertexOutput IN
  859. #ifdef ASE_DEPTH_WRITE_ON
  860. ,out float outputDepth : ASE_SV_DEPTH
  861. #endif
  862. ) : SV_TARGET
  863. {
  864. UNITY_SETUP_INSTANCE_ID( IN );
  865. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  866. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  867. float3 WorldPosition = IN.worldPos;
  868. #endif
  869. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  870. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  871. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  872. ShadowCoords = IN.shadowCoord;
  873. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  874. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  875. #endif
  876. #endif
  877. float2 texCoord21 = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  878. float temp_output_23_0 = ( texCoord21.y + _zhouxiang );
  879. float temp_output_29_0 = ( 1.0 - step( temp_output_23_0 , 0.49 ) );
  880. float2 uv_Dissolve = IN.ase_texcoord2.zw * _Dissolve_ST.xy + _Dissolve_ST.zw;
  881. float4 tex2DNode46 = tex2D( _Dissolve, uv_Dissolve );
  882. float temp_output_51_0 = step( _DissolveValue , ( tex2DNode46.r + 0.05 ) );
  883. float Alpha = saturate( ( saturate( temp_output_29_0 ) * temp_output_51_0 ) );
  884. float AlphaClipThreshold = 0.5;
  885. float AlphaClipThresholdShadow = 0.5;
  886. #ifdef ASE_DEPTH_WRITE_ON
  887. float DepthValue = 0;
  888. #endif
  889. #ifdef _ALPHATEST_ON
  890. #ifdef _ALPHATEST_SHADOW_ON
  891. clip(Alpha - AlphaClipThresholdShadow);
  892. #else
  893. clip(Alpha - AlphaClipThreshold);
  894. #endif
  895. #endif
  896. #ifdef LOD_FADE_CROSSFADE
  897. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  898. #endif
  899. #ifdef ASE_DEPTH_WRITE_ON
  900. outputDepth = DepthValue;
  901. #endif
  902. return 0;
  903. }
  904. ENDHLSL
  905. }
  906. Pass
  907. {
  908. Name "DepthOnly"
  909. Tags { "LightMode"="DepthOnly" }
  910. ZWrite On
  911. ColorMask 0
  912. AlphaToMask Off
  913. HLSLPROGRAM
  914. #define _NORMAL_DROPOFF_TS 1
  915. #pragma multi_compile_instancing
  916. #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE
  917. #define ASE_FOG 1
  918. #define _SURFACE_TYPE_TRANSPARENT 1
  919. #define ASE_SRP_VERSION 120108
  920. #pragma vertex vert
  921. #pragma fragment frag
  922. #define SHADERPASS SHADERPASS_DEPTHONLY
  923. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  924. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  925. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  926. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  927. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  928. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  929. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  930. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  931. struct VertexInput
  932. {
  933. float4 vertex : POSITION;
  934. float3 ase_normal : NORMAL;
  935. float4 ase_texcoord2 : TEXCOORD2;
  936. float4 ase_texcoord : TEXCOORD0;
  937. UNITY_VERTEX_INPUT_INSTANCE_ID
  938. };
  939. struct VertexOutput
  940. {
  941. float4 clipPos : SV_POSITION;
  942. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  943. float3 worldPos : TEXCOORD0;
  944. #endif
  945. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  946. float4 shadowCoord : TEXCOORD1;
  947. #endif
  948. float4 ase_texcoord2 : TEXCOORD2;
  949. UNITY_VERTEX_INPUT_INSTANCE_ID
  950. UNITY_VERTEX_OUTPUT_STEREO
  951. };
  952. CBUFFER_START(UnityPerMaterial)
  953. float4 _Colorhuawen;
  954. float4 _MainTex_ST;
  955. float4 _Colorzhouxiang;
  956. float4 _Dissolve_ST;
  957. float _HuawenLighting;
  958. float _AllLighting;
  959. float _DissolveValue;
  960. float _zhouxiang;
  961. #ifdef ASE_TRANSMISSION
  962. float _TransmissionShadow;
  963. #endif
  964. #ifdef ASE_TRANSLUCENCY
  965. float _TransStrength;
  966. float _TransNormal;
  967. float _TransScattering;
  968. float _TransDirect;
  969. float _TransAmbient;
  970. float _TransShadow;
  971. #endif
  972. #ifdef ASE_TESSELLATION
  973. float _TessPhongStrength;
  974. float _TessValue;
  975. float _TessMin;
  976. float _TessMax;
  977. float _TessEdgeLength;
  978. float _TessMaxDisp;
  979. #endif
  980. CBUFFER_END
  981. // Property used by ScenePickingPass
  982. #ifdef SCENEPICKINGPASS
  983. float4 _SelectionID;
  984. #endif
  985. // Properties used by SceneSelectionPass
  986. #ifdef SCENESELECTIONPASS
  987. int _ObjectId;
  988. int _PassValue;
  989. #endif
  990. sampler2D _Dissolve;
  991. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
  992. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthOnlyPass.hlsl"
  993. //#ifdef HAVE_VFX_MODIFICATION
  994. //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
  995. //#endif
  996. VertexOutput VertexFunction( VertexInput v )
  997. {
  998. VertexOutput o = (VertexOutput)0;
  999. UNITY_SETUP_INSTANCE_ID(v);
  1000. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1001. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1002. o.ase_texcoord2.xy = v.ase_texcoord2.xy;
  1003. o.ase_texcoord2.zw = v.ase_texcoord.xy;
  1004. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1005. float3 defaultVertexValue = v.vertex.xyz;
  1006. #else
  1007. float3 defaultVertexValue = float3(0, 0, 0);
  1008. #endif
  1009. float3 vertexValue = defaultVertexValue;
  1010. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1011. v.vertex.xyz = vertexValue;
  1012. #else
  1013. v.vertex.xyz += vertexValue;
  1014. #endif
  1015. v.ase_normal = v.ase_normal;
  1016. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1017. float4 positionCS = TransformWorldToHClip( positionWS );
  1018. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1019. o.worldPos = positionWS;
  1020. #endif
  1021. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1022. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  1023. vertexInput.positionWS = positionWS;
  1024. vertexInput.positionCS = positionCS;
  1025. o.shadowCoord = GetShadowCoord( vertexInput );
  1026. #endif
  1027. o.clipPos = positionCS;
  1028. return o;
  1029. }
  1030. #if defined(ASE_TESSELLATION)
  1031. struct VertexControl
  1032. {
  1033. float4 vertex : INTERNALTESSPOS;
  1034. float3 ase_normal : NORMAL;
  1035. float4 ase_texcoord2 : TEXCOORD2;
  1036. float4 ase_texcoord : TEXCOORD0;
  1037. UNITY_VERTEX_INPUT_INSTANCE_ID
  1038. };
  1039. struct TessellationFactors
  1040. {
  1041. float edge[3] : SV_TessFactor;
  1042. float inside : SV_InsideTessFactor;
  1043. };
  1044. VertexControl vert ( VertexInput v )
  1045. {
  1046. VertexControl o;
  1047. UNITY_SETUP_INSTANCE_ID(v);
  1048. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1049. o.vertex = v.vertex;
  1050. o.ase_normal = v.ase_normal;
  1051. o.ase_texcoord2 = v.ase_texcoord2;
  1052. o.ase_texcoord = v.ase_texcoord;
  1053. return o;
  1054. }
  1055. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1056. {
  1057. TessellationFactors o;
  1058. float4 tf = 1;
  1059. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1060. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1061. #if defined(ASE_FIXED_TESSELLATION)
  1062. tf = FixedTess( tessValue );
  1063. #elif defined(ASE_DISTANCE_TESSELLATION)
  1064. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1065. #elif defined(ASE_LENGTH_TESSELLATION)
  1066. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1067. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1068. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1069. #endif
  1070. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1071. return o;
  1072. }
  1073. [domain("tri")]
  1074. [partitioning("fractional_odd")]
  1075. [outputtopology("triangle_cw")]
  1076. [patchconstantfunc("TessellationFunction")]
  1077. [outputcontrolpoints(3)]
  1078. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1079. {
  1080. return patch[id];
  1081. }
  1082. [domain("tri")]
  1083. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1084. {
  1085. VertexInput o = (VertexInput) 0;
  1086. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1087. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1088. o.ase_texcoord2 = patch[0].ase_texcoord2 * bary.x + patch[1].ase_texcoord2 * bary.y + patch[2].ase_texcoord2 * bary.z;
  1089. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1090. #if defined(ASE_PHONG_TESSELLATION)
  1091. float3 pp[3];
  1092. for (int i = 0; i < 3; ++i)
  1093. 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));
  1094. float phongStrength = _TessPhongStrength;
  1095. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1096. #endif
  1097. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1098. return VertexFunction(o);
  1099. }
  1100. #else
  1101. VertexOutput vert ( VertexInput v )
  1102. {
  1103. return VertexFunction( v );
  1104. }
  1105. #endif
  1106. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
  1107. #define ASE_SV_DEPTH SV_DepthLessEqual
  1108. #else
  1109. #define ASE_SV_DEPTH SV_Depth
  1110. #endif
  1111. half4 frag( VertexOutput IN
  1112. #ifdef ASE_DEPTH_WRITE_ON
  1113. ,out float outputDepth : ASE_SV_DEPTH
  1114. #endif
  1115. ) : SV_TARGET
  1116. {
  1117. UNITY_SETUP_INSTANCE_ID(IN);
  1118. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  1119. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1120. float3 WorldPosition = IN.worldPos;
  1121. #endif
  1122. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  1123. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1124. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  1125. ShadowCoords = IN.shadowCoord;
  1126. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  1127. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  1128. #endif
  1129. #endif
  1130. float2 texCoord21 = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1131. float temp_output_23_0 = ( texCoord21.y + _zhouxiang );
  1132. float temp_output_29_0 = ( 1.0 - step( temp_output_23_0 , 0.49 ) );
  1133. float2 uv_Dissolve = IN.ase_texcoord2.zw * _Dissolve_ST.xy + _Dissolve_ST.zw;
  1134. float4 tex2DNode46 = tex2D( _Dissolve, uv_Dissolve );
  1135. float temp_output_51_0 = step( _DissolveValue , ( tex2DNode46.r + 0.05 ) );
  1136. float Alpha = saturate( ( saturate( temp_output_29_0 ) * temp_output_51_0 ) );
  1137. float AlphaClipThreshold = 0.5;
  1138. #ifdef ASE_DEPTH_WRITE_ON
  1139. float DepthValue = 0;
  1140. #endif
  1141. #ifdef _ALPHATEST_ON
  1142. clip(Alpha - AlphaClipThreshold);
  1143. #endif
  1144. #ifdef LOD_FADE_CROSSFADE
  1145. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1146. #endif
  1147. #ifdef ASE_DEPTH_WRITE_ON
  1148. outputDepth = DepthValue;
  1149. #endif
  1150. return 0;
  1151. }
  1152. ENDHLSL
  1153. }
  1154. Pass
  1155. {
  1156. Name "Meta"
  1157. Tags { "LightMode"="Meta" }
  1158. Cull Off
  1159. HLSLPROGRAM
  1160. #define _NORMAL_DROPOFF_TS 1
  1161. #define ASE_FOG 1
  1162. #define _SURFACE_TYPE_TRANSPARENT 1
  1163. #define ASE_SRP_VERSION 120108
  1164. #pragma vertex vert
  1165. #pragma fragment frag
  1166. #pragma shader_feature EDITOR_VISUALIZATION
  1167. #define SHADERPASS SHADERPASS_META
  1168. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1169. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1170. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1171. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1172. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  1173. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1174. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1175. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
  1176. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1177. struct VertexInput
  1178. {
  1179. float4 vertex : POSITION;
  1180. float3 ase_normal : NORMAL;
  1181. float4 texcoord0 : TEXCOORD0;
  1182. float4 texcoord1 : TEXCOORD1;
  1183. float4 texcoord2 : TEXCOORD2;
  1184. UNITY_VERTEX_INPUT_INSTANCE_ID
  1185. };
  1186. struct VertexOutput
  1187. {
  1188. float4 clipPos : SV_POSITION;
  1189. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1190. float3 worldPos : TEXCOORD0;
  1191. #endif
  1192. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1193. float4 shadowCoord : TEXCOORD1;
  1194. #endif
  1195. #ifdef EDITOR_VISUALIZATION
  1196. float4 VizUV : TEXCOORD2;
  1197. float4 LightCoord : TEXCOORD3;
  1198. #endif
  1199. float4 ase_texcoord4 : TEXCOORD4;
  1200. UNITY_VERTEX_INPUT_INSTANCE_ID
  1201. UNITY_VERTEX_OUTPUT_STEREO
  1202. };
  1203. CBUFFER_START(UnityPerMaterial)
  1204. float4 _Colorhuawen;
  1205. float4 _MainTex_ST;
  1206. float4 _Colorzhouxiang;
  1207. float4 _Dissolve_ST;
  1208. float _HuawenLighting;
  1209. float _AllLighting;
  1210. float _DissolveValue;
  1211. float _zhouxiang;
  1212. #ifdef ASE_TRANSMISSION
  1213. float _TransmissionShadow;
  1214. #endif
  1215. #ifdef ASE_TRANSLUCENCY
  1216. float _TransStrength;
  1217. float _TransNormal;
  1218. float _TransScattering;
  1219. float _TransDirect;
  1220. float _TransAmbient;
  1221. float _TransShadow;
  1222. #endif
  1223. #ifdef ASE_TESSELLATION
  1224. float _TessPhongStrength;
  1225. float _TessValue;
  1226. float _TessMin;
  1227. float _TessMax;
  1228. float _TessEdgeLength;
  1229. float _TessMaxDisp;
  1230. #endif
  1231. CBUFFER_END
  1232. // Property used by ScenePickingPass
  1233. #ifdef SCENEPICKINGPASS
  1234. float4 _SelectionID;
  1235. #endif
  1236. // Properties used by SceneSelectionPass
  1237. #ifdef SCENESELECTIONPASS
  1238. int _ObjectId;
  1239. int _PassValue;
  1240. #endif
  1241. sampler2D _huawen;
  1242. sampler2D _MainTex;
  1243. sampler2D _Dissolve;
  1244. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
  1245. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/LightingMetaPass.hlsl"
  1246. //#ifdef HAVE_VFX_MODIFICATION
  1247. //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
  1248. //#endif
  1249. VertexOutput VertexFunction( VertexInput v )
  1250. {
  1251. VertexOutput o = (VertexOutput)0;
  1252. UNITY_SETUP_INSTANCE_ID(v);
  1253. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1254. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1255. o.ase_texcoord4.xy = v.texcoord2.xy;
  1256. o.ase_texcoord4.zw = v.texcoord0.xy;
  1257. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1258. float3 defaultVertexValue = v.vertex.xyz;
  1259. #else
  1260. float3 defaultVertexValue = float3(0, 0, 0);
  1261. #endif
  1262. float3 vertexValue = defaultVertexValue;
  1263. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1264. v.vertex.xyz = vertexValue;
  1265. #else
  1266. v.vertex.xyz += vertexValue;
  1267. #endif
  1268. v.ase_normal = v.ase_normal;
  1269. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1270. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1271. o.worldPos = positionWS;
  1272. #endif
  1273. o.clipPos = MetaVertexPosition( v.vertex, v.texcoord1.xy, v.texcoord1.xy, unity_LightmapST, unity_DynamicLightmapST );
  1274. #ifdef EDITOR_VISUALIZATION
  1275. float2 VizUV = 0;
  1276. float4 LightCoord = 0;
  1277. UnityEditorVizData(v.vertex.xyz, v.texcoord0.xy, v.texcoord1.xy, v.texcoord2.xy, VizUV, LightCoord);
  1278. o.VizUV = float4(VizUV, 0, 0);
  1279. o.LightCoord = LightCoord;
  1280. #endif
  1281. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1282. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  1283. vertexInput.positionWS = positionWS;
  1284. vertexInput.positionCS = o.clipPos;
  1285. o.shadowCoord = GetShadowCoord( vertexInput );
  1286. #endif
  1287. return o;
  1288. }
  1289. #if defined(ASE_TESSELLATION)
  1290. struct VertexControl
  1291. {
  1292. float4 vertex : INTERNALTESSPOS;
  1293. float3 ase_normal : NORMAL;
  1294. float4 texcoord0 : TEXCOORD0;
  1295. float4 texcoord1 : TEXCOORD1;
  1296. float4 texcoord2 : TEXCOORD2;
  1297. UNITY_VERTEX_INPUT_INSTANCE_ID
  1298. };
  1299. struct TessellationFactors
  1300. {
  1301. float edge[3] : SV_TessFactor;
  1302. float inside : SV_InsideTessFactor;
  1303. };
  1304. VertexControl vert ( VertexInput v )
  1305. {
  1306. VertexControl o;
  1307. UNITY_SETUP_INSTANCE_ID(v);
  1308. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1309. o.vertex = v.vertex;
  1310. o.ase_normal = v.ase_normal;
  1311. o.texcoord0 = v.texcoord0;
  1312. o.texcoord1 = v.texcoord1;
  1313. o.texcoord2 = v.texcoord2;
  1314. return o;
  1315. }
  1316. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1317. {
  1318. TessellationFactors o;
  1319. float4 tf = 1;
  1320. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1321. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1322. #if defined(ASE_FIXED_TESSELLATION)
  1323. tf = FixedTess( tessValue );
  1324. #elif defined(ASE_DISTANCE_TESSELLATION)
  1325. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1326. #elif defined(ASE_LENGTH_TESSELLATION)
  1327. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1328. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1329. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1330. #endif
  1331. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1332. return o;
  1333. }
  1334. [domain("tri")]
  1335. [partitioning("fractional_odd")]
  1336. [outputtopology("triangle_cw")]
  1337. [patchconstantfunc("TessellationFunction")]
  1338. [outputcontrolpoints(3)]
  1339. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1340. {
  1341. return patch[id];
  1342. }
  1343. [domain("tri")]
  1344. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1345. {
  1346. VertexInput o = (VertexInput) 0;
  1347. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1348. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1349. o.texcoord0 = patch[0].texcoord0 * bary.x + patch[1].texcoord0 * bary.y + patch[2].texcoord0 * bary.z;
  1350. o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
  1351. o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z;
  1352. #if defined(ASE_PHONG_TESSELLATION)
  1353. float3 pp[3];
  1354. for (int i = 0; i < 3; ++i)
  1355. 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));
  1356. float phongStrength = _TessPhongStrength;
  1357. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1358. #endif
  1359. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1360. return VertexFunction(o);
  1361. }
  1362. #else
  1363. VertexOutput vert ( VertexInput v )
  1364. {
  1365. return VertexFunction( v );
  1366. }
  1367. #endif
  1368. half4 frag(VertexOutput IN ) : SV_TARGET
  1369. {
  1370. UNITY_SETUP_INSTANCE_ID(IN);
  1371. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  1372. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1373. float3 WorldPosition = IN.worldPos;
  1374. #endif
  1375. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  1376. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1377. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  1378. ShadowCoords = IN.shadowCoord;
  1379. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  1380. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  1381. #endif
  1382. #endif
  1383. float2 texCoord37 = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  1384. float2 uv_MainTex = IN.ase_texcoord4.zw * _MainTex_ST.xy + _MainTex_ST.zw;
  1385. float2 uv_Dissolve = IN.ase_texcoord4.zw * _Dissolve_ST.xy + _Dissolve_ST.zw;
  1386. float4 tex2DNode46 = tex2D( _Dissolve, uv_Dissolve );
  1387. float temp_output_51_0 = step( _DissolveValue , ( tex2DNode46.r + 0.05 ) );
  1388. float2 texCoord21 = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  1389. float temp_output_23_0 = ( texCoord21.y + _zhouxiang );
  1390. float temp_output_29_0 = ( 1.0 - step( temp_output_23_0 , 0.49 ) );
  1391. float3 BaseColor = ( ( ( tex2D( _huawen, texCoord37 ).r * _Colorhuawen * _HuawenLighting ) + ( _Colorhuawen * _AllLighting ) ) + tex2D( _MainTex, uv_MainTex ) + ( _Colorzhouxiang * ( temp_output_51_0 - step( _DissolveValue , tex2DNode46.r ) ) ) + ( ( temp_output_29_0 - ( 1.0 - step( temp_output_23_0 , 0.5 ) ) ) * _Colorzhouxiang ) ).rgb;
  1392. float3 Emission = 0;
  1393. float Alpha = saturate( ( saturate( temp_output_29_0 ) * temp_output_51_0 ) );
  1394. float AlphaClipThreshold = 0.5;
  1395. #ifdef _ALPHATEST_ON
  1396. clip(Alpha - AlphaClipThreshold);
  1397. #endif
  1398. MetaInput metaInput = (MetaInput)0;
  1399. metaInput.Albedo = BaseColor;
  1400. metaInput.Emission = Emission;
  1401. #ifdef EDITOR_VISUALIZATION
  1402. metaInput.VizUV = IN.VizUV.xy;
  1403. metaInput.LightCoord = IN.LightCoord;
  1404. #endif
  1405. return UnityMetaFragment(metaInput);
  1406. }
  1407. ENDHLSL
  1408. }
  1409. Pass
  1410. {
  1411. Name "Universal2D"
  1412. Tags { "LightMode"="Universal2D" }
  1413. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  1414. ZWrite On
  1415. ZTest LEqual
  1416. Offset 0 , 0
  1417. ColorMask RGBA
  1418. HLSLPROGRAM
  1419. #define _NORMAL_DROPOFF_TS 1
  1420. #define ASE_FOG 1
  1421. #define _SURFACE_TYPE_TRANSPARENT 1
  1422. #define ASE_SRP_VERSION 120108
  1423. #pragma vertex vert
  1424. #pragma fragment frag
  1425. #define SHADERPASS SHADERPASS_2D
  1426. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1427. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1428. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1429. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1430. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  1431. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1432. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1433. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1434. struct VertexInput
  1435. {
  1436. float4 vertex : POSITION;
  1437. float3 ase_normal : NORMAL;
  1438. float4 ase_texcoord2 : TEXCOORD2;
  1439. float4 ase_texcoord : TEXCOORD0;
  1440. UNITY_VERTEX_INPUT_INSTANCE_ID
  1441. };
  1442. struct VertexOutput
  1443. {
  1444. float4 clipPos : SV_POSITION;
  1445. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1446. float3 worldPos : TEXCOORD0;
  1447. #endif
  1448. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1449. float4 shadowCoord : TEXCOORD1;
  1450. #endif
  1451. float4 ase_texcoord2 : TEXCOORD2;
  1452. UNITY_VERTEX_INPUT_INSTANCE_ID
  1453. UNITY_VERTEX_OUTPUT_STEREO
  1454. };
  1455. CBUFFER_START(UnityPerMaterial)
  1456. float4 _Colorhuawen;
  1457. float4 _MainTex_ST;
  1458. float4 _Colorzhouxiang;
  1459. float4 _Dissolve_ST;
  1460. float _HuawenLighting;
  1461. float _AllLighting;
  1462. float _DissolveValue;
  1463. float _zhouxiang;
  1464. #ifdef ASE_TRANSMISSION
  1465. float _TransmissionShadow;
  1466. #endif
  1467. #ifdef ASE_TRANSLUCENCY
  1468. float _TransStrength;
  1469. float _TransNormal;
  1470. float _TransScattering;
  1471. float _TransDirect;
  1472. float _TransAmbient;
  1473. float _TransShadow;
  1474. #endif
  1475. #ifdef ASE_TESSELLATION
  1476. float _TessPhongStrength;
  1477. float _TessValue;
  1478. float _TessMin;
  1479. float _TessMax;
  1480. float _TessEdgeLength;
  1481. float _TessMaxDisp;
  1482. #endif
  1483. CBUFFER_END
  1484. // Property used by ScenePickingPass
  1485. #ifdef SCENEPICKINGPASS
  1486. float4 _SelectionID;
  1487. #endif
  1488. // Properties used by SceneSelectionPass
  1489. #ifdef SCENESELECTIONPASS
  1490. int _ObjectId;
  1491. int _PassValue;
  1492. #endif
  1493. sampler2D _huawen;
  1494. sampler2D _MainTex;
  1495. sampler2D _Dissolve;
  1496. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
  1497. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBR2DPass.hlsl"
  1498. //#ifdef HAVE_VFX_MODIFICATION
  1499. //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
  1500. //#endif
  1501. VertexOutput VertexFunction( VertexInput v )
  1502. {
  1503. VertexOutput o = (VertexOutput)0;
  1504. UNITY_SETUP_INSTANCE_ID( v );
  1505. UNITY_TRANSFER_INSTANCE_ID( v, o );
  1506. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
  1507. o.ase_texcoord2.xy = v.ase_texcoord2.xy;
  1508. o.ase_texcoord2.zw = v.ase_texcoord.xy;
  1509. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1510. float3 defaultVertexValue = v.vertex.xyz;
  1511. #else
  1512. float3 defaultVertexValue = float3(0, 0, 0);
  1513. #endif
  1514. float3 vertexValue = defaultVertexValue;
  1515. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1516. v.vertex.xyz = vertexValue;
  1517. #else
  1518. v.vertex.xyz += vertexValue;
  1519. #endif
  1520. v.ase_normal = v.ase_normal;
  1521. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1522. float4 positionCS = TransformWorldToHClip( positionWS );
  1523. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1524. o.worldPos = positionWS;
  1525. #endif
  1526. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1527. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  1528. vertexInput.positionWS = positionWS;
  1529. vertexInput.positionCS = positionCS;
  1530. o.shadowCoord = GetShadowCoord( vertexInput );
  1531. #endif
  1532. o.clipPos = positionCS;
  1533. return o;
  1534. }
  1535. #if defined(ASE_TESSELLATION)
  1536. struct VertexControl
  1537. {
  1538. float4 vertex : INTERNALTESSPOS;
  1539. float3 ase_normal : NORMAL;
  1540. float4 ase_texcoord2 : TEXCOORD2;
  1541. float4 ase_texcoord : TEXCOORD0;
  1542. UNITY_VERTEX_INPUT_INSTANCE_ID
  1543. };
  1544. struct TessellationFactors
  1545. {
  1546. float edge[3] : SV_TessFactor;
  1547. float inside : SV_InsideTessFactor;
  1548. };
  1549. VertexControl vert ( VertexInput v )
  1550. {
  1551. VertexControl o;
  1552. UNITY_SETUP_INSTANCE_ID(v);
  1553. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1554. o.vertex = v.vertex;
  1555. o.ase_normal = v.ase_normal;
  1556. o.ase_texcoord2 = v.ase_texcoord2;
  1557. o.ase_texcoord = v.ase_texcoord;
  1558. return o;
  1559. }
  1560. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1561. {
  1562. TessellationFactors o;
  1563. float4 tf = 1;
  1564. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1565. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1566. #if defined(ASE_FIXED_TESSELLATION)
  1567. tf = FixedTess( tessValue );
  1568. #elif defined(ASE_DISTANCE_TESSELLATION)
  1569. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1570. #elif defined(ASE_LENGTH_TESSELLATION)
  1571. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1572. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1573. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1574. #endif
  1575. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1576. return o;
  1577. }
  1578. [domain("tri")]
  1579. [partitioning("fractional_odd")]
  1580. [outputtopology("triangle_cw")]
  1581. [patchconstantfunc("TessellationFunction")]
  1582. [outputcontrolpoints(3)]
  1583. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1584. {
  1585. return patch[id];
  1586. }
  1587. [domain("tri")]
  1588. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1589. {
  1590. VertexInput o = (VertexInput) 0;
  1591. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1592. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1593. o.ase_texcoord2 = patch[0].ase_texcoord2 * bary.x + patch[1].ase_texcoord2 * bary.y + patch[2].ase_texcoord2 * bary.z;
  1594. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1595. #if defined(ASE_PHONG_TESSELLATION)
  1596. float3 pp[3];
  1597. for (int i = 0; i < 3; ++i)
  1598. 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));
  1599. float phongStrength = _TessPhongStrength;
  1600. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1601. #endif
  1602. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1603. return VertexFunction(o);
  1604. }
  1605. #else
  1606. VertexOutput vert ( VertexInput v )
  1607. {
  1608. return VertexFunction( v );
  1609. }
  1610. #endif
  1611. half4 frag(VertexOutput IN ) : SV_TARGET
  1612. {
  1613. UNITY_SETUP_INSTANCE_ID( IN );
  1614. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  1615. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1616. float3 WorldPosition = IN.worldPos;
  1617. #endif
  1618. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  1619. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1620. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  1621. ShadowCoords = IN.shadowCoord;
  1622. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  1623. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  1624. #endif
  1625. #endif
  1626. float2 texCoord37 = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1627. float2 uv_MainTex = IN.ase_texcoord2.zw * _MainTex_ST.xy + _MainTex_ST.zw;
  1628. float2 uv_Dissolve = IN.ase_texcoord2.zw * _Dissolve_ST.xy + _Dissolve_ST.zw;
  1629. float4 tex2DNode46 = tex2D( _Dissolve, uv_Dissolve );
  1630. float temp_output_51_0 = step( _DissolveValue , ( tex2DNode46.r + 0.05 ) );
  1631. float2 texCoord21 = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1632. float temp_output_23_0 = ( texCoord21.y + _zhouxiang );
  1633. float temp_output_29_0 = ( 1.0 - step( temp_output_23_0 , 0.49 ) );
  1634. float3 BaseColor = ( ( ( tex2D( _huawen, texCoord37 ).r * _Colorhuawen * _HuawenLighting ) + ( _Colorhuawen * _AllLighting ) ) + tex2D( _MainTex, uv_MainTex ) + ( _Colorzhouxiang * ( temp_output_51_0 - step( _DissolveValue , tex2DNode46.r ) ) ) + ( ( temp_output_29_0 - ( 1.0 - step( temp_output_23_0 , 0.5 ) ) ) * _Colorzhouxiang ) ).rgb;
  1635. float Alpha = saturate( ( saturate( temp_output_29_0 ) * temp_output_51_0 ) );
  1636. float AlphaClipThreshold = 0.5;
  1637. half4 color = half4(BaseColor, Alpha );
  1638. #ifdef _ALPHATEST_ON
  1639. clip(Alpha - AlphaClipThreshold);
  1640. #endif
  1641. return color;
  1642. }
  1643. ENDHLSL
  1644. }
  1645. Pass
  1646. {
  1647. Name "DepthNormals"
  1648. Tags { "LightMode"="DepthNormals" }
  1649. ZWrite On
  1650. Blend One Zero
  1651. ZTest LEqual
  1652. ZWrite On
  1653. HLSLPROGRAM
  1654. #define _NORMAL_DROPOFF_TS 1
  1655. #pragma multi_compile_instancing
  1656. #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE
  1657. #define ASE_FOG 1
  1658. #define _SURFACE_TYPE_TRANSPARENT 1
  1659. #define ASE_SRP_VERSION 120108
  1660. #pragma vertex vert
  1661. #pragma fragment frag
  1662. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1663. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1664. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1665. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1666. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1667. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  1668. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1669. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1670. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1671. struct VertexInput
  1672. {
  1673. float4 vertex : POSITION;
  1674. float3 ase_normal : NORMAL;
  1675. float4 ase_tangent : TANGENT;
  1676. float4 ase_texcoord2 : TEXCOORD2;
  1677. float4 ase_texcoord : TEXCOORD0;
  1678. UNITY_VERTEX_INPUT_INSTANCE_ID
  1679. };
  1680. struct VertexOutput
  1681. {
  1682. float4 clipPos : SV_POSITION;
  1683. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1684. float3 worldPos : TEXCOORD0;
  1685. #endif
  1686. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1687. float4 shadowCoord : TEXCOORD1;
  1688. #endif
  1689. float3 worldNormal : TEXCOORD2;
  1690. float4 worldTangent : TEXCOORD3;
  1691. float4 ase_texcoord4 : TEXCOORD4;
  1692. UNITY_VERTEX_INPUT_INSTANCE_ID
  1693. UNITY_VERTEX_OUTPUT_STEREO
  1694. };
  1695. CBUFFER_START(UnityPerMaterial)
  1696. float4 _Colorhuawen;
  1697. float4 _MainTex_ST;
  1698. float4 _Colorzhouxiang;
  1699. float4 _Dissolve_ST;
  1700. float _HuawenLighting;
  1701. float _AllLighting;
  1702. float _DissolveValue;
  1703. float _zhouxiang;
  1704. #ifdef ASE_TRANSMISSION
  1705. float _TransmissionShadow;
  1706. #endif
  1707. #ifdef ASE_TRANSLUCENCY
  1708. float _TransStrength;
  1709. float _TransNormal;
  1710. float _TransScattering;
  1711. float _TransDirect;
  1712. float _TransAmbient;
  1713. float _TransShadow;
  1714. #endif
  1715. #ifdef ASE_TESSELLATION
  1716. float _TessPhongStrength;
  1717. float _TessValue;
  1718. float _TessMin;
  1719. float _TessMax;
  1720. float _TessEdgeLength;
  1721. float _TessMaxDisp;
  1722. #endif
  1723. CBUFFER_END
  1724. // Property used by ScenePickingPass
  1725. #ifdef SCENEPICKINGPASS
  1726. float4 _SelectionID;
  1727. #endif
  1728. // Properties used by SceneSelectionPass
  1729. #ifdef SCENESELECTIONPASS
  1730. int _ObjectId;
  1731. int _PassValue;
  1732. #endif
  1733. sampler2D _Dissolve;
  1734. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
  1735. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthNormalsOnlyPass.hlsl"
  1736. //#ifdef HAVE_VFX_MODIFICATION
  1737. //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
  1738. //#endif
  1739. VertexOutput VertexFunction( VertexInput v )
  1740. {
  1741. VertexOutput o = (VertexOutput)0;
  1742. UNITY_SETUP_INSTANCE_ID(v);
  1743. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1744. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1745. o.ase_texcoord4.xy = v.ase_texcoord2.xy;
  1746. o.ase_texcoord4.zw = v.ase_texcoord.xy;
  1747. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1748. float3 defaultVertexValue = v.vertex.xyz;
  1749. #else
  1750. float3 defaultVertexValue = float3(0, 0, 0);
  1751. #endif
  1752. float3 vertexValue = defaultVertexValue;
  1753. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1754. v.vertex.xyz = vertexValue;
  1755. #else
  1756. v.vertex.xyz += vertexValue;
  1757. #endif
  1758. v.ase_normal = v.ase_normal;
  1759. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1760. float3 normalWS = TransformObjectToWorldNormal( v.ase_normal );
  1761. float4 tangentWS = float4(TransformObjectToWorldDir( v.ase_tangent.xyz), v.ase_tangent.w);
  1762. float4 positionCS = TransformWorldToHClip( positionWS );
  1763. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1764. o.worldPos = positionWS;
  1765. #endif
  1766. o.worldNormal = normalWS;
  1767. o.worldTangent = tangentWS;
  1768. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1769. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  1770. vertexInput.positionWS = positionWS;
  1771. vertexInput.positionCS = positionCS;
  1772. o.shadowCoord = GetShadowCoord( vertexInput );
  1773. #endif
  1774. o.clipPos = positionCS;
  1775. return o;
  1776. }
  1777. #if defined(ASE_TESSELLATION)
  1778. struct VertexControl
  1779. {
  1780. float4 vertex : INTERNALTESSPOS;
  1781. float3 ase_normal : NORMAL;
  1782. float4 ase_tangent : TANGENT;
  1783. float4 ase_texcoord2 : TEXCOORD2;
  1784. float4 ase_texcoord : TEXCOORD0;
  1785. UNITY_VERTEX_INPUT_INSTANCE_ID
  1786. };
  1787. struct TessellationFactors
  1788. {
  1789. float edge[3] : SV_TessFactor;
  1790. float inside : SV_InsideTessFactor;
  1791. };
  1792. VertexControl vert ( VertexInput v )
  1793. {
  1794. VertexControl o;
  1795. UNITY_SETUP_INSTANCE_ID(v);
  1796. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1797. o.vertex = v.vertex;
  1798. o.ase_normal = v.ase_normal;
  1799. o.ase_tangent = v.ase_tangent;
  1800. o.ase_texcoord2 = v.ase_texcoord2;
  1801. o.ase_texcoord = v.ase_texcoord;
  1802. return o;
  1803. }
  1804. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1805. {
  1806. TessellationFactors o;
  1807. float4 tf = 1;
  1808. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1809. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1810. #if defined(ASE_FIXED_TESSELLATION)
  1811. tf = FixedTess( tessValue );
  1812. #elif defined(ASE_DISTANCE_TESSELLATION)
  1813. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1814. #elif defined(ASE_LENGTH_TESSELLATION)
  1815. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1816. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1817. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1818. #endif
  1819. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1820. return o;
  1821. }
  1822. [domain("tri")]
  1823. [partitioning("fractional_odd")]
  1824. [outputtopology("triangle_cw")]
  1825. [patchconstantfunc("TessellationFunction")]
  1826. [outputcontrolpoints(3)]
  1827. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1828. {
  1829. return patch[id];
  1830. }
  1831. [domain("tri")]
  1832. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1833. {
  1834. VertexInput o = (VertexInput) 0;
  1835. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1836. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1837. o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z;
  1838. o.ase_texcoord2 = patch[0].ase_texcoord2 * bary.x + patch[1].ase_texcoord2 * bary.y + patch[2].ase_texcoord2 * bary.z;
  1839. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1840. #if defined(ASE_PHONG_TESSELLATION)
  1841. float3 pp[3];
  1842. for (int i = 0; i < 3; ++i)
  1843. 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));
  1844. float phongStrength = _TessPhongStrength;
  1845. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1846. #endif
  1847. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1848. return VertexFunction(o);
  1849. }
  1850. #else
  1851. VertexOutput vert ( VertexInput v )
  1852. {
  1853. return VertexFunction( v );
  1854. }
  1855. #endif
  1856. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
  1857. #define ASE_SV_DEPTH SV_DepthLessEqual
  1858. #else
  1859. #define ASE_SV_DEPTH SV_Depth
  1860. #endif
  1861. half4 frag( VertexOutput IN
  1862. #ifdef ASE_DEPTH_WRITE_ON
  1863. ,out float outputDepth : ASE_SV_DEPTH
  1864. #endif
  1865. ) : SV_TARGET
  1866. {
  1867. UNITY_SETUP_INSTANCE_ID(IN);
  1868. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  1869. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1870. float3 WorldPosition = IN.worldPos;
  1871. #endif
  1872. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  1873. float3 WorldNormal = IN.worldNormal;
  1874. float4 WorldTangent = IN.worldTangent;
  1875. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1876. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  1877. ShadowCoords = IN.shadowCoord;
  1878. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  1879. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  1880. #endif
  1881. #endif
  1882. float2 texCoord21 = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  1883. float temp_output_23_0 = ( texCoord21.y + _zhouxiang );
  1884. float temp_output_29_0 = ( 1.0 - step( temp_output_23_0 , 0.49 ) );
  1885. float2 uv_Dissolve = IN.ase_texcoord4.zw * _Dissolve_ST.xy + _Dissolve_ST.zw;
  1886. float4 tex2DNode46 = tex2D( _Dissolve, uv_Dissolve );
  1887. float temp_output_51_0 = step( _DissolveValue , ( tex2DNode46.r + 0.05 ) );
  1888. float3 Normal = float3(0, 0, 1);
  1889. float Alpha = saturate( ( saturate( temp_output_29_0 ) * temp_output_51_0 ) );
  1890. float AlphaClipThreshold = 0.5;
  1891. #ifdef ASE_DEPTH_WRITE_ON
  1892. float DepthValue = 0;
  1893. #endif
  1894. #ifdef _ALPHATEST_ON
  1895. clip(Alpha - AlphaClipThreshold);
  1896. #endif
  1897. #ifdef LOD_FADE_CROSSFADE
  1898. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1899. #endif
  1900. #ifdef ASE_DEPTH_WRITE_ON
  1901. outputDepth = DepthValue;
  1902. #endif
  1903. #if defined(_GBUFFER_NORMALS_OCT)
  1904. float2 octNormalWS = PackNormalOctQuadEncode(WorldNormal);
  1905. float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5);
  1906. half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS);
  1907. return half4(packedNormalWS, 0.0);
  1908. #else
  1909. #if defined(_NORMALMAP)
  1910. #if _NORMAL_DROPOFF_TS
  1911. float crossSign = (WorldTangent.w > 0.0 ? 1.0 : -1.0) * GetOddNegativeScale();
  1912. float3 bitangent = crossSign * cross(WorldNormal.xyz, WorldTangent.xyz);
  1913. float3 normalWS = TransformTangentToWorld(Normal, half3x3(WorldTangent.xyz, bitangent, WorldNormal.xyz));
  1914. #elif _NORMAL_DROPOFF_OS
  1915. float3 normalWS = TransformObjectToWorldNormal(Normal);
  1916. #elif _NORMAL_DROPOFF_WS
  1917. float3 normalWS = Normal;
  1918. #endif
  1919. #else
  1920. float3 normalWS = WorldNormal;
  1921. #endif
  1922. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1923. #endif
  1924. }
  1925. ENDHLSL
  1926. }
  1927. Pass
  1928. {
  1929. Name "GBuffer"
  1930. Tags { "LightMode"="UniversalGBuffer" }
  1931. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  1932. ZWrite On
  1933. ZTest LEqual
  1934. Offset 0 , 0
  1935. ColorMask RGBA
  1936. HLSLPROGRAM
  1937. #define _NORMAL_DROPOFF_TS 1
  1938. #pragma multi_compile_instancing
  1939. #pragma instancing_options renderinglayer
  1940. #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE
  1941. #pragma multi_compile_fog
  1942. #define ASE_FOG 1
  1943. #define _SURFACE_TYPE_TRANSPARENT 1
  1944. #define ASE_SRP_VERSION 120108
  1945. #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
  1946. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
  1947. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION
  1948. #pragma multi_compile_fragment _ _SHADOWS_SOFT
  1949. #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  1950. #pragma multi_compile_fragment _ _LIGHT_LAYERS
  1951. #pragma multi_compile_fragment _ _RENDER_PASS_ENABLED
  1952. #pragma shader_feature_local _RECEIVE_SHADOWS_OFF
  1953. #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF
  1954. #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF
  1955. #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
  1956. #pragma multi_compile _ SHADOWS_SHADOWMASK
  1957. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  1958. #pragma multi_compile _ LIGHTMAP_ON
  1959. #pragma multi_compile _ DYNAMICLIGHTMAP_ON
  1960. #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
  1961. #pragma vertex vert
  1962. #pragma fragment frag
  1963. #define SHADERPASS SHADERPASS_GBUFFER
  1964. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1965. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1966. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1967. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1968. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  1969. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1970. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
  1971. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1972. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  1973. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1974. #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL)
  1975. #define ENABLE_TERRAIN_PERPIXEL_NORMAL
  1976. #endif
  1977. struct VertexInput
  1978. {
  1979. float4 vertex : POSITION;
  1980. float3 ase_normal : NORMAL;
  1981. float4 ase_tangent : TANGENT;
  1982. float4 texcoord : TEXCOORD0;
  1983. float4 texcoord1 : TEXCOORD1;
  1984. float4 texcoord2 : TEXCOORD2;
  1985. UNITY_VERTEX_INPUT_INSTANCE_ID
  1986. };
  1987. struct VertexOutput
  1988. {
  1989. float4 clipPos : SV_POSITION;
  1990. float4 lightmapUVOrVertexSH : TEXCOORD0;
  1991. half4 fogFactorAndVertexLight : TEXCOORD1;
  1992. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  1993. float4 shadowCoord : TEXCOORD2;
  1994. #endif
  1995. float4 tSpace0 : TEXCOORD3;
  1996. float4 tSpace1 : TEXCOORD4;
  1997. float4 tSpace2 : TEXCOORD5;
  1998. #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
  1999. float4 screenPos : TEXCOORD6;
  2000. #endif
  2001. #if defined(DYNAMICLIGHTMAP_ON)
  2002. float2 dynamicLightmapUV : TEXCOORD7;
  2003. #endif
  2004. float4 ase_texcoord8 : TEXCOORD8;
  2005. UNITY_VERTEX_INPUT_INSTANCE_ID
  2006. UNITY_VERTEX_OUTPUT_STEREO
  2007. };
  2008. CBUFFER_START(UnityPerMaterial)
  2009. float4 _Colorhuawen;
  2010. float4 _MainTex_ST;
  2011. float4 _Colorzhouxiang;
  2012. float4 _Dissolve_ST;
  2013. float _HuawenLighting;
  2014. float _AllLighting;
  2015. float _DissolveValue;
  2016. float _zhouxiang;
  2017. #ifdef ASE_TRANSMISSION
  2018. float _TransmissionShadow;
  2019. #endif
  2020. #ifdef ASE_TRANSLUCENCY
  2021. float _TransStrength;
  2022. float _TransNormal;
  2023. float _TransScattering;
  2024. float _TransDirect;
  2025. float _TransAmbient;
  2026. float _TransShadow;
  2027. #endif
  2028. #ifdef ASE_TESSELLATION
  2029. float _TessPhongStrength;
  2030. float _TessValue;
  2031. float _TessMin;
  2032. float _TessMax;
  2033. float _TessEdgeLength;
  2034. float _TessMaxDisp;
  2035. #endif
  2036. CBUFFER_END
  2037. // Property used by ScenePickingPass
  2038. #ifdef SCENEPICKINGPASS
  2039. float4 _SelectionID;
  2040. #endif
  2041. // Properties used by SceneSelectionPass
  2042. #ifdef SCENESELECTIONPASS
  2043. int _ObjectId;
  2044. int _PassValue;
  2045. #endif
  2046. sampler2D _huawen;
  2047. sampler2D _MainTex;
  2048. sampler2D _Dissolve;
  2049. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
  2050. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityGBuffer.hlsl"
  2051. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRGBufferPass.hlsl"
  2052. VertexOutput VertexFunction( VertexInput v )
  2053. {
  2054. VertexOutput o = (VertexOutput)0;
  2055. UNITY_SETUP_INSTANCE_ID(v);
  2056. UNITY_TRANSFER_INSTANCE_ID(v, o);
  2057. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  2058. o.ase_texcoord8.xy = v.texcoord2.xy;
  2059. o.ase_texcoord8.zw = v.texcoord.xy;
  2060. #ifdef ASE_ABSOLUTE_VERTEX_POS
  2061. float3 defaultVertexValue = v.vertex.xyz;
  2062. #else
  2063. float3 defaultVertexValue = float3(0, 0, 0);
  2064. #endif
  2065. float3 vertexValue = defaultVertexValue;
  2066. #ifdef ASE_ABSOLUTE_VERTEX_POS
  2067. v.vertex.xyz = vertexValue;
  2068. #else
  2069. v.vertex.xyz += vertexValue;
  2070. #endif
  2071. v.ase_normal = v.ase_normal;
  2072. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  2073. float3 positionVS = TransformWorldToView( positionWS );
  2074. float4 positionCS = TransformWorldToHClip( positionWS );
  2075. VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent );
  2076. o.tSpace0 = float4( normalInput.normalWS, positionWS.x);
  2077. o.tSpace1 = float4( normalInput.tangentWS, positionWS.y);
  2078. o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z);
  2079. #if defined(LIGHTMAP_ON)
  2080. OUTPUT_LIGHTMAP_UV(v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy);
  2081. #endif
  2082. #if defined(DYNAMICLIGHTMAP_ON)
  2083. o.dynamicLightmapUV.xy = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
  2084. #endif
  2085. #if !defined(LIGHTMAP_ON)
  2086. OUTPUT_SH(normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz);
  2087. #endif
  2088. #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
  2089. o.lightmapUVOrVertexSH.zw = v.texcoord;
  2090. o.lightmapUVOrVertexSH.xy = v.texcoord * unity_LightmapST.xy + unity_LightmapST.zw;
  2091. #endif
  2092. half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS );
  2093. o.fogFactorAndVertexLight = half4(0, vertexLight);
  2094. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  2095. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  2096. vertexInput.positionWS = positionWS;
  2097. vertexInput.positionCS = positionCS;
  2098. o.shadowCoord = GetShadowCoord( vertexInput );
  2099. #endif
  2100. o.clipPos = positionCS;
  2101. #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
  2102. o.screenPos = ComputeScreenPos(positionCS);
  2103. #endif
  2104. return o;
  2105. }
  2106. #if defined(ASE_TESSELLATION)
  2107. struct VertexControl
  2108. {
  2109. float4 vertex : INTERNALTESSPOS;
  2110. float3 ase_normal : NORMAL;
  2111. float4 ase_tangent : TANGENT;
  2112. float4 texcoord : TEXCOORD0;
  2113. float4 texcoord1 : TEXCOORD1;
  2114. float4 texcoord2 : TEXCOORD2;
  2115. UNITY_VERTEX_INPUT_INSTANCE_ID
  2116. };
  2117. struct TessellationFactors
  2118. {
  2119. float edge[3] : SV_TessFactor;
  2120. float inside : SV_InsideTessFactor;
  2121. };
  2122. VertexControl vert ( VertexInput v )
  2123. {
  2124. VertexControl o;
  2125. UNITY_SETUP_INSTANCE_ID(v);
  2126. UNITY_TRANSFER_INSTANCE_ID(v, o);
  2127. o.vertex = v.vertex;
  2128. o.ase_normal = v.ase_normal;
  2129. o.ase_tangent = v.ase_tangent;
  2130. o.texcoord = v.texcoord;
  2131. o.texcoord1 = v.texcoord1;
  2132. o.texcoord2 = v.texcoord2;
  2133. return o;
  2134. }
  2135. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  2136. {
  2137. TessellationFactors o;
  2138. float4 tf = 1;
  2139. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  2140. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  2141. #if defined(ASE_FIXED_TESSELLATION)
  2142. tf = FixedTess( tessValue );
  2143. #elif defined(ASE_DISTANCE_TESSELLATION)
  2144. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  2145. #elif defined(ASE_LENGTH_TESSELLATION)
  2146. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  2147. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  2148. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  2149. #endif
  2150. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  2151. return o;
  2152. }
  2153. [domain("tri")]
  2154. [partitioning("fractional_odd")]
  2155. [outputtopology("triangle_cw")]
  2156. [patchconstantfunc("TessellationFunction")]
  2157. [outputcontrolpoints(3)]
  2158. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  2159. {
  2160. return patch[id];
  2161. }
  2162. [domain("tri")]
  2163. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  2164. {
  2165. VertexInput o = (VertexInput) 0;
  2166. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  2167. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  2168. o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z;
  2169. o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z;
  2170. o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
  2171. o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z;
  2172. #if defined(ASE_PHONG_TESSELLATION)
  2173. float3 pp[3];
  2174. for (int i = 0; i < 3; ++i)
  2175. 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));
  2176. float phongStrength = _TessPhongStrength;
  2177. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  2178. #endif
  2179. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  2180. return VertexFunction(o);
  2181. }
  2182. #else
  2183. VertexOutput vert ( VertexInput v )
  2184. {
  2185. return VertexFunction( v );
  2186. }
  2187. #endif
  2188. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
  2189. #define ASE_SV_DEPTH SV_DepthLessEqual
  2190. #else
  2191. #define ASE_SV_DEPTH SV_Depth
  2192. #endif
  2193. FragmentOutput frag ( VertexOutput IN
  2194. #ifdef ASE_DEPTH_WRITE_ON
  2195. ,out float outputDepth : ASE_SV_DEPTH
  2196. #endif
  2197. )
  2198. {
  2199. UNITY_SETUP_INSTANCE_ID(IN);
  2200. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
  2201. #ifdef LOD_FADE_CROSSFADE
  2202. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  2203. #endif
  2204. #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
  2205. float2 sampleCoords = (IN.lightmapUVOrVertexSH.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy;
  2206. float3 WorldNormal = TransformObjectToWorldNormal(normalize(SAMPLE_TEXTURE2D(_TerrainNormalmapTexture, sampler_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1));
  2207. float3 WorldTangent = -cross(GetObjectToWorldMatrix()._13_23_33, WorldNormal);
  2208. float3 WorldBiTangent = cross(WorldNormal, -WorldTangent);
  2209. #else
  2210. float3 WorldNormal = normalize( IN.tSpace0.xyz );
  2211. float3 WorldTangent = IN.tSpace1.xyz;
  2212. float3 WorldBiTangent = IN.tSpace2.xyz;
  2213. #endif
  2214. float3 WorldPosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w);
  2215. float3 WorldViewDirection = _WorldSpaceCameraPos.xyz - WorldPosition;
  2216. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  2217. #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
  2218. float4 ScreenPos = IN.screenPos;
  2219. #endif
  2220. float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.clipPos);
  2221. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  2222. ShadowCoords = IN.shadowCoord;
  2223. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  2224. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  2225. #else
  2226. ShadowCoords = float4(0, 0, 0, 0);
  2227. #endif
  2228. WorldViewDirection = SafeNormalize( WorldViewDirection );
  2229. float2 texCoord37 = IN.ase_texcoord8.xy * float2( 1,1 ) + float2( 0,0 );
  2230. float2 uv_MainTex = IN.ase_texcoord8.zw * _MainTex_ST.xy + _MainTex_ST.zw;
  2231. float2 uv_Dissolve = IN.ase_texcoord8.zw * _Dissolve_ST.xy + _Dissolve_ST.zw;
  2232. float4 tex2DNode46 = tex2D( _Dissolve, uv_Dissolve );
  2233. float temp_output_51_0 = step( _DissolveValue , ( tex2DNode46.r + 0.05 ) );
  2234. float2 texCoord21 = IN.ase_texcoord8.xy * float2( 1,1 ) + float2( 0,0 );
  2235. float temp_output_23_0 = ( texCoord21.y + _zhouxiang );
  2236. float temp_output_29_0 = ( 1.0 - step( temp_output_23_0 , 0.49 ) );
  2237. float3 BaseColor = ( ( ( tex2D( _huawen, texCoord37 ).r * _Colorhuawen * _HuawenLighting ) + ( _Colorhuawen * _AllLighting ) ) + tex2D( _MainTex, uv_MainTex ) + ( _Colorzhouxiang * ( temp_output_51_0 - step( _DissolveValue , tex2DNode46.r ) ) ) + ( ( temp_output_29_0 - ( 1.0 - step( temp_output_23_0 , 0.5 ) ) ) * _Colorzhouxiang ) ).rgb;
  2238. float3 Normal = float3(0, 0, 1);
  2239. float3 Emission = 0;
  2240. float3 Specular = 0.5;
  2241. float Metallic = 0;
  2242. float Smoothness = 0.5;
  2243. float Occlusion = 1;
  2244. float Alpha = saturate( ( saturate( temp_output_29_0 ) * temp_output_51_0 ) );
  2245. float AlphaClipThreshold = 0.5;
  2246. float AlphaClipThresholdShadow = 0.5;
  2247. float3 BakedGI = 0;
  2248. float3 RefractionColor = 1;
  2249. float RefractionIndex = 1;
  2250. float3 Transmission = 1;
  2251. float3 Translucency = 1;
  2252. #ifdef ASE_DEPTH_WRITE_ON
  2253. float DepthValue = 0;
  2254. #endif
  2255. #ifdef _ALPHATEST_ON
  2256. clip(Alpha - AlphaClipThreshold);
  2257. #endif
  2258. InputData inputData = (InputData)0;
  2259. inputData.positionWS = WorldPosition;
  2260. inputData.positionCS = IN.clipPos;
  2261. inputData.shadowCoord = ShadowCoords;
  2262. #ifdef _NORMALMAP
  2263. #if _NORMAL_DROPOFF_TS
  2264. inputData.normalWS = TransformTangentToWorld(Normal, half3x3( WorldTangent, WorldBiTangent, WorldNormal ));
  2265. #elif _NORMAL_DROPOFF_OS
  2266. inputData.normalWS = TransformObjectToWorldNormal(Normal);
  2267. #elif _NORMAL_DROPOFF_WS
  2268. inputData.normalWS = Normal;
  2269. #endif
  2270. #else
  2271. inputData.normalWS = WorldNormal;
  2272. #endif
  2273. inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS);
  2274. inputData.viewDirectionWS = SafeNormalize( WorldViewDirection );
  2275. inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw;
  2276. #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
  2277. float3 SH = SampleSH(inputData.normalWS.xyz);
  2278. #else
  2279. float3 SH = IN.lightmapUVOrVertexSH.xyz;
  2280. #endif
  2281. #ifdef ASE_BAKEDGI
  2282. inputData.bakedGI = BakedGI;
  2283. #else
  2284. #if defined(DYNAMICLIGHTMAP_ON)
  2285. inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, IN.dynamicLightmapUV.xy, SH, inputData.normalWS);
  2286. #else
  2287. inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS );
  2288. #endif
  2289. #endif
  2290. inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV;
  2291. inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy);
  2292. #if defined(DEBUG_DISPLAY)
  2293. #if defined(DYNAMICLIGHTMAP_ON)
  2294. inputData.dynamicLightmapUV = IN.dynamicLightmapUV.xy;
  2295. #endif
  2296. #if defined(LIGHTMAP_ON)
  2297. inputData.staticLightmapUV = IN.lightmapUVOrVertexSH.xy;
  2298. #else
  2299. inputData.vertexSH = SH;
  2300. #endif
  2301. #endif
  2302. #ifdef _DBUFFER
  2303. ApplyDecal(IN.clipPos,
  2304. BaseColor,
  2305. Specular,
  2306. inputData.normalWS,
  2307. Metallic,
  2308. Occlusion,
  2309. Smoothness);
  2310. #endif
  2311. BRDFData brdfData;
  2312. InitializeBRDFData
  2313. (BaseColor, Metallic, Specular, Smoothness, Alpha, brdfData);
  2314. Light mainLight = GetMainLight(inputData.shadowCoord, inputData.positionWS, inputData.shadowMask);
  2315. half4 color;
  2316. MixRealtimeAndBakedGI(mainLight, inputData.normalWS, inputData.bakedGI, inputData.shadowMask);
  2317. color.rgb = GlobalIllumination(brdfData, inputData.bakedGI, Occlusion, inputData.positionWS, inputData.normalWS, inputData.viewDirectionWS);
  2318. color.a = Alpha;
  2319. #ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY
  2320. color.rgb *= color.a;
  2321. #endif
  2322. #ifdef ASE_DEPTH_WRITE_ON
  2323. outputDepth = DepthValue;
  2324. #endif
  2325. return BRDFDataToGbuffer(brdfData, inputData, Smoothness, Emission + color.rgb, Occlusion);
  2326. }
  2327. ENDHLSL
  2328. }
  2329. Pass
  2330. {
  2331. Name "SceneSelectionPass"
  2332. Tags { "LightMode"="SceneSelectionPass" }
  2333. Cull Off
  2334. HLSLPROGRAM
  2335. #define _NORMAL_DROPOFF_TS 1
  2336. #define ASE_FOG 1
  2337. #define _SURFACE_TYPE_TRANSPARENT 1
  2338. #define ASE_SRP_VERSION 120108
  2339. #pragma vertex vert
  2340. #pragma fragment frag
  2341. #define SCENESELECTIONPASS 1
  2342. #define ATTRIBUTES_NEED_NORMAL
  2343. #define ATTRIBUTES_NEED_TANGENT
  2344. #define SHADERPASS SHADERPASS_DEPTHONLY
  2345. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  2346. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  2347. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  2348. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  2349. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  2350. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  2351. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  2352. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  2353. struct VertexInput
  2354. {
  2355. float4 vertex : POSITION;
  2356. float3 ase_normal : NORMAL;
  2357. float4 ase_texcoord2 : TEXCOORD2;
  2358. float4 ase_texcoord : TEXCOORD0;
  2359. UNITY_VERTEX_INPUT_INSTANCE_ID
  2360. };
  2361. struct VertexOutput
  2362. {
  2363. float4 clipPos : SV_POSITION;
  2364. float4 ase_texcoord : TEXCOORD0;
  2365. UNITY_VERTEX_INPUT_INSTANCE_ID
  2366. UNITY_VERTEX_OUTPUT_STEREO
  2367. };
  2368. CBUFFER_START(UnityPerMaterial)
  2369. float4 _Colorhuawen;
  2370. float4 _MainTex_ST;
  2371. float4 _Colorzhouxiang;
  2372. float4 _Dissolve_ST;
  2373. float _HuawenLighting;
  2374. float _AllLighting;
  2375. float _DissolveValue;
  2376. float _zhouxiang;
  2377. #ifdef ASE_TRANSMISSION
  2378. float _TransmissionShadow;
  2379. #endif
  2380. #ifdef ASE_TRANSLUCENCY
  2381. float _TransStrength;
  2382. float _TransNormal;
  2383. float _TransScattering;
  2384. float _TransDirect;
  2385. float _TransAmbient;
  2386. float _TransShadow;
  2387. #endif
  2388. #ifdef ASE_TESSELLATION
  2389. float _TessPhongStrength;
  2390. float _TessValue;
  2391. float _TessMin;
  2392. float _TessMax;
  2393. float _TessEdgeLength;
  2394. float _TessMaxDisp;
  2395. #endif
  2396. CBUFFER_END
  2397. // Property used by ScenePickingPass
  2398. #ifdef SCENEPICKINGPASS
  2399. float4 _SelectionID;
  2400. #endif
  2401. // Properties used by SceneSelectionPass
  2402. #ifdef SCENESELECTIONPASS
  2403. int _ObjectId;
  2404. int _PassValue;
  2405. #endif
  2406. sampler2D _Dissolve;
  2407. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
  2408. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl"
  2409. //#ifdef HAVE_VFX_MODIFICATION
  2410. //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
  2411. //#endif
  2412. struct SurfaceDescription
  2413. {
  2414. float Alpha;
  2415. float AlphaClipThreshold;
  2416. };
  2417. VertexOutput VertexFunction(VertexInput v )
  2418. {
  2419. VertexOutput o;
  2420. ZERO_INITIALIZE(VertexOutput, o);
  2421. UNITY_SETUP_INSTANCE_ID(v);
  2422. UNITY_TRANSFER_INSTANCE_ID(v, o);
  2423. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  2424. o.ase_texcoord.xy = v.ase_texcoord2.xy;
  2425. o.ase_texcoord.zw = v.ase_texcoord.xy;
  2426. #ifdef ASE_ABSOLUTE_VERTEX_POS
  2427. float3 defaultVertexValue = v.vertex.xyz;
  2428. #else
  2429. float3 defaultVertexValue = float3(0, 0, 0);
  2430. #endif
  2431. float3 vertexValue = defaultVertexValue;
  2432. #ifdef ASE_ABSOLUTE_VERTEX_POS
  2433. v.vertex.xyz = vertexValue;
  2434. #else
  2435. v.vertex.xyz += vertexValue;
  2436. #endif
  2437. v.ase_normal = v.ase_normal;
  2438. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  2439. o.clipPos = TransformWorldToHClip(positionWS);
  2440. return o;
  2441. }
  2442. #if defined(ASE_TESSELLATION)
  2443. struct VertexControl
  2444. {
  2445. float4 vertex : INTERNALTESSPOS;
  2446. float3 ase_normal : NORMAL;
  2447. float4 ase_texcoord2 : TEXCOORD2;
  2448. float4 ase_texcoord : TEXCOORD0;
  2449. UNITY_VERTEX_INPUT_INSTANCE_ID
  2450. };
  2451. struct TessellationFactors
  2452. {
  2453. float edge[3] : SV_TessFactor;
  2454. float inside : SV_InsideTessFactor;
  2455. };
  2456. VertexControl vert ( VertexInput v )
  2457. {
  2458. VertexControl o;
  2459. UNITY_SETUP_INSTANCE_ID(v);
  2460. UNITY_TRANSFER_INSTANCE_ID(v, o);
  2461. o.vertex = v.vertex;
  2462. o.ase_normal = v.ase_normal;
  2463. o.ase_texcoord2 = v.ase_texcoord2;
  2464. o.ase_texcoord = v.ase_texcoord;
  2465. return o;
  2466. }
  2467. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  2468. {
  2469. TessellationFactors o;
  2470. float4 tf = 1;
  2471. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  2472. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  2473. #if defined(ASE_FIXED_TESSELLATION)
  2474. tf = FixedTess( tessValue );
  2475. #elif defined(ASE_DISTANCE_TESSELLATION)
  2476. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  2477. #elif defined(ASE_LENGTH_TESSELLATION)
  2478. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  2479. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  2480. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  2481. #endif
  2482. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  2483. return o;
  2484. }
  2485. [domain("tri")]
  2486. [partitioning("fractional_odd")]
  2487. [outputtopology("triangle_cw")]
  2488. [patchconstantfunc("TessellationFunction")]
  2489. [outputcontrolpoints(3)]
  2490. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  2491. {
  2492. return patch[id];
  2493. }
  2494. [domain("tri")]
  2495. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  2496. {
  2497. VertexInput o = (VertexInput) 0;
  2498. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  2499. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  2500. o.ase_texcoord2 = patch[0].ase_texcoord2 * bary.x + patch[1].ase_texcoord2 * bary.y + patch[2].ase_texcoord2 * bary.z;
  2501. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  2502. #if defined(ASE_PHONG_TESSELLATION)
  2503. float3 pp[3];
  2504. for (int i = 0; i < 3; ++i)
  2505. 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));
  2506. float phongStrength = _TessPhongStrength;
  2507. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  2508. #endif
  2509. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  2510. return VertexFunction(o);
  2511. }
  2512. #else
  2513. VertexOutput vert ( VertexInput v )
  2514. {
  2515. return VertexFunction( v );
  2516. }
  2517. #endif
  2518. half4 frag(VertexOutput IN ) : SV_TARGET
  2519. {
  2520. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  2521. float2 texCoord21 = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 );
  2522. float temp_output_23_0 = ( texCoord21.y + _zhouxiang );
  2523. float temp_output_29_0 = ( 1.0 - step( temp_output_23_0 , 0.49 ) );
  2524. float2 uv_Dissolve = IN.ase_texcoord.zw * _Dissolve_ST.xy + _Dissolve_ST.zw;
  2525. float4 tex2DNode46 = tex2D( _Dissolve, uv_Dissolve );
  2526. float temp_output_51_0 = step( _DissolveValue , ( tex2DNode46.r + 0.05 ) );
  2527. surfaceDescription.Alpha = saturate( ( saturate( temp_output_29_0 ) * temp_output_51_0 ) );
  2528. surfaceDescription.AlphaClipThreshold = 0.5;
  2529. #if _ALPHATEST_ON
  2530. float alphaClipThreshold = 0.01f;
  2531. #if ALPHA_CLIP_THRESHOLD
  2532. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  2533. #endif
  2534. clip(surfaceDescription.Alpha - alphaClipThreshold);
  2535. #endif
  2536. half4 outColor = 0;
  2537. #ifdef SCENESELECTIONPASS
  2538. outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  2539. #elif defined(SCENEPICKINGPASS)
  2540. outColor = _SelectionID;
  2541. #endif
  2542. return outColor;
  2543. }
  2544. ENDHLSL
  2545. }
  2546. Pass
  2547. {
  2548. Name "ScenePickingPass"
  2549. Tags { "LightMode"="Picking" }
  2550. HLSLPROGRAM
  2551. #define _NORMAL_DROPOFF_TS 1
  2552. #define ASE_FOG 1
  2553. #define _SURFACE_TYPE_TRANSPARENT 1
  2554. #define ASE_SRP_VERSION 120108
  2555. #pragma vertex vert
  2556. #pragma fragment frag
  2557. #define SCENEPICKINGPASS 1
  2558. #define ATTRIBUTES_NEED_NORMAL
  2559. #define ATTRIBUTES_NEED_TANGENT
  2560. #define SHADERPASS SHADERPASS_DEPTHONLY
  2561. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  2562. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  2563. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  2564. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  2565. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  2566. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  2567. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  2568. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  2569. struct VertexInput
  2570. {
  2571. float4 vertex : POSITION;
  2572. float3 ase_normal : NORMAL;
  2573. float4 ase_texcoord2 : TEXCOORD2;
  2574. float4 ase_texcoord : TEXCOORD0;
  2575. UNITY_VERTEX_INPUT_INSTANCE_ID
  2576. };
  2577. struct VertexOutput
  2578. {
  2579. float4 clipPos : SV_POSITION;
  2580. float4 ase_texcoord : TEXCOORD0;
  2581. UNITY_VERTEX_INPUT_INSTANCE_ID
  2582. UNITY_VERTEX_OUTPUT_STEREO
  2583. };
  2584. CBUFFER_START(UnityPerMaterial)
  2585. float4 _Colorhuawen;
  2586. float4 _MainTex_ST;
  2587. float4 _Colorzhouxiang;
  2588. float4 _Dissolve_ST;
  2589. float _HuawenLighting;
  2590. float _AllLighting;
  2591. float _DissolveValue;
  2592. float _zhouxiang;
  2593. #ifdef ASE_TRANSMISSION
  2594. float _TransmissionShadow;
  2595. #endif
  2596. #ifdef ASE_TRANSLUCENCY
  2597. float _TransStrength;
  2598. float _TransNormal;
  2599. float _TransScattering;
  2600. float _TransDirect;
  2601. float _TransAmbient;
  2602. float _TransShadow;
  2603. #endif
  2604. #ifdef ASE_TESSELLATION
  2605. float _TessPhongStrength;
  2606. float _TessValue;
  2607. float _TessMin;
  2608. float _TessMax;
  2609. float _TessEdgeLength;
  2610. float _TessMaxDisp;
  2611. #endif
  2612. CBUFFER_END
  2613. // Property used by ScenePickingPass
  2614. #ifdef SCENEPICKINGPASS
  2615. float4 _SelectionID;
  2616. #endif
  2617. // Properties used by SceneSelectionPass
  2618. #ifdef SCENESELECTIONPASS
  2619. int _ObjectId;
  2620. int _PassValue;
  2621. #endif
  2622. sampler2D _Dissolve;
  2623. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
  2624. //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl"
  2625. //#ifdef HAVE_VFX_MODIFICATION
  2626. //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl"
  2627. //#endif
  2628. struct SurfaceDescription
  2629. {
  2630. float Alpha;
  2631. float AlphaClipThreshold;
  2632. };
  2633. VertexOutput VertexFunction(VertexInput v )
  2634. {
  2635. VertexOutput o;
  2636. ZERO_INITIALIZE(VertexOutput, o);
  2637. UNITY_SETUP_INSTANCE_ID(v);
  2638. UNITY_TRANSFER_INSTANCE_ID(v, o);
  2639. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  2640. o.ase_texcoord.xy = v.ase_texcoord2.xy;
  2641. o.ase_texcoord.zw = v.ase_texcoord.xy;
  2642. #ifdef ASE_ABSOLUTE_VERTEX_POS
  2643. float3 defaultVertexValue = v.vertex.xyz;
  2644. #else
  2645. float3 defaultVertexValue = float3(0, 0, 0);
  2646. #endif
  2647. float3 vertexValue = defaultVertexValue;
  2648. #ifdef ASE_ABSOLUTE_VERTEX_POS
  2649. v.vertex.xyz = vertexValue;
  2650. #else
  2651. v.vertex.xyz += vertexValue;
  2652. #endif
  2653. v.ase_normal = v.ase_normal;
  2654. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  2655. o.clipPos = TransformWorldToHClip(positionWS);
  2656. return o;
  2657. }
  2658. #if defined(ASE_TESSELLATION)
  2659. struct VertexControl
  2660. {
  2661. float4 vertex : INTERNALTESSPOS;
  2662. float3 ase_normal : NORMAL;
  2663. float4 ase_texcoord2 : TEXCOORD2;
  2664. float4 ase_texcoord : TEXCOORD0;
  2665. UNITY_VERTEX_INPUT_INSTANCE_ID
  2666. };
  2667. struct TessellationFactors
  2668. {
  2669. float edge[3] : SV_TessFactor;
  2670. float inside : SV_InsideTessFactor;
  2671. };
  2672. VertexControl vert ( VertexInput v )
  2673. {
  2674. VertexControl o;
  2675. UNITY_SETUP_INSTANCE_ID(v);
  2676. UNITY_TRANSFER_INSTANCE_ID(v, o);
  2677. o.vertex = v.vertex;
  2678. o.ase_normal = v.ase_normal;
  2679. o.ase_texcoord2 = v.ase_texcoord2;
  2680. o.ase_texcoord = v.ase_texcoord;
  2681. return o;
  2682. }
  2683. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  2684. {
  2685. TessellationFactors o;
  2686. float4 tf = 1;
  2687. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  2688. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  2689. #if defined(ASE_FIXED_TESSELLATION)
  2690. tf = FixedTess( tessValue );
  2691. #elif defined(ASE_DISTANCE_TESSELLATION)
  2692. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  2693. #elif defined(ASE_LENGTH_TESSELLATION)
  2694. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  2695. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  2696. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  2697. #endif
  2698. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  2699. return o;
  2700. }
  2701. [domain("tri")]
  2702. [partitioning("fractional_odd")]
  2703. [outputtopology("triangle_cw")]
  2704. [patchconstantfunc("TessellationFunction")]
  2705. [outputcontrolpoints(3)]
  2706. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  2707. {
  2708. return patch[id];
  2709. }
  2710. [domain("tri")]
  2711. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  2712. {
  2713. VertexInput o = (VertexInput) 0;
  2714. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  2715. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  2716. o.ase_texcoord2 = patch[0].ase_texcoord2 * bary.x + patch[1].ase_texcoord2 * bary.y + patch[2].ase_texcoord2 * bary.z;
  2717. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  2718. #if defined(ASE_PHONG_TESSELLATION)
  2719. float3 pp[3];
  2720. for (int i = 0; i < 3; ++i)
  2721. 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));
  2722. float phongStrength = _TessPhongStrength;
  2723. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  2724. #endif
  2725. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  2726. return VertexFunction(o);
  2727. }
  2728. #else
  2729. VertexOutput vert ( VertexInput v )
  2730. {
  2731. return VertexFunction( v );
  2732. }
  2733. #endif
  2734. half4 frag(VertexOutput IN ) : SV_TARGET
  2735. {
  2736. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  2737. float2 texCoord21 = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 );
  2738. float temp_output_23_0 = ( texCoord21.y + _zhouxiang );
  2739. float temp_output_29_0 = ( 1.0 - step( temp_output_23_0 , 0.49 ) );
  2740. float2 uv_Dissolve = IN.ase_texcoord.zw * _Dissolve_ST.xy + _Dissolve_ST.zw;
  2741. float4 tex2DNode46 = tex2D( _Dissolve, uv_Dissolve );
  2742. float temp_output_51_0 = step( _DissolveValue , ( tex2DNode46.r + 0.05 ) );
  2743. surfaceDescription.Alpha = saturate( ( saturate( temp_output_29_0 ) * temp_output_51_0 ) );
  2744. surfaceDescription.AlphaClipThreshold = 0.5;
  2745. #if _ALPHATEST_ON
  2746. float alphaClipThreshold = 0.01f;
  2747. #if ALPHA_CLIP_THRESHOLD
  2748. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  2749. #endif
  2750. clip(surfaceDescription.Alpha - alphaClipThreshold);
  2751. #endif
  2752. half4 outColor = 0;
  2753. #ifdef SCENESELECTIONPASS
  2754. outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  2755. #elif defined(SCENEPICKINGPASS)
  2756. outColor = _SelectionID;
  2757. #endif
  2758. return outColor;
  2759. }
  2760. ENDHLSL
  2761. }
  2762. }
  2763. CustomEditor "UnityEditor.ShaderGraphLitGUI"
  2764. FallBack "Hidden/Shader Graph/FallbackError"
  2765. Fallback Off
  2766. }
  2767. /*ASEBEGIN
  2768. Version=19105
  2769. Node;AmplifyShaderEditor.CommentaryNode;54;-168.3073,1109.665;Inherit;False;1053.505;596.7234;Comment;7;48;46;50;49;47;51;52;光边溶解;1,1,1,1;0;0
  2770. Node;AmplifyShaderEditor.CommentaryNode;45;-1480.971,-1090.189;Inherit;False;1595.333;698.0768;Comment;8;42;37;38;40;39;43;41;44;叠加花纹;1,1,1,1;0;0
  2771. Node;AmplifyShaderEditor.CommentaryNode;36;-594.3334,92.16669;Inherit;False;1362.895;827.8983;Comment;13;21;23;25;24;27;26;28;29;30;32;33;34;22;基于2套uv轴向溶解;1,1,1,1;0;0
  2772. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;10;170,-24;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0
  2773. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;12;170,-24;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0
  2774. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;13;170,-24;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0
  2775. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;14;170,-24;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0
  2776. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;15;170,-24;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;3;True;12;all;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0
  2777. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;16;170,-24;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthNormals;0;6;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;3;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormals;False;False;0;;0;0;Standard;0;False;0
  2778. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;17;170,-24;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;GBuffer;0;7;GBuffer;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;3;True;12;all;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalGBuffer;False;False;0;;0;0;Standard;0;False;0
  2779. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;18;170,-24;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;SceneSelectionPass;0;8;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0
  2780. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;19;170,-24;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ScenePickingPass;0;9;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0
  2781. Node;AmplifyShaderEditor.SimpleAddOpNode;23;-270.3334,226.1667;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  2782. Node;AmplifyShaderEditor.RangedFloatNode;25;-277.3334,353.1667;Inherit;False;Constant;_Float0;Float 0;2;0;Create;True;0;0;0;False;0;False;0.5;0;0;0;0;1;FLOAT;0
  2783. Node;AmplifyShaderEditor.StepOpNode;24;-32.33337,216.1667;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  2784. Node;AmplifyShaderEditor.RangedFloatNode;27;-273.3334,476.1667;Inherit;False;Constant;_Float1;Float 1;2;0;Create;True;0;0;0;False;0;False;0.49;0;0;0;0;1;FLOAT;0
  2785. Node;AmplifyShaderEditor.StepOpNode;26;-34.33337,449.1667;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  2786. Node;AmplifyShaderEditor.OneMinusNode;28;99.66663,211.1667;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
  2787. Node;AmplifyShaderEditor.OneMinusNode;29;108.6666,449.1667;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
  2788. Node;AmplifyShaderEditor.SimpleSubtractOpNode;32;332.6666,465.1668;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  2789. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;33;601.2283,499.6516;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  2790. Node;AmplifyShaderEditor.RangedFloatNode;22;-448.3334,330.1667;Inherit;False;Property;_zhouxiang;轴向高度;1;0;Create;False;0;0;0;False;0;False;-0.15;0;0;0;0;1;FLOAT;0
  2791. Node;AmplifyShaderEditor.TextureCoordinatesNode;21;-544.3334,142.1667;Inherit;False;2;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  2792. Node;AmplifyShaderEditor.SimpleAddOpNode;42;-38.97095,-1008.189;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  2793. Node;AmplifyShaderEditor.TextureCoordinatesNode;37;-1430.971,-992.1887;Inherit;False;2;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  2794. Node;AmplifyShaderEditor.SamplerNode;38;-1046.971,-1040.189;Inherit;True;Property;_huawen;花纹;4;0;Create;False;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  2795. Node;AmplifyShaderEditor.ColorNode;40;-934.9709,-816.1887;Inherit;False;Property;_Colorhuawen;花纹颜色;3;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  2796. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;39;-534.9709,-1024.189;Inherit;False;3;3;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
  2797. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;43;-518.9709,-816.1887;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  2798. Node;AmplifyShaderEditor.RangedFloatNode;41;-1052.036,-623.6892;Inherit;False;Property;_HuawenLighting;花纹亮度;5;0;Create;False;0;0;0;False;0;False;1;0;0;1;0;1;FLOAT;0
  2799. Node;AmplifyShaderEditor.RangedFloatNode;44;-942.2104,-507.1119;Inherit;False;Property;_AllLighting;整体亮度;6;0;Create;False;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0
  2800. Node;AmplifyShaderEditor.ColorNode;34;363.7524,713.0649;Inherit;False;Property;_Colorzhouxiang;轴向溶解光边颜色;2;1;[HDR];Create;False;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  2801. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;53;935.9887,862.9589;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  2802. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;11;1447.971,-99.45061;Float;False;True;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;LT/WeaponDissolve;94348b07e5e8bab40bd6c8a1e3df54cd;True;Forward;0;1;Forward;19;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;True;3;True;7;d3d11;glcore;gles;gles3;metal;vulkan;switch;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForward;False;False;0;;0;0;Standard;41;Workflow;1;0;Surface;1;638302533595070218; Refraction Model;0;0; Blend;0;0;Two Sided;1;0;Fragment Normal Space,InvertActionOnDeselection;0;0;Forward Only;0;0;Transmission;0;0; Transmission Shadow;0.5,False,;0;Translucency;0;0; Translucency Strength;1,False,;0; Normal Distortion;0.5,False,;0; Scattering;2,False,;0; Direct;0.9,False,;0; Ambient;0.1,False,;0; Shadow;0.5,False,;0;Cast Shadows;1;0; Use Shadow Threshold;0;0;Receive Shadows;1;0;GPU Instancing;1;0;LOD CrossFade;1;0;Built-in Fog;1;0;_FinalColorxAlpha;0;0;Meta Pass;1;0;Override Baked GI;0;0;Extra Pre Pass;0;0;DOTS Instancing;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Write Depth;0;0; Early Z;0;0;Vertex Position,InvertActionOnDeselection;1;0;Debug Display;0;0;Clear Coat;0;0;0;10;False;True;True;True;True;True;True;True;True;True;False;;False;0
  2803. Node;AmplifyShaderEditor.SamplerNode;46;-118.3073,1350.915;Inherit;True;Property;_Dissolve;溶解图;7;0;Create;False;0;0;0;False;0;False;-1;8dd972cbb6cdc024a9da718d46ea3dfc;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  2804. Node;AmplifyShaderEditor.RangedFloatNode;50;-23.24999,1591.388;Inherit;False;Constant;_Float2;Float 2;9;0;Create;True;0;0;0;False;0;False;0.05;0;0;0;0;1;FLOAT;0
  2805. Node;AmplifyShaderEditor.SimpleAddOpNode;49;253.1184,1521.069;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  2806. Node;AmplifyShaderEditor.StepOpNode;47;290.7302,1226.713;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  2807. Node;AmplifyShaderEditor.SimpleSubtractOpNode;52;648.8649,1339.55;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  2808. Node;AmplifyShaderEditor.SamplerNode;20;-85.14893,-345.2047;Inherit;True;Property;_MainTex;MainTex;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  2809. Node;AmplifyShaderEditor.SimpleAddOpNode;55;993.584,-468.2982;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;COLOR;0,0,0,0;False;1;COLOR;0
  2810. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;35;888.4404,307.1862;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  2811. Node;AmplifyShaderEditor.SaturateNode;30;380.6666,272.1667;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  2812. Node;AmplifyShaderEditor.StepOpNode;51;459.1684,1519.434;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  2813. Node;AmplifyShaderEditor.SaturateNode;56;1124.677,312.0786;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  2814. Node;AmplifyShaderEditor.RangedFloatNode;48;-75.58053,1159.665;Inherit;False;Property;_DissolveValue;溶解值;8;0;Create;False;0;0;0;False;0;False;0.158529;0;0;1.5;0;1;FLOAT;0
  2815. WireConnection;23;0;21;2
  2816. WireConnection;23;1;22;0
  2817. WireConnection;24;0;23;0
  2818. WireConnection;24;1;25;0
  2819. WireConnection;26;0;23;0
  2820. WireConnection;26;1;27;0
  2821. WireConnection;28;0;24;0
  2822. WireConnection;29;0;26;0
  2823. WireConnection;32;0;29;0
  2824. WireConnection;32;1;28;0
  2825. WireConnection;33;0;32;0
  2826. WireConnection;33;1;34;0
  2827. WireConnection;42;0;39;0
  2828. WireConnection;42;1;43;0
  2829. WireConnection;38;1;37;0
  2830. WireConnection;39;0;38;1
  2831. WireConnection;39;1;40;0
  2832. WireConnection;39;2;41;0
  2833. WireConnection;43;0;40;0
  2834. WireConnection;43;1;44;0
  2835. WireConnection;53;0;34;0
  2836. WireConnection;53;1;52;0
  2837. WireConnection;11;0;55;0
  2838. WireConnection;11;6;56;0
  2839. WireConnection;49;0;46;1
  2840. WireConnection;49;1;50;0
  2841. WireConnection;47;0;48;0
  2842. WireConnection;47;1;46;1
  2843. WireConnection;52;0;51;0
  2844. WireConnection;52;1;47;0
  2845. WireConnection;55;0;42;0
  2846. WireConnection;55;1;20;0
  2847. WireConnection;55;2;53;0
  2848. WireConnection;55;3;33;0
  2849. WireConnection;35;0;30;0
  2850. WireConnection;35;1;51;0
  2851. WireConnection;30;0;29;0
  2852. WireConnection;51;0;48;0
  2853. WireConnection;51;1;49;0
  2854. WireConnection;56;0;35;0
  2855. ASEEND*/
  2856. //CHKSM=2B63C6DD692B0BD93D1BEA918F1B66EFEFE5C964