SkyClouds_2D.shader 219 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288
  1. // Made with Amplify Shader Editor v1.9.6.3
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "SkyClouds_2D"
  4. {
  5. Properties
  6. {
  7. [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
  8. [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
  9. _BaseColor("Base Color", Color) = (1,1,1,1)
  10. _EmmissiveColor("Emmissive Color", Color) = (0.5490196,0.627451,0.7294118,0)
  11. _Scale("Scale", Float) = 1
  12. _WindDirection("WindDirection", Vector) = (-1,-0.3,-0.3,0)
  13. _WindSpeed("WindSpeed", Float) = 1
  14. _Mask0("Mask0", Vector) = (1.985208,0.440832,0.2055923,1.2)
  15. _Mask1("Mask1", Vector) = (1.985208,0.440832,0.2055923,1.2)
  16. _DepthDistance("Depth Distance", Float) = 0.4
  17. _NoiseColorStrength("Noise Color Strength", Range( 0 , 1)) = 0.5565214
  18. _EmmissiveNoiseColor("Emmissive Noise Color", Range( 0 , 1)) = 0.2000003
  19. _NoiseSpeed("Noise Speed", Float) = 0.2
  20. _VorSpeed("Vor Speed", Float) = 0.05
  21. _AdditionalNoiseDir("Additional Noise Dir", Vector) = (0,0,0,0)
  22. _AdditionalVoronoiDir("AdditionalVoronoiDir", Vector) = (0.7,-0.3,-0.3,0)
  23. _VoronoiScale("Voronoi Scale", Float) = 1.4
  24. _NoiseScale("Noise Scale", Float) = 20
  25. _VoronoiStrength("Voronoi Strength", Float) = 0.9
  26. _NoiseStrength("Noise Strength", Float) = 0.03
  27. _NoiseDisplacement("Noise Displacement", Float) = 0.5
  28. _NoiseScale3D("Noise Scale 3D", Vector) = (1,0.2,0.6,0)
  29. _EmmissiveDepthFade("Emmissive Depth Fade", Range( 0 , 1)) = 0.2086951
  30. _NoiseColorMix("NoiseColorMix", Range( 0 , 1)) = 0.96
  31. _VertexColorStrength("Vertex Color Strength", Range( 0 , 1)) = 0.7030082
  32. //_TransmissionShadow( "Transmission Shadow", Range( 0, 1 ) ) = 0.5
  33. _TransStrength( "Strength", Range( 0, 50 ) ) = 1
  34. _TransNormal( "Normal Distortion", Range( 0, 1 ) ) = 0.5
  35. _TransScattering( "Scattering", Range( 1, 50 ) ) = 2
  36. _TransDirect( "Direct", Range( 0, 1 ) ) = 0.9
  37. _TransAmbient( "Ambient", Range( 0, 1 ) ) = 0.1
  38. _TransShadow( "Shadow", Range( 0, 1 ) ) = 0.5
  39. _TessPhongStrength( "Phong Tess Strength", Range( 0, 1 ) ) = 0.5
  40. //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
  41. //_TessMin( "Tess Min Distance", Float ) = 10
  42. //_TessMax( "Tess Max Distance", Float ) = 25
  43. _TessEdgeLength ( "Edge length", Range( 2, 50 ) ) = 16
  44. //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
  45. [HideInInspector][ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1
  46. [HideInInspector][ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1
  47. [HideInInspector][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 1.0
  48. [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0
  49. [HideInInspector] _QueueControl("_QueueControl", Float) = -1
  50. [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  51. [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  52. [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  53. }
  54. SubShader
  55. {
  56. LOD 0
  57. Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Lit" }
  58. Cull Back
  59. ZWrite Off
  60. ZTest LEqual
  61. Offset 0 , 0
  62. AlphaToMask Off
  63. HLSLINCLUDE
  64. #pragma target 4.5
  65. #pragma prefer_hlslcc gles
  66. // ensure rendering platforms toggle list is visible
  67. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
  68. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
  69. #ifndef ASE_TESS_FUNCS
  70. #define ASE_TESS_FUNCS
  71. float4 FixedTess( float tessValue )
  72. {
  73. return tessValue;
  74. }
  75. float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
  76. {
  77. float3 wpos = mul(o2w,vertex).xyz;
  78. float dist = distance (wpos, cameraPos);
  79. float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
  80. return f;
  81. }
  82. float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
  83. {
  84. float4 tess;
  85. tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
  86. tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
  87. tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
  88. tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
  89. return tess;
  90. }
  91. float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
  92. {
  93. float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
  94. float len = distance(wpos0, wpos1);
  95. float f = max(len * scParams.y / (edgeLen * dist), 1.0);
  96. return f;
  97. }
  98. float DistanceFromPlane (float3 pos, float4 plane)
  99. {
  100. float d = dot (float4(pos,1.0f), plane);
  101. return d;
  102. }
  103. bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
  104. {
  105. float4 planeTest;
  106. planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  107. (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  108. (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
  109. planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  110. (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  111. (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
  112. planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  113. (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  114. (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
  115. planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  116. (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  117. (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
  118. return !all (planeTest);
  119. }
  120. float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
  121. {
  122. float3 f;
  123. f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
  124. f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
  125. f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
  126. return CalcTriEdgeTessFactors (f);
  127. }
  128. float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
  129. {
  130. float3 pos0 = mul(o2w,v0).xyz;
  131. float3 pos1 = mul(o2w,v1).xyz;
  132. float3 pos2 = mul(o2w,v2).xyz;
  133. float4 tess;
  134. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  135. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  136. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  137. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  138. return tess;
  139. }
  140. float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
  141. {
  142. float3 pos0 = mul(o2w,v0).xyz;
  143. float3 pos1 = mul(o2w,v1).xyz;
  144. float3 pos2 = mul(o2w,v2).xyz;
  145. float4 tess;
  146. if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
  147. {
  148. tess = 0.0f;
  149. }
  150. else
  151. {
  152. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  153. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  154. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  155. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  156. }
  157. return tess;
  158. }
  159. #endif //ASE_TESS_FUNCS
  160. ENDHLSL
  161. Pass
  162. {
  163. Name "Forward"
  164. Tags { "LightMode"="UniversalForwardOnly" }
  165. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  166. ZWrite On
  167. ZTest LEqual
  168. Offset 0 , 0
  169. ColorMask RGBA
  170. HLSLPROGRAM
  171. #define _NORMAL_DROPOFF_TS 1
  172. #pragma shader_feature_local _RECEIVE_SHADOWS_OFF
  173. #pragma multi_compile_instancing
  174. #pragma instancing_options renderinglayer
  175. #pragma multi_compile _ LOD_FADE_CROSSFADE
  176. #pragma multi_compile_fog
  177. #define ASE_FOG 1
  178. #define ASE_PHONG_TESSELLATION
  179. #define ASE_DEPTH_WRITE_ON
  180. #define ASE_TESSELLATION 1
  181. #pragma require tessellation tessHW
  182. #pragma hull HullFunction
  183. #pragma domain DomainFunction
  184. #define ASE_TRANSLUCENCY 1
  185. #define ASE_LENGTH_TESSELLATION
  186. #define _SURFACE_TYPE_TRANSPARENT 1
  187. #define _EMISSION
  188. #define _ALPHATEST_ON 1
  189. #define ASE_SRP_VERSION 140004
  190. #define REQUIRE_DEPTH_TEXTURE 1
  191. #pragma multi_compile _ DOTS_INSTANCING_ON
  192. #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
  193. #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
  194. #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
  195. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
  196. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION
  197. #pragma multi_compile_fragment _ _SHADOWS_SOFT
  198. #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  199. #pragma multi_compile _ _LIGHT_LAYERS
  200. #pragma multi_compile_fragment _ _LIGHT_COOKIES
  201. #pragma multi_compile _ _FORWARD_PLUS
  202. #pragma multi_compile_fragment _ _WRITE_RENDERING_LAYERS
  203. #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
  204. #pragma multi_compile _ SHADOWS_SHADOWMASK
  205. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  206. #pragma multi_compile _ LIGHTMAP_ON
  207. #pragma multi_compile _ DYNAMICLIGHTMAP_ON
  208. #pragma multi_compile_fragment _ DEBUG_DISPLAY
  209. #pragma vertex vert
  210. #pragma fragment frag
  211. #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE)
  212. #define _SPECULAR_COLOR 1
  213. #endif
  214. #define SHADERPASS SHADERPASS_FORWARD
  215. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  216. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  217. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  218. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  219. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  220. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  221. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
  222. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  223. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  224. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  225. #if defined(LOD_FADE_CROSSFADE)
  226. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  227. #endif
  228. #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL)
  229. #define ENABLE_TERRAIN_PERPIXEL_NORMAL
  230. #endif
  231. #define ASE_NEEDS_VERT_POSITION
  232. #define ASE_NEEDS_VERT_NORMAL
  233. #define ASE_NEEDS_FRAG_SCREEN_POSITION
  234. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
  235. #define ASE_SV_DEPTH SV_DepthLessEqual
  236. #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
  237. #else
  238. #define ASE_SV_DEPTH SV_Depth
  239. #define ASE_SV_POSITION_QUALIFIERS
  240. #endif
  241. struct VertexInput
  242. {
  243. float4 positionOS : POSITION;
  244. float3 normalOS : NORMAL;
  245. float4 tangentOS : TANGENT;
  246. float4 texcoord : TEXCOORD0;
  247. float4 texcoord1 : TEXCOORD1;
  248. float4 texcoord2 : TEXCOORD2;
  249. float4 ase_color : COLOR;
  250. UNITY_VERTEX_INPUT_INSTANCE_ID
  251. };
  252. struct VertexOutput
  253. {
  254. ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
  255. float4 clipPosV : TEXCOORD0;
  256. float4 lightmapUVOrVertexSH : TEXCOORD1;
  257. half4 fogFactorAndVertexLight : TEXCOORD2;
  258. float4 tSpace0 : TEXCOORD3;
  259. float4 tSpace1 : TEXCOORD4;
  260. float4 tSpace2 : TEXCOORD5;
  261. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  262. float4 shadowCoord : TEXCOORD6;
  263. #endif
  264. #if defined(DYNAMICLIGHTMAP_ON)
  265. float2 dynamicLightmapUV : TEXCOORD7;
  266. #endif
  267. float4 ase_texcoord8 : TEXCOORD8;
  268. float3 ase_normal : NORMAL;
  269. float4 ase_color : COLOR;
  270. float4 ase_texcoord9 : TEXCOORD9;
  271. UNITY_VERTEX_INPUT_INSTANCE_ID
  272. UNITY_VERTEX_OUTPUT_STEREO
  273. };
  274. CBUFFER_START(UnityPerMaterial)
  275. float4 _EmmissiveColor;
  276. float4 _BaseColor;
  277. float4 _Mask1;
  278. float4 _Mask0;
  279. float3 _NoiseScale3D;
  280. float3 _WindDirection;
  281. float3 _AdditionalNoiseDir;
  282. float3 _AdditionalVoronoiDir;
  283. float _Scale;
  284. float _EmmissiveNoiseColor;
  285. float _VertexColorStrength;
  286. float _NoiseColorStrength;
  287. float _NoiseColorMix;
  288. float _VoronoiStrength;
  289. float _DepthDistance;
  290. float _VorSpeed;
  291. float _VoronoiScale;
  292. float _NoiseStrength;
  293. float _NoiseScale;
  294. float _WindSpeed;
  295. float _NoiseSpeed;
  296. float _NoiseDisplacement;
  297. float _EmmissiveDepthFade;
  298. #ifdef ASE_TRANSMISSION
  299. float _TransmissionShadow;
  300. #endif
  301. #ifdef ASE_TRANSLUCENCY
  302. float _TransStrength;
  303. float _TransNormal;
  304. float _TransScattering;
  305. float _TransDirect;
  306. float _TransAmbient;
  307. float _TransShadow;
  308. #endif
  309. #ifdef ASE_TESSELLATION
  310. float _TessPhongStrength;
  311. float _TessValue;
  312. float _TessMin;
  313. float _TessMax;
  314. float _TessEdgeLength;
  315. float _TessMaxDisp;
  316. #endif
  317. CBUFFER_END
  318. #ifdef SCENEPICKINGPASS
  319. float4 _SelectionID;
  320. #endif
  321. #ifdef SCENESELECTIONPASS
  322. int _ObjectId;
  323. int _PassValue;
  324. #endif
  325. float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
  326. float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
  327. float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
  328. float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
  329. float snoise( float3 v )
  330. {
  331. const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
  332. float3 i = floor( v + dot( v, C.yyy ) );
  333. float3 x0 = v - i + dot( i, C.xxx );
  334. float3 g = step( x0.yzx, x0.xyz );
  335. float3 l = 1.0 - g;
  336. float3 i1 = min( g.xyz, l.zxy );
  337. float3 i2 = max( g.xyz, l.zxy );
  338. float3 x1 = x0 - i1 + C.xxx;
  339. float3 x2 = x0 - i2 + C.yyy;
  340. float3 x3 = x0 - 0.5;
  341. i = mod3D289( i);
  342. float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
  343. float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
  344. float4 x_ = floor( j / 7.0 );
  345. float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
  346. float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  347. float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  348. float4 h = 1.0 - abs( x ) - abs( y );
  349. float4 b0 = float4( x.xy, y.xy );
  350. float4 b1 = float4( x.zw, y.zw );
  351. float4 s0 = floor( b0 ) * 2.0 + 1.0;
  352. float4 s1 = floor( b1 ) * 2.0 + 1.0;
  353. float4 sh = -step( h, 0.0 );
  354. float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
  355. float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
  356. float3 g0 = float3( a0.xy, h.x );
  357. float3 g1 = float3( a0.zw, h.y );
  358. float3 g2 = float3( a1.xy, h.z );
  359. float3 g3 = float3( a1.zw, h.w );
  360. float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
  361. g0 *= norm.x;
  362. g1 *= norm.y;
  363. g2 *= norm.z;
  364. g3 *= norm.w;
  365. float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
  366. m = m* m;
  367. m = m* m;
  368. float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
  369. return 42.0 * dot( m, px);
  370. }
  371. float2 voronoihash97( float2 p )
  372. {
  373. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  374. return frac( sin( p ) *43758.5453);
  375. }
  376. float voronoi97( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  377. {
  378. float2 n = floor( v );
  379. float2 f = frac( v );
  380. float F1 = 8.0;
  381. float F2 = 8.0; float2 mg = 0;
  382. for ( int j = -1; j <= 1; j++ )
  383. {
  384. for ( int i = -1; i <= 1; i++ )
  385. {
  386. float2 g = float2( i, j );
  387. float2 o = voronoihash97( n + g );
  388. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  389. float d = 0.5 * dot( r, r );
  390. if( d<F1 ) {
  391. F2 = F1;
  392. F1 = d; mg = g; mr = r; id = o;
  393. } else if( d<F2 ) {
  394. F2 = d;
  395. }
  396. }
  397. }
  398. return F1;
  399. }
  400. float2 voronoihash96( float2 p )
  401. {
  402. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  403. return frac( sin( p ) *43758.5453);
  404. }
  405. float voronoi96( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  406. {
  407. float2 n = floor( v );
  408. float2 f = frac( v );
  409. float F1 = 8.0;
  410. float F2 = 8.0; float2 mg = 0;
  411. for ( int j = -1; j <= 1; j++ )
  412. {
  413. for ( int i = -1; i <= 1; i++ )
  414. {
  415. float2 g = float2( i, j );
  416. float2 o = voronoihash96( n + g );
  417. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  418. float d = 0.5 * dot( r, r );
  419. if( d<F1 ) {
  420. F2 = F1;
  421. F1 = d; mg = g; mr = r; id = o;
  422. } else if( d<F2 ) {
  423. F2 = d;
  424. }
  425. }
  426. }
  427. return F1;
  428. }
  429. float2 voronoihash89( float2 p )
  430. {
  431. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  432. return frac( sin( p ) *43758.5453);
  433. }
  434. float voronoi89( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  435. {
  436. float2 n = floor( v );
  437. float2 f = frac( v );
  438. float F1 = 8.0;
  439. float F2 = 8.0; float2 mg = 0;
  440. for ( int j = -1; j <= 1; j++ )
  441. {
  442. for ( int i = -1; i <= 1; i++ )
  443. {
  444. float2 g = float2( i, j );
  445. float2 o = voronoihash89( n + g );
  446. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  447. float d = 0.5 * dot( r, r );
  448. if( d<F1 ) {
  449. F2 = F1;
  450. F1 = d; mg = g; mr = r; id = o;
  451. } else if( d<F2 ) {
  452. F2 = d;
  453. }
  454. }
  455. }
  456. return F1;
  457. }
  458. VertexOutput VertexFunction( VertexInput v )
  459. {
  460. VertexOutput o = (VertexOutput)0;
  461. UNITY_SETUP_INSTANCE_ID(v);
  462. UNITY_TRANSFER_INSTANCE_ID(v, o);
  463. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  464. #if ( SHADER_TARGET >= 50 )
  465. float recip367 = rcp( _Scale );
  466. #else
  467. float recip367 = 1.0 / _Scale;
  468. #endif
  469. float Scale228 = recip367;
  470. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  471. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  472. float3 break332 = WindDir317;
  473. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  474. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  475. float4 WindDirWeights341 = appendResult340;
  476. float4 break344 = abs( WindDirWeights341 );
  477. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  478. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  479. float4 transform70 = mul(GetObjectToWorldMatrix(),v.positionOS);
  480. float4 temp_output_71_0 = (transform70).xyzw;
  481. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  482. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  483. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  484. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  485. float time97 = 0.0;
  486. float2 voronoiSmoothId97 = 0;
  487. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  488. float2 appendResult85 = (float2(break84.z , break84.y));
  489. float2 coords97 = appendResult85 * temp_output_198_0;
  490. float2 id97 = 0;
  491. float2 uv97 = 0;
  492. float fade97 = 0.5;
  493. float voroi97 = 0;
  494. float rest97 = 0;
  495. for( int it97 = 0; it97 <3; it97++ ){
  496. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  497. rest97 += fade97;
  498. coords97 *= 2;
  499. fade97 *= 0.5;
  500. }//Voronoi97
  501. voroi97 /= rest97;
  502. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( v.normalOS, 0 ) ).xyz;
  503. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  504. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  505. float3 break104 = ( temp_output_93_0 / dotResult94 );
  506. float time96 = 217.0;
  507. float2 voronoiSmoothId96 = 0;
  508. float2 appendResult86 = (float2(break84.z , break84.x));
  509. float2 coords96 = appendResult86 * temp_output_198_0;
  510. float2 id96 = 0;
  511. float2 uv96 = 0;
  512. float fade96 = 0.5;
  513. float voroi96 = 0;
  514. float rest96 = 0;
  515. for( int it96 = 0; it96 <3; it96++ ){
  516. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  517. rest96 += fade96;
  518. coords96 *= 2;
  519. fade96 *= 0.5;
  520. }//Voronoi96
  521. voroi96 /= rest96;
  522. float time89 = 137.0;
  523. float2 voronoiSmoothId89 = 0;
  524. float2 appendResult87 = (float2(break84.x , break84.y));
  525. float2 coords89 = appendResult87 * temp_output_198_0;
  526. float2 id89 = 0;
  527. float2 uv89 = 0;
  528. float fade89 = 0.5;
  529. float voroi89 = 0;
  530. float rest89 = 0;
  531. for( int it89 = 0; it89 <3; it89++ ){
  532. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  533. rest89 += fade89;
  534. coords89 *= 2;
  535. fade89 *= 0.5;
  536. }//Voronoi89
  537. voroi89 /= rest89;
  538. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  539. float temp_output_122_0 = saturate( ( ( temp_output_118_0 * _NoiseStrength ) + ( temp_output_190_0 * _VoronoiStrength ) ) );
  540. float3 ase_objectScale = float3( length( GetObjectToWorldMatrix()[ 0 ].xyz ), length( GetObjectToWorldMatrix()[ 1 ].xyz ), length( GetObjectToWorldMatrix()[ 2 ].xyz ) );
  541. float3 temp_output_184_0 = ( ( ( temp_output_122_0 - 0.5 ) * v.normalOS * ( _NoiseDisplacement / Scale228 ) ) / ase_objectScale );
  542. float4 temp_output_2_0_g146 = _Mask0;
  543. float3 worldToObj306 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g146).xyz, 1 ) ).xyz;
  544. float3 ase_objectPosition = GetAbsolutePositionWS( UNITY_MATRIX_M._m03_m13_m23 );
  545. float4 appendResult313 = (float4((temp_output_2_0_g146).w , 0.0 , 0.0 , 0.0));
  546. float3 worldToObj307 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult313 ).xyz, 1 ) ).xyz;
  547. float3 temp_output_304_0 = ( temp_output_184_0 + ( min( ( distance( ( temp_output_184_0 + v.positionOS.xyz ) , worldToObj306 ) - length( worldToObj307 ) ) , 0.0 ) * v.normalOS ) );
  548. float4 temp_output_2_0_g153 = _Mask1;
  549. float3 worldToObj357 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g153).xyz, 1 ) ).xyz;
  550. float4 appendResult354 = (float4((temp_output_2_0_g153).w , 0.0 , 0.0 , 0.0));
  551. float3 worldToObj358 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult354 ).xyz, 1 ) ).xyz;
  552. float3 VertexOffset305 = ( temp_output_304_0 + ( min( ( distance( ( temp_output_304_0 + v.positionOS.xyz ) , worldToObj357 ) - length( worldToObj358 ) ) , 0.0 ) * v.normalOS ) );
  553. float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.positionOS.xyz));
  554. float eyeDepth = -objectToViewPos.z;
  555. o.ase_texcoord9.x = eyeDepth;
  556. o.ase_texcoord8 = v.positionOS;
  557. o.ase_normal = v.normalOS;
  558. o.ase_color = v.ase_color;
  559. //setting value to unused interpolator channels and avoid initialization warnings
  560. o.ase_texcoord9.yzw = 0;
  561. #ifdef ASE_ABSOLUTE_VERTEX_POS
  562. float3 defaultVertexValue = v.positionOS.xyz;
  563. #else
  564. float3 defaultVertexValue = float3(0, 0, 0);
  565. #endif
  566. float3 vertexValue = VertexOffset305;
  567. #ifdef ASE_ABSOLUTE_VERTEX_POS
  568. v.positionOS.xyz = vertexValue;
  569. #else
  570. v.positionOS.xyz += vertexValue;
  571. #endif
  572. v.normalOS = v.normalOS;
  573. v.tangentOS = v.tangentOS;
  574. VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
  575. VertexNormalInputs normalInput = GetVertexNormalInputs( v.normalOS, v.tangentOS );
  576. o.tSpace0 = float4( normalInput.normalWS, vertexInput.positionWS.x );
  577. o.tSpace1 = float4( normalInput.tangentWS, vertexInput.positionWS.y );
  578. o.tSpace2 = float4( normalInput.bitangentWS, vertexInput.positionWS.z );
  579. #if defined(LIGHTMAP_ON)
  580. OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy );
  581. #endif
  582. #if !defined(LIGHTMAP_ON)
  583. OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz );
  584. #endif
  585. #if defined(DYNAMICLIGHTMAP_ON)
  586. o.dynamicLightmapUV.xy = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
  587. #endif
  588. #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
  589. o.lightmapUVOrVertexSH.zw = v.texcoord.xy;
  590. o.lightmapUVOrVertexSH.xy = v.texcoord.xy * unity_LightmapST.xy + unity_LightmapST.zw;
  591. #endif
  592. half3 vertexLight = VertexLighting( vertexInput.positionWS, normalInput.normalWS );
  593. #ifdef ASE_FOG
  594. half fogFactor = ComputeFogFactor( vertexInput.positionCS.z );
  595. #else
  596. half fogFactor = 0;
  597. #endif
  598. o.fogFactorAndVertexLight = half4(fogFactor, vertexLight);
  599. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  600. o.shadowCoord = GetShadowCoord( vertexInput );
  601. #endif
  602. o.positionCS = vertexInput.positionCS;
  603. o.clipPosV = vertexInput.positionCS;
  604. return o;
  605. }
  606. #if defined(ASE_TESSELLATION)
  607. struct VertexControl
  608. {
  609. float4 vertex : INTERNALTESSPOS;
  610. float3 normalOS : NORMAL;
  611. float4 tangentOS : TANGENT;
  612. float4 texcoord : TEXCOORD0;
  613. float4 texcoord1 : TEXCOORD1;
  614. float4 texcoord2 : TEXCOORD2;
  615. float4 ase_color : COLOR;
  616. UNITY_VERTEX_INPUT_INSTANCE_ID
  617. };
  618. struct TessellationFactors
  619. {
  620. float edge[3] : SV_TessFactor;
  621. float inside : SV_InsideTessFactor;
  622. };
  623. VertexControl vert ( VertexInput v )
  624. {
  625. VertexControl o;
  626. UNITY_SETUP_INSTANCE_ID(v);
  627. UNITY_TRANSFER_INSTANCE_ID(v, o);
  628. o.vertex = v.positionOS;
  629. o.normalOS = v.normalOS;
  630. o.tangentOS = v.tangentOS;
  631. o.texcoord = v.texcoord;
  632. o.texcoord1 = v.texcoord1;
  633. o.texcoord2 = v.texcoord2;
  634. o.ase_color = v.ase_color;
  635. return o;
  636. }
  637. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  638. {
  639. TessellationFactors o;
  640. float4 tf = 1;
  641. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  642. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  643. #if defined(ASE_FIXED_TESSELLATION)
  644. tf = FixedTess( tessValue );
  645. #elif defined(ASE_DISTANCE_TESSELLATION)
  646. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  647. #elif defined(ASE_LENGTH_TESSELLATION)
  648. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  649. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  650. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  651. #endif
  652. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  653. return o;
  654. }
  655. [domain("tri")]
  656. [partitioning("fractional_odd")]
  657. [outputtopology("triangle_cw")]
  658. [patchconstantfunc("TessellationFunction")]
  659. [outputcontrolpoints(3)]
  660. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  661. {
  662. return patch[id];
  663. }
  664. [domain("tri")]
  665. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  666. {
  667. VertexInput o = (VertexInput) 0;
  668. o.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  669. o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  670. o.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z;
  671. o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z;
  672. o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
  673. o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z;
  674. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  675. #if defined(ASE_PHONG_TESSELLATION)
  676. float3 pp[3];
  677. for (int i = 0; i < 3; ++i)
  678. pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  679. float phongStrength = _TessPhongStrength;
  680. o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz;
  681. #endif
  682. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  683. return VertexFunction(o);
  684. }
  685. #else
  686. VertexOutput vert ( VertexInput v )
  687. {
  688. return VertexFunction( v );
  689. }
  690. #endif
  691. half4 frag ( VertexOutput IN
  692. #ifdef ASE_DEPTH_WRITE_ON
  693. ,out float outputDepth : ASE_SV_DEPTH
  694. #endif
  695. #ifdef _WRITE_RENDERING_LAYERS
  696. , out float4 outRenderingLayers : SV_Target1
  697. #endif
  698. ) : SV_Target
  699. {
  700. UNITY_SETUP_INSTANCE_ID(IN);
  701. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
  702. #if defined(LOD_FADE_CROSSFADE)
  703. LODFadeCrossFade( IN.positionCS );
  704. #endif
  705. #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
  706. float2 sampleCoords = (IN.lightmapUVOrVertexSH.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy;
  707. float3 WorldNormal = TransformObjectToWorldNormal(normalize(SAMPLE_TEXTURE2D(_TerrainNormalmapTexture, sampler_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1));
  708. float3 WorldTangent = -cross(GetObjectToWorldMatrix()._13_23_33, WorldNormal);
  709. float3 WorldBiTangent = cross(WorldNormal, -WorldTangent);
  710. #else
  711. float3 WorldNormal = normalize( IN.tSpace0.xyz );
  712. float3 WorldTangent = IN.tSpace1.xyz;
  713. float3 WorldBiTangent = IN.tSpace2.xyz;
  714. #endif
  715. float3 WorldPosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w);
  716. float3 WorldViewDirection = _WorldSpaceCameraPos.xyz - WorldPosition;
  717. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  718. float4 ClipPos = IN.clipPosV;
  719. float4 ScreenPos = ComputeScreenPos( IN.clipPosV );
  720. float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.positionCS);
  721. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  722. ShadowCoords = IN.shadowCoord;
  723. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  724. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  725. #endif
  726. WorldViewDirection = SafeNormalize( WorldViewDirection );
  727. #if ( SHADER_TARGET >= 50 )
  728. float recip367 = rcp( _Scale );
  729. #else
  730. float recip367 = 1.0 / _Scale;
  731. #endif
  732. float Scale228 = recip367;
  733. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  734. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  735. float3 break332 = WindDir317;
  736. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  737. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  738. float4 WindDirWeights341 = appendResult340;
  739. float4 break344 = abs( WindDirWeights341 );
  740. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  741. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  742. float4 transform70 = mul(GetObjectToWorldMatrix(),IN.ase_texcoord8);
  743. float4 temp_output_71_0 = (transform70).xyzw;
  744. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  745. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  746. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  747. float NoiseColor3D151 = temp_output_118_0;
  748. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  749. float time97 = 0.0;
  750. float2 voronoiSmoothId97 = 0;
  751. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  752. float2 appendResult85 = (float2(break84.z , break84.y));
  753. float2 coords97 = appendResult85 * temp_output_198_0;
  754. float2 id97 = 0;
  755. float2 uv97 = 0;
  756. float fade97 = 0.5;
  757. float voroi97 = 0;
  758. float rest97 = 0;
  759. for( int it97 = 0; it97 <3; it97++ ){
  760. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  761. rest97 += fade97;
  762. coords97 *= 2;
  763. fade97 *= 0.5;
  764. }//Voronoi97
  765. voroi97 /= rest97;
  766. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( IN.ase_normal, 0 ) ).xyz;
  767. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  768. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  769. float3 break104 = ( temp_output_93_0 / dotResult94 );
  770. float time96 = 217.0;
  771. float2 voronoiSmoothId96 = 0;
  772. float2 appendResult86 = (float2(break84.z , break84.x));
  773. float2 coords96 = appendResult86 * temp_output_198_0;
  774. float2 id96 = 0;
  775. float2 uv96 = 0;
  776. float fade96 = 0.5;
  777. float voroi96 = 0;
  778. float rest96 = 0;
  779. for( int it96 = 0; it96 <3; it96++ ){
  780. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  781. rest96 += fade96;
  782. coords96 *= 2;
  783. fade96 *= 0.5;
  784. }//Voronoi96
  785. voroi96 /= rest96;
  786. float time89 = 137.0;
  787. float2 voronoiSmoothId89 = 0;
  788. float2 appendResult87 = (float2(break84.x , break84.y));
  789. float2 coords89 = appendResult87 * temp_output_198_0;
  790. float2 id89 = 0;
  791. float2 uv89 = 0;
  792. float fade89 = 0.5;
  793. float voroi89 = 0;
  794. float rest89 = 0;
  795. for( int it89 = 0; it89 <3; it89++ ){
  796. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  797. rest89 += fade89;
  798. coords89 *= 2;
  799. fade89 *= 0.5;
  800. }//Voronoi89
  801. voroi89 /= rest89;
  802. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  803. float NoiseColorVoronoi152 = temp_output_190_0;
  804. float lerpResult157 = lerp( NoiseColor3D151 , NoiseColorVoronoi152 , _NoiseColorMix);
  805. float NoiseColorMix158 = lerpResult157;
  806. float3 temp_cast_3 = (NoiseColorMix158).xxx;
  807. float temp_output_2_0_g159 = _NoiseColorStrength;
  808. float temp_output_3_0_g159 = ( 1.0 - temp_output_2_0_g159 );
  809. float3 appendResult7_g159 = (float3(temp_output_3_0_g159 , temp_output_3_0_g159 , temp_output_3_0_g159));
  810. float3 temp_output_21_0 = ( ( temp_cast_3 * temp_output_2_0_g159 ) + appendResult7_g159 );
  811. float4 lerpResult161 = lerp( _BaseColor , IN.ase_color , _VertexColorStrength);
  812. float4 Albedo30 = saturate( ( float4( temp_output_21_0 , 0.0 ) * lerpResult161 ) );
  813. float3 temp_cast_6 = (NoiseColorMix158).xxx;
  814. float temp_output_2_0_g157 = _EmmissiveNoiseColor;
  815. float temp_output_3_0_g157 = ( 1.0 - temp_output_2_0_g157 );
  816. float3 appendResult7_g157 = (float3(temp_output_3_0_g157 , temp_output_3_0_g157 , temp_output_3_0_g157));
  817. float4 ase_screenPosNorm = ScreenPos / ScreenPos.w;
  818. ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
  819. float clampDepth368 = SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy );
  820. float temp_output_385_0 = abs( ( _ProjectionParams.z - _ProjectionParams.y ) );
  821. float eyeDepth = IN.ase_texcoord9.x;
  822. float cameraDepthFade389 = (( eyeDepth -_ProjectionParams.y - 0.0 ) / temp_output_385_0);
  823. float temp_output_1_0_g160 = saturate( ( ( ( ( 1.0 - clampDepth368 ) - cameraDepthFade389 ) * temp_output_385_0 ) / _DepthDistance ) );
  824. float DepthFade43 = saturate( ( ( ( pow( temp_output_1_0_g160 , 5.0 ) * 6.0 ) - ( pow( temp_output_1_0_g160 , 4.0 ) * 15.0 ) ) + ( pow( temp_output_1_0_g160 , 3.0 ) * 10.0 ) ) );
  825. float3 temp_cast_8 = (DepthFade43).xxx;
  826. float temp_output_2_0_g158 = _EmmissiveDepthFade;
  827. float temp_output_3_0_g158 = ( 1.0 - temp_output_2_0_g158 );
  828. float3 appendResult7_g158 = (float3(temp_output_3_0_g158 , temp_output_3_0_g158 , temp_output_3_0_g158));
  829. float4 temp_output_2_0_g155 = lerpResult161;
  830. float BaseColorAlpha162 = (temp_output_2_0_g155).a;
  831. float3 BaseColor = Albedo30.rgb;
  832. float3 Normal = float3(0, 0, 1);
  833. float3 Emission = ( ( _EmmissiveColor * float4( ( ( temp_cast_6 * temp_output_2_0_g157 ) + appendResult7_g157 ) , 0.0 ) ) * float4( ( ( temp_cast_8 * temp_output_2_0_g158 ) + appendResult7_g158 ) , 0.0 ) ).rgb;
  834. float3 Specular = 0.5;
  835. float Metallic = 0.0;
  836. float Smoothness = 0.0;
  837. float Occlusion = 1;
  838. float Alpha = ( DepthFade43 * BaseColorAlpha162 );
  839. float AlphaClipThreshold = 0.0;
  840. float AlphaClipThresholdShadow = 0.5;
  841. float3 BakedGI = 0;
  842. float3 RefractionColor = 1;
  843. float RefractionIndex = 1;
  844. float3 Transmission = 1;
  845. float3 Translucency = 1;
  846. #ifdef ASE_DEPTH_WRITE_ON
  847. float DepthValue = IN.positionCS.z;
  848. #endif
  849. #ifdef _CLEARCOAT
  850. float CoatMask = 0;
  851. float CoatSmoothness = 0;
  852. #endif
  853. #ifdef _ALPHATEST_ON
  854. clip(Alpha - AlphaClipThreshold);
  855. #endif
  856. InputData inputData = (InputData)0;
  857. inputData.positionWS = WorldPosition;
  858. inputData.viewDirectionWS = WorldViewDirection;
  859. #ifdef _NORMALMAP
  860. #if _NORMAL_DROPOFF_TS
  861. inputData.normalWS = TransformTangentToWorld(Normal, half3x3(WorldTangent, WorldBiTangent, WorldNormal));
  862. #elif _NORMAL_DROPOFF_OS
  863. inputData.normalWS = TransformObjectToWorldNormal(Normal);
  864. #elif _NORMAL_DROPOFF_WS
  865. inputData.normalWS = Normal;
  866. #endif
  867. inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS);
  868. #else
  869. inputData.normalWS = WorldNormal;
  870. #endif
  871. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  872. inputData.shadowCoord = ShadowCoords;
  873. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  874. inputData.shadowCoord = TransformWorldToShadowCoord(inputData.positionWS);
  875. #else
  876. inputData.shadowCoord = float4(0, 0, 0, 0);
  877. #endif
  878. #ifdef ASE_FOG
  879. inputData.fogCoord = IN.fogFactorAndVertexLight.x;
  880. #endif
  881. inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw;
  882. #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
  883. float3 SH = SampleSH(inputData.normalWS.xyz);
  884. #else
  885. float3 SH = IN.lightmapUVOrVertexSH.xyz;
  886. #endif
  887. #if defined(DYNAMICLIGHTMAP_ON)
  888. inputData.bakedGI = SAMPLE_GI(IN.lightmapUVOrVertexSH.xy, IN.dynamicLightmapUV.xy, SH, inputData.normalWS);
  889. #else
  890. inputData.bakedGI = SAMPLE_GI(IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS);
  891. #endif
  892. #ifdef ASE_BAKEDGI
  893. inputData.bakedGI = BakedGI;
  894. #endif
  895. inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV;
  896. inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy);
  897. #if defined(DEBUG_DISPLAY)
  898. #if defined(DYNAMICLIGHTMAP_ON)
  899. inputData.dynamicLightmapUV = IN.dynamicLightmapUV.xy;
  900. #endif
  901. #if defined(LIGHTMAP_ON)
  902. inputData.staticLightmapUV = IN.lightmapUVOrVertexSH.xy;
  903. #else
  904. inputData.vertexSH = SH;
  905. #endif
  906. #endif
  907. SurfaceData surfaceData;
  908. surfaceData.albedo = BaseColor;
  909. surfaceData.metallic = saturate(Metallic);
  910. surfaceData.specular = Specular;
  911. surfaceData.smoothness = saturate(Smoothness),
  912. surfaceData.occlusion = Occlusion,
  913. surfaceData.emission = Emission,
  914. surfaceData.alpha = saturate(Alpha);
  915. surfaceData.normalTS = Normal;
  916. surfaceData.clearCoatMask = 0;
  917. surfaceData.clearCoatSmoothness = 1;
  918. #ifdef _CLEARCOAT
  919. surfaceData.clearCoatMask = saturate(CoatMask);
  920. surfaceData.clearCoatSmoothness = saturate(CoatSmoothness);
  921. #endif
  922. #ifdef _DBUFFER
  923. ApplyDecalToSurfaceData(IN.positionCS, surfaceData, inputData);
  924. #endif
  925. #ifdef _ASE_LIGHTING_SIMPLE
  926. half4 color = UniversalFragmentBlinnPhong( inputData, surfaceData);
  927. #else
  928. half4 color = UniversalFragmentPBR( inputData, surfaceData);
  929. #endif
  930. #ifdef ASE_TRANSMISSION
  931. {
  932. float shadow = _TransmissionShadow;
  933. #define SUM_LIGHT_TRANSMISSION(Light)\
  934. float3 atten = Light.color * Light.distanceAttenuation;\
  935. atten = lerp( atten, atten * Light.shadowAttenuation, shadow );\
  936. half3 transmission = max( 0, -dot( inputData.normalWS, Light.direction ) ) * atten * Transmission;\
  937. color.rgb += BaseColor * transmission;
  938. SUM_LIGHT_TRANSMISSION( GetMainLight( inputData.shadowCoord ) );
  939. #if defined(_ADDITIONAL_LIGHTS)
  940. uint meshRenderingLayers = GetMeshRenderingLayer();
  941. uint pixelLightCount = GetAdditionalLightsCount();
  942. #if USE_FORWARD_PLUS
  943. for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++)
  944. {
  945. FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK
  946. Light light = GetAdditionalLight(lightIndex, inputData.positionWS);
  947. #ifdef _LIGHT_LAYERS
  948. if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
  949. #endif
  950. {
  951. SUM_LIGHT_TRANSMISSION( light );
  952. }
  953. }
  954. #endif
  955. LIGHT_LOOP_BEGIN( pixelLightCount )
  956. Light light = GetAdditionalLight(lightIndex, inputData.positionWS);
  957. #ifdef _LIGHT_LAYERS
  958. if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
  959. #endif
  960. {
  961. SUM_LIGHT_TRANSMISSION( light );
  962. }
  963. LIGHT_LOOP_END
  964. #endif
  965. }
  966. #endif
  967. #ifdef ASE_TRANSLUCENCY
  968. {
  969. float shadow = _TransShadow;
  970. float normal = _TransNormal;
  971. float scattering = _TransScattering;
  972. float direct = _TransDirect;
  973. float ambient = _TransAmbient;
  974. float strength = _TransStrength;
  975. #define SUM_LIGHT_TRANSLUCENCY(Light)\
  976. float3 atten = Light.color * Light.distanceAttenuation;\
  977. atten = lerp( atten, atten * Light.shadowAttenuation, shadow );\
  978. half3 lightDir = Light.direction + inputData.normalWS * normal;\
  979. half VdotL = pow( saturate( dot( inputData.viewDirectionWS, -lightDir ) ), scattering );\
  980. half3 translucency = atten * ( VdotL * direct + inputData.bakedGI * ambient ) * Translucency;\
  981. color.rgb += BaseColor * translucency * strength;
  982. SUM_LIGHT_TRANSLUCENCY( GetMainLight( inputData.shadowCoord ) );
  983. #if defined(_ADDITIONAL_LIGHTS)
  984. uint meshRenderingLayers = GetMeshRenderingLayer();
  985. uint pixelLightCount = GetAdditionalLightsCount();
  986. #if USE_FORWARD_PLUS
  987. for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++)
  988. {
  989. FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK
  990. Light light = GetAdditionalLight(lightIndex, inputData.positionWS);
  991. #ifdef _LIGHT_LAYERS
  992. if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
  993. #endif
  994. {
  995. SUM_LIGHT_TRANSLUCENCY( light );
  996. }
  997. }
  998. #endif
  999. LIGHT_LOOP_BEGIN( pixelLightCount )
  1000. Light light = GetAdditionalLight(lightIndex, inputData.positionWS);
  1001. #ifdef _LIGHT_LAYERS
  1002. if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
  1003. #endif
  1004. {
  1005. SUM_LIGHT_TRANSLUCENCY( light );
  1006. }
  1007. LIGHT_LOOP_END
  1008. #endif
  1009. }
  1010. #endif
  1011. #ifdef ASE_REFRACTION
  1012. float4 projScreenPos = ScreenPos / ScreenPos.w;
  1013. float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, float4( WorldNormal,0 ) ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) );
  1014. projScreenPos.xy += refractionOffset.xy;
  1015. float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos.xy ) * RefractionColor;
  1016. color.rgb = lerp( refraction, color.rgb, color.a );
  1017. color.a = 1;
  1018. #endif
  1019. #ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY
  1020. color.rgb *= color.a;
  1021. #endif
  1022. #ifdef ASE_FOG
  1023. #ifdef TERRAIN_SPLAT_ADDPASS
  1024. color.rgb = MixFogColor(color.rgb, half3( 0, 0, 0 ), IN.fogFactorAndVertexLight.x );
  1025. #else
  1026. color.rgb = MixFog(color.rgb, IN.fogFactorAndVertexLight.x);
  1027. #endif
  1028. #endif
  1029. #ifdef ASE_DEPTH_WRITE_ON
  1030. outputDepth = DepthValue;
  1031. #endif
  1032. #ifdef _WRITE_RENDERING_LAYERS
  1033. uint renderingLayers = GetMeshRenderingLayer();
  1034. outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 );
  1035. #endif
  1036. return color;
  1037. }
  1038. ENDHLSL
  1039. }
  1040. Pass
  1041. {
  1042. Name "DepthOnly"
  1043. Tags { "LightMode"="DepthOnly" }
  1044. ZWrite On
  1045. ColorMask R
  1046. AlphaToMask Off
  1047. HLSLPROGRAM
  1048. #define _NORMAL_DROPOFF_TS 1
  1049. #pragma multi_compile_instancing
  1050. #pragma multi_compile _ LOD_FADE_CROSSFADE
  1051. #define ASE_FOG 1
  1052. #define ASE_PHONG_TESSELLATION
  1053. #define ASE_DEPTH_WRITE_ON
  1054. #define ASE_TESSELLATION 1
  1055. #pragma require tessellation tessHW
  1056. #pragma hull HullFunction
  1057. #pragma domain DomainFunction
  1058. #define ASE_TRANSLUCENCY 1
  1059. #define ASE_LENGTH_TESSELLATION
  1060. #define _SURFACE_TYPE_TRANSPARENT 1
  1061. #define _EMISSION
  1062. #define _ALPHATEST_ON 1
  1063. #define ASE_SRP_VERSION 140004
  1064. #define REQUIRE_DEPTH_TEXTURE 1
  1065. #pragma multi_compile _ DOTS_INSTANCING_ON
  1066. #pragma vertex vert
  1067. #pragma fragment frag
  1068. #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE)
  1069. #define _SPECULAR_COLOR 1
  1070. #endif
  1071. #define SHADERPASS SHADERPASS_DEPTHONLY
  1072. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1073. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1074. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1075. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1076. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  1077. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1078. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1079. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1080. #if defined(LOD_FADE_CROSSFADE)
  1081. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  1082. #endif
  1083. #define ASE_NEEDS_VERT_POSITION
  1084. #define ASE_NEEDS_VERT_NORMAL
  1085. #define ASE_NEEDS_FRAG_SCREEN_POSITION
  1086. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
  1087. #define ASE_SV_DEPTH SV_DepthLessEqual
  1088. #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
  1089. #else
  1090. #define ASE_SV_DEPTH SV_Depth
  1091. #define ASE_SV_POSITION_QUALIFIERS
  1092. #endif
  1093. struct VertexInput
  1094. {
  1095. float4 positionOS : POSITION;
  1096. float3 normalOS : NORMAL;
  1097. float4 ase_color : COLOR;
  1098. UNITY_VERTEX_INPUT_INSTANCE_ID
  1099. };
  1100. struct VertexOutput
  1101. {
  1102. ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
  1103. float4 clipPosV : TEXCOORD0;
  1104. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1105. float3 positionWS : TEXCOORD1;
  1106. #endif
  1107. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1108. float4 shadowCoord : TEXCOORD2;
  1109. #endif
  1110. float4 ase_texcoord3 : TEXCOORD3;
  1111. float4 ase_color : COLOR;
  1112. UNITY_VERTEX_INPUT_INSTANCE_ID
  1113. UNITY_VERTEX_OUTPUT_STEREO
  1114. };
  1115. CBUFFER_START(UnityPerMaterial)
  1116. float4 _EmmissiveColor;
  1117. float4 _BaseColor;
  1118. float4 _Mask1;
  1119. float4 _Mask0;
  1120. float3 _NoiseScale3D;
  1121. float3 _WindDirection;
  1122. float3 _AdditionalNoiseDir;
  1123. float3 _AdditionalVoronoiDir;
  1124. float _Scale;
  1125. float _EmmissiveNoiseColor;
  1126. float _VertexColorStrength;
  1127. float _NoiseColorStrength;
  1128. float _NoiseColorMix;
  1129. float _VoronoiStrength;
  1130. float _DepthDistance;
  1131. float _VorSpeed;
  1132. float _VoronoiScale;
  1133. float _NoiseStrength;
  1134. float _NoiseScale;
  1135. float _WindSpeed;
  1136. float _NoiseSpeed;
  1137. float _NoiseDisplacement;
  1138. float _EmmissiveDepthFade;
  1139. #ifdef ASE_TRANSMISSION
  1140. float _TransmissionShadow;
  1141. #endif
  1142. #ifdef ASE_TRANSLUCENCY
  1143. float _TransStrength;
  1144. float _TransNormal;
  1145. float _TransScattering;
  1146. float _TransDirect;
  1147. float _TransAmbient;
  1148. float _TransShadow;
  1149. #endif
  1150. #ifdef ASE_TESSELLATION
  1151. float _TessPhongStrength;
  1152. float _TessValue;
  1153. float _TessMin;
  1154. float _TessMax;
  1155. float _TessEdgeLength;
  1156. float _TessMaxDisp;
  1157. #endif
  1158. CBUFFER_END
  1159. #ifdef SCENEPICKINGPASS
  1160. float4 _SelectionID;
  1161. #endif
  1162. #ifdef SCENESELECTIONPASS
  1163. int _ObjectId;
  1164. int _PassValue;
  1165. #endif
  1166. float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
  1167. float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
  1168. float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
  1169. float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
  1170. float snoise( float3 v )
  1171. {
  1172. const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
  1173. float3 i = floor( v + dot( v, C.yyy ) );
  1174. float3 x0 = v - i + dot( i, C.xxx );
  1175. float3 g = step( x0.yzx, x0.xyz );
  1176. float3 l = 1.0 - g;
  1177. float3 i1 = min( g.xyz, l.zxy );
  1178. float3 i2 = max( g.xyz, l.zxy );
  1179. float3 x1 = x0 - i1 + C.xxx;
  1180. float3 x2 = x0 - i2 + C.yyy;
  1181. float3 x3 = x0 - 0.5;
  1182. i = mod3D289( i);
  1183. float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
  1184. float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
  1185. float4 x_ = floor( j / 7.0 );
  1186. float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
  1187. float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  1188. float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  1189. float4 h = 1.0 - abs( x ) - abs( y );
  1190. float4 b0 = float4( x.xy, y.xy );
  1191. float4 b1 = float4( x.zw, y.zw );
  1192. float4 s0 = floor( b0 ) * 2.0 + 1.0;
  1193. float4 s1 = floor( b1 ) * 2.0 + 1.0;
  1194. float4 sh = -step( h, 0.0 );
  1195. float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
  1196. float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
  1197. float3 g0 = float3( a0.xy, h.x );
  1198. float3 g1 = float3( a0.zw, h.y );
  1199. float3 g2 = float3( a1.xy, h.z );
  1200. float3 g3 = float3( a1.zw, h.w );
  1201. float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
  1202. g0 *= norm.x;
  1203. g1 *= norm.y;
  1204. g2 *= norm.z;
  1205. g3 *= norm.w;
  1206. float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
  1207. m = m* m;
  1208. m = m* m;
  1209. float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
  1210. return 42.0 * dot( m, px);
  1211. }
  1212. float2 voronoihash97( float2 p )
  1213. {
  1214. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  1215. return frac( sin( p ) *43758.5453);
  1216. }
  1217. float voronoi97( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  1218. {
  1219. float2 n = floor( v );
  1220. float2 f = frac( v );
  1221. float F1 = 8.0;
  1222. float F2 = 8.0; float2 mg = 0;
  1223. for ( int j = -1; j <= 1; j++ )
  1224. {
  1225. for ( int i = -1; i <= 1; i++ )
  1226. {
  1227. float2 g = float2( i, j );
  1228. float2 o = voronoihash97( n + g );
  1229. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  1230. float d = 0.5 * dot( r, r );
  1231. if( d<F1 ) {
  1232. F2 = F1;
  1233. F1 = d; mg = g; mr = r; id = o;
  1234. } else if( d<F2 ) {
  1235. F2 = d;
  1236. }
  1237. }
  1238. }
  1239. return F1;
  1240. }
  1241. float2 voronoihash96( float2 p )
  1242. {
  1243. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  1244. return frac( sin( p ) *43758.5453);
  1245. }
  1246. float voronoi96( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  1247. {
  1248. float2 n = floor( v );
  1249. float2 f = frac( v );
  1250. float F1 = 8.0;
  1251. float F2 = 8.0; float2 mg = 0;
  1252. for ( int j = -1; j <= 1; j++ )
  1253. {
  1254. for ( int i = -1; i <= 1; i++ )
  1255. {
  1256. float2 g = float2( i, j );
  1257. float2 o = voronoihash96( n + g );
  1258. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  1259. float d = 0.5 * dot( r, r );
  1260. if( d<F1 ) {
  1261. F2 = F1;
  1262. F1 = d; mg = g; mr = r; id = o;
  1263. } else if( d<F2 ) {
  1264. F2 = d;
  1265. }
  1266. }
  1267. }
  1268. return F1;
  1269. }
  1270. float2 voronoihash89( float2 p )
  1271. {
  1272. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  1273. return frac( sin( p ) *43758.5453);
  1274. }
  1275. float voronoi89( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  1276. {
  1277. float2 n = floor( v );
  1278. float2 f = frac( v );
  1279. float F1 = 8.0;
  1280. float F2 = 8.0; float2 mg = 0;
  1281. for ( int j = -1; j <= 1; j++ )
  1282. {
  1283. for ( int i = -1; i <= 1; i++ )
  1284. {
  1285. float2 g = float2( i, j );
  1286. float2 o = voronoihash89( n + g );
  1287. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  1288. float d = 0.5 * dot( r, r );
  1289. if( d<F1 ) {
  1290. F2 = F1;
  1291. F1 = d; mg = g; mr = r; id = o;
  1292. } else if( d<F2 ) {
  1293. F2 = d;
  1294. }
  1295. }
  1296. }
  1297. return F1;
  1298. }
  1299. VertexOutput VertexFunction( VertexInput v )
  1300. {
  1301. VertexOutput o = (VertexOutput)0;
  1302. UNITY_SETUP_INSTANCE_ID(v);
  1303. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1304. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1305. #if ( SHADER_TARGET >= 50 )
  1306. float recip367 = rcp( _Scale );
  1307. #else
  1308. float recip367 = 1.0 / _Scale;
  1309. #endif
  1310. float Scale228 = recip367;
  1311. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  1312. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  1313. float3 break332 = WindDir317;
  1314. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  1315. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  1316. float4 WindDirWeights341 = appendResult340;
  1317. float4 break344 = abs( WindDirWeights341 );
  1318. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  1319. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  1320. float4 transform70 = mul(GetObjectToWorldMatrix(),v.positionOS);
  1321. float4 temp_output_71_0 = (transform70).xyzw;
  1322. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  1323. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  1324. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  1325. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  1326. float time97 = 0.0;
  1327. float2 voronoiSmoothId97 = 0;
  1328. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  1329. float2 appendResult85 = (float2(break84.z , break84.y));
  1330. float2 coords97 = appendResult85 * temp_output_198_0;
  1331. float2 id97 = 0;
  1332. float2 uv97 = 0;
  1333. float fade97 = 0.5;
  1334. float voroi97 = 0;
  1335. float rest97 = 0;
  1336. for( int it97 = 0; it97 <3; it97++ ){
  1337. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  1338. rest97 += fade97;
  1339. coords97 *= 2;
  1340. fade97 *= 0.5;
  1341. }//Voronoi97
  1342. voroi97 /= rest97;
  1343. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( v.normalOS, 0 ) ).xyz;
  1344. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  1345. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  1346. float3 break104 = ( temp_output_93_0 / dotResult94 );
  1347. float time96 = 217.0;
  1348. float2 voronoiSmoothId96 = 0;
  1349. float2 appendResult86 = (float2(break84.z , break84.x));
  1350. float2 coords96 = appendResult86 * temp_output_198_0;
  1351. float2 id96 = 0;
  1352. float2 uv96 = 0;
  1353. float fade96 = 0.5;
  1354. float voroi96 = 0;
  1355. float rest96 = 0;
  1356. for( int it96 = 0; it96 <3; it96++ ){
  1357. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  1358. rest96 += fade96;
  1359. coords96 *= 2;
  1360. fade96 *= 0.5;
  1361. }//Voronoi96
  1362. voroi96 /= rest96;
  1363. float time89 = 137.0;
  1364. float2 voronoiSmoothId89 = 0;
  1365. float2 appendResult87 = (float2(break84.x , break84.y));
  1366. float2 coords89 = appendResult87 * temp_output_198_0;
  1367. float2 id89 = 0;
  1368. float2 uv89 = 0;
  1369. float fade89 = 0.5;
  1370. float voroi89 = 0;
  1371. float rest89 = 0;
  1372. for( int it89 = 0; it89 <3; it89++ ){
  1373. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  1374. rest89 += fade89;
  1375. coords89 *= 2;
  1376. fade89 *= 0.5;
  1377. }//Voronoi89
  1378. voroi89 /= rest89;
  1379. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  1380. float temp_output_122_0 = saturate( ( ( temp_output_118_0 * _NoiseStrength ) + ( temp_output_190_0 * _VoronoiStrength ) ) );
  1381. float3 ase_objectScale = float3( length( GetObjectToWorldMatrix()[ 0 ].xyz ), length( GetObjectToWorldMatrix()[ 1 ].xyz ), length( GetObjectToWorldMatrix()[ 2 ].xyz ) );
  1382. float3 temp_output_184_0 = ( ( ( temp_output_122_0 - 0.5 ) * v.normalOS * ( _NoiseDisplacement / Scale228 ) ) / ase_objectScale );
  1383. float4 temp_output_2_0_g146 = _Mask0;
  1384. float3 worldToObj306 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g146).xyz, 1 ) ).xyz;
  1385. float3 ase_objectPosition = GetAbsolutePositionWS( UNITY_MATRIX_M._m03_m13_m23 );
  1386. float4 appendResult313 = (float4((temp_output_2_0_g146).w , 0.0 , 0.0 , 0.0));
  1387. float3 worldToObj307 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult313 ).xyz, 1 ) ).xyz;
  1388. float3 temp_output_304_0 = ( temp_output_184_0 + ( min( ( distance( ( temp_output_184_0 + v.positionOS.xyz ) , worldToObj306 ) - length( worldToObj307 ) ) , 0.0 ) * v.normalOS ) );
  1389. float4 temp_output_2_0_g153 = _Mask1;
  1390. float3 worldToObj357 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g153).xyz, 1 ) ).xyz;
  1391. float4 appendResult354 = (float4((temp_output_2_0_g153).w , 0.0 , 0.0 , 0.0));
  1392. float3 worldToObj358 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult354 ).xyz, 1 ) ).xyz;
  1393. float3 VertexOffset305 = ( temp_output_304_0 + ( min( ( distance( ( temp_output_304_0 + v.positionOS.xyz ) , worldToObj357 ) - length( worldToObj358 ) ) , 0.0 ) * v.normalOS ) );
  1394. float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.positionOS.xyz));
  1395. float eyeDepth = -objectToViewPos.z;
  1396. o.ase_texcoord3.x = eyeDepth;
  1397. o.ase_color = v.ase_color;
  1398. //setting value to unused interpolator channels and avoid initialization warnings
  1399. o.ase_texcoord3.yzw = 0;
  1400. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1401. float3 defaultVertexValue = v.positionOS.xyz;
  1402. #else
  1403. float3 defaultVertexValue = float3(0, 0, 0);
  1404. #endif
  1405. float3 vertexValue = VertexOffset305;
  1406. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1407. v.positionOS.xyz = vertexValue;
  1408. #else
  1409. v.positionOS.xyz += vertexValue;
  1410. #endif
  1411. v.normalOS = v.normalOS;
  1412. VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
  1413. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1414. o.positionWS = vertexInput.positionWS;
  1415. #endif
  1416. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1417. o.shadowCoord = GetShadowCoord( vertexInput );
  1418. #endif
  1419. o.positionCS = vertexInput.positionCS;
  1420. o.clipPosV = vertexInput.positionCS;
  1421. return o;
  1422. }
  1423. #if defined(ASE_TESSELLATION)
  1424. struct VertexControl
  1425. {
  1426. float4 vertex : INTERNALTESSPOS;
  1427. float3 normalOS : NORMAL;
  1428. float4 ase_color : COLOR;
  1429. UNITY_VERTEX_INPUT_INSTANCE_ID
  1430. };
  1431. struct TessellationFactors
  1432. {
  1433. float edge[3] : SV_TessFactor;
  1434. float inside : SV_InsideTessFactor;
  1435. };
  1436. VertexControl vert ( VertexInput v )
  1437. {
  1438. VertexControl o;
  1439. UNITY_SETUP_INSTANCE_ID(v);
  1440. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1441. o.vertex = v.positionOS;
  1442. o.normalOS = v.normalOS;
  1443. o.ase_color = v.ase_color;
  1444. return o;
  1445. }
  1446. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1447. {
  1448. TessellationFactors o;
  1449. float4 tf = 1;
  1450. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1451. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1452. #if defined(ASE_FIXED_TESSELLATION)
  1453. tf = FixedTess( tessValue );
  1454. #elif defined(ASE_DISTANCE_TESSELLATION)
  1455. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1456. #elif defined(ASE_LENGTH_TESSELLATION)
  1457. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1458. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1459. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1460. #endif
  1461. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1462. return o;
  1463. }
  1464. [domain("tri")]
  1465. [partitioning("fractional_odd")]
  1466. [outputtopology("triangle_cw")]
  1467. [patchconstantfunc("TessellationFunction")]
  1468. [outputcontrolpoints(3)]
  1469. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1470. {
  1471. return patch[id];
  1472. }
  1473. [domain("tri")]
  1474. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1475. {
  1476. VertexInput o = (VertexInput) 0;
  1477. o.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1478. o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  1479. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1480. #if defined(ASE_PHONG_TESSELLATION)
  1481. float3 pp[3];
  1482. for (int i = 0; i < 3; ++i)
  1483. pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  1484. float phongStrength = _TessPhongStrength;
  1485. o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz;
  1486. #endif
  1487. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1488. return VertexFunction(o);
  1489. }
  1490. #else
  1491. VertexOutput vert ( VertexInput v )
  1492. {
  1493. return VertexFunction( v );
  1494. }
  1495. #endif
  1496. half4 frag( VertexOutput IN
  1497. #ifdef ASE_DEPTH_WRITE_ON
  1498. ,out float outputDepth : ASE_SV_DEPTH
  1499. #endif
  1500. ) : SV_TARGET
  1501. {
  1502. UNITY_SETUP_INSTANCE_ID(IN);
  1503. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  1504. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1505. float3 WorldPosition = IN.positionWS;
  1506. #endif
  1507. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  1508. float4 ClipPos = IN.clipPosV;
  1509. float4 ScreenPos = ComputeScreenPos( IN.clipPosV );
  1510. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1511. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  1512. ShadowCoords = IN.shadowCoord;
  1513. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  1514. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  1515. #endif
  1516. #endif
  1517. float4 ase_screenPosNorm = ScreenPos / ScreenPos.w;
  1518. ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
  1519. float clampDepth368 = SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy );
  1520. float temp_output_385_0 = abs( ( _ProjectionParams.z - _ProjectionParams.y ) );
  1521. float eyeDepth = IN.ase_texcoord3.x;
  1522. float cameraDepthFade389 = (( eyeDepth -_ProjectionParams.y - 0.0 ) / temp_output_385_0);
  1523. float temp_output_1_0_g160 = saturate( ( ( ( ( 1.0 - clampDepth368 ) - cameraDepthFade389 ) * temp_output_385_0 ) / _DepthDistance ) );
  1524. float DepthFade43 = saturate( ( ( ( pow( temp_output_1_0_g160 , 5.0 ) * 6.0 ) - ( pow( temp_output_1_0_g160 , 4.0 ) * 15.0 ) ) + ( pow( temp_output_1_0_g160 , 3.0 ) * 10.0 ) ) );
  1525. float4 lerpResult161 = lerp( _BaseColor , IN.ase_color , _VertexColorStrength);
  1526. float4 temp_output_2_0_g155 = lerpResult161;
  1527. float BaseColorAlpha162 = (temp_output_2_0_g155).a;
  1528. float Alpha = ( DepthFade43 * BaseColorAlpha162 );
  1529. float AlphaClipThreshold = 0.0;
  1530. #ifdef ASE_DEPTH_WRITE_ON
  1531. float DepthValue = IN.positionCS.z;
  1532. #endif
  1533. #ifdef _ALPHATEST_ON
  1534. clip(Alpha - AlphaClipThreshold);
  1535. #endif
  1536. #if defined(LOD_FADE_CROSSFADE)
  1537. LODFadeCrossFade( IN.positionCS );
  1538. #endif
  1539. #ifdef ASE_DEPTH_WRITE_ON
  1540. outputDepth = DepthValue;
  1541. #endif
  1542. return 0;
  1543. }
  1544. ENDHLSL
  1545. }
  1546. Pass
  1547. {
  1548. Name "Meta"
  1549. Tags { "LightMode"="Meta" }
  1550. Cull Off
  1551. HLSLPROGRAM
  1552. #define _NORMAL_DROPOFF_TS 1
  1553. #define ASE_FOG 1
  1554. #define ASE_PHONG_TESSELLATION
  1555. #define ASE_DEPTH_WRITE_ON
  1556. #define ASE_TESSELLATION 1
  1557. #pragma require tessellation tessHW
  1558. #pragma hull HullFunction
  1559. #pragma domain DomainFunction
  1560. #define ASE_TRANSLUCENCY 1
  1561. #define ASE_LENGTH_TESSELLATION
  1562. #define _SURFACE_TYPE_TRANSPARENT 1
  1563. #define _EMISSION
  1564. #define _ALPHATEST_ON 1
  1565. #define ASE_SRP_VERSION 140004
  1566. #define REQUIRE_DEPTH_TEXTURE 1
  1567. #pragma shader_feature EDITOR_VISUALIZATION
  1568. #pragma vertex vert
  1569. #pragma fragment frag
  1570. #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE)
  1571. #define _SPECULAR_COLOR 1
  1572. #endif
  1573. #define SHADERPASS SHADERPASS_META
  1574. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1575. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1576. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1577. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1578. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  1579. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1580. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1581. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
  1582. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1583. #define ASE_NEEDS_VERT_POSITION
  1584. #define ASE_NEEDS_VERT_NORMAL
  1585. struct VertexInput
  1586. {
  1587. float4 positionOS : POSITION;
  1588. float3 normalOS : NORMAL;
  1589. float4 texcoord0 : TEXCOORD0;
  1590. float4 texcoord1 : TEXCOORD1;
  1591. float4 texcoord2 : TEXCOORD2;
  1592. float4 ase_color : COLOR;
  1593. UNITY_VERTEX_INPUT_INSTANCE_ID
  1594. };
  1595. struct VertexOutput
  1596. {
  1597. float4 positionCS : SV_POSITION;
  1598. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1599. float3 positionWS : TEXCOORD0;
  1600. #endif
  1601. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1602. float4 shadowCoord : TEXCOORD1;
  1603. #endif
  1604. #ifdef EDITOR_VISUALIZATION
  1605. float4 VizUV : TEXCOORD2;
  1606. float4 LightCoord : TEXCOORD3;
  1607. #endif
  1608. float4 ase_texcoord4 : TEXCOORD4;
  1609. float3 ase_normal : NORMAL;
  1610. float4 ase_color : COLOR;
  1611. float4 ase_texcoord5 : TEXCOORD5;
  1612. float4 ase_texcoord6 : TEXCOORD6;
  1613. UNITY_VERTEX_INPUT_INSTANCE_ID
  1614. UNITY_VERTEX_OUTPUT_STEREO
  1615. };
  1616. CBUFFER_START(UnityPerMaterial)
  1617. float4 _EmmissiveColor;
  1618. float4 _BaseColor;
  1619. float4 _Mask1;
  1620. float4 _Mask0;
  1621. float3 _NoiseScale3D;
  1622. float3 _WindDirection;
  1623. float3 _AdditionalNoiseDir;
  1624. float3 _AdditionalVoronoiDir;
  1625. float _Scale;
  1626. float _EmmissiveNoiseColor;
  1627. float _VertexColorStrength;
  1628. float _NoiseColorStrength;
  1629. float _NoiseColorMix;
  1630. float _VoronoiStrength;
  1631. float _DepthDistance;
  1632. float _VorSpeed;
  1633. float _VoronoiScale;
  1634. float _NoiseStrength;
  1635. float _NoiseScale;
  1636. float _WindSpeed;
  1637. float _NoiseSpeed;
  1638. float _NoiseDisplacement;
  1639. float _EmmissiveDepthFade;
  1640. #ifdef ASE_TRANSMISSION
  1641. float _TransmissionShadow;
  1642. #endif
  1643. #ifdef ASE_TRANSLUCENCY
  1644. float _TransStrength;
  1645. float _TransNormal;
  1646. float _TransScattering;
  1647. float _TransDirect;
  1648. float _TransAmbient;
  1649. float _TransShadow;
  1650. #endif
  1651. #ifdef ASE_TESSELLATION
  1652. float _TessPhongStrength;
  1653. float _TessValue;
  1654. float _TessMin;
  1655. float _TessMax;
  1656. float _TessEdgeLength;
  1657. float _TessMaxDisp;
  1658. #endif
  1659. CBUFFER_END
  1660. #ifdef SCENEPICKINGPASS
  1661. float4 _SelectionID;
  1662. #endif
  1663. #ifdef SCENESELECTIONPASS
  1664. int _ObjectId;
  1665. int _PassValue;
  1666. #endif
  1667. float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
  1668. float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
  1669. float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
  1670. float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
  1671. float snoise( float3 v )
  1672. {
  1673. const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
  1674. float3 i = floor( v + dot( v, C.yyy ) );
  1675. float3 x0 = v - i + dot( i, C.xxx );
  1676. float3 g = step( x0.yzx, x0.xyz );
  1677. float3 l = 1.0 - g;
  1678. float3 i1 = min( g.xyz, l.zxy );
  1679. float3 i2 = max( g.xyz, l.zxy );
  1680. float3 x1 = x0 - i1 + C.xxx;
  1681. float3 x2 = x0 - i2 + C.yyy;
  1682. float3 x3 = x0 - 0.5;
  1683. i = mod3D289( i);
  1684. float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
  1685. float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
  1686. float4 x_ = floor( j / 7.0 );
  1687. float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
  1688. float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  1689. float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  1690. float4 h = 1.0 - abs( x ) - abs( y );
  1691. float4 b0 = float4( x.xy, y.xy );
  1692. float4 b1 = float4( x.zw, y.zw );
  1693. float4 s0 = floor( b0 ) * 2.0 + 1.0;
  1694. float4 s1 = floor( b1 ) * 2.0 + 1.0;
  1695. float4 sh = -step( h, 0.0 );
  1696. float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
  1697. float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
  1698. float3 g0 = float3( a0.xy, h.x );
  1699. float3 g1 = float3( a0.zw, h.y );
  1700. float3 g2 = float3( a1.xy, h.z );
  1701. float3 g3 = float3( a1.zw, h.w );
  1702. float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
  1703. g0 *= norm.x;
  1704. g1 *= norm.y;
  1705. g2 *= norm.z;
  1706. g3 *= norm.w;
  1707. float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
  1708. m = m* m;
  1709. m = m* m;
  1710. float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
  1711. return 42.0 * dot( m, px);
  1712. }
  1713. float2 voronoihash97( float2 p )
  1714. {
  1715. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  1716. return frac( sin( p ) *43758.5453);
  1717. }
  1718. float voronoi97( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  1719. {
  1720. float2 n = floor( v );
  1721. float2 f = frac( v );
  1722. float F1 = 8.0;
  1723. float F2 = 8.0; float2 mg = 0;
  1724. for ( int j = -1; j <= 1; j++ )
  1725. {
  1726. for ( int i = -1; i <= 1; i++ )
  1727. {
  1728. float2 g = float2( i, j );
  1729. float2 o = voronoihash97( n + g );
  1730. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  1731. float d = 0.5 * dot( r, r );
  1732. if( d<F1 ) {
  1733. F2 = F1;
  1734. F1 = d; mg = g; mr = r; id = o;
  1735. } else if( d<F2 ) {
  1736. F2 = d;
  1737. }
  1738. }
  1739. }
  1740. return F1;
  1741. }
  1742. float2 voronoihash96( float2 p )
  1743. {
  1744. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  1745. return frac( sin( p ) *43758.5453);
  1746. }
  1747. float voronoi96( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  1748. {
  1749. float2 n = floor( v );
  1750. float2 f = frac( v );
  1751. float F1 = 8.0;
  1752. float F2 = 8.0; float2 mg = 0;
  1753. for ( int j = -1; j <= 1; j++ )
  1754. {
  1755. for ( int i = -1; i <= 1; i++ )
  1756. {
  1757. float2 g = float2( i, j );
  1758. float2 o = voronoihash96( n + g );
  1759. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  1760. float d = 0.5 * dot( r, r );
  1761. if( d<F1 ) {
  1762. F2 = F1;
  1763. F1 = d; mg = g; mr = r; id = o;
  1764. } else if( d<F2 ) {
  1765. F2 = d;
  1766. }
  1767. }
  1768. }
  1769. return F1;
  1770. }
  1771. float2 voronoihash89( float2 p )
  1772. {
  1773. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  1774. return frac( sin( p ) *43758.5453);
  1775. }
  1776. float voronoi89( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  1777. {
  1778. float2 n = floor( v );
  1779. float2 f = frac( v );
  1780. float F1 = 8.0;
  1781. float F2 = 8.0; float2 mg = 0;
  1782. for ( int j = -1; j <= 1; j++ )
  1783. {
  1784. for ( int i = -1; i <= 1; i++ )
  1785. {
  1786. float2 g = float2( i, j );
  1787. float2 o = voronoihash89( n + g );
  1788. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  1789. float d = 0.5 * dot( r, r );
  1790. if( d<F1 ) {
  1791. F2 = F1;
  1792. F1 = d; mg = g; mr = r; id = o;
  1793. } else if( d<F2 ) {
  1794. F2 = d;
  1795. }
  1796. }
  1797. }
  1798. return F1;
  1799. }
  1800. VertexOutput VertexFunction( VertexInput v )
  1801. {
  1802. VertexOutput o = (VertexOutput)0;
  1803. UNITY_SETUP_INSTANCE_ID(v);
  1804. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1805. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1806. #if ( SHADER_TARGET >= 50 )
  1807. float recip367 = rcp( _Scale );
  1808. #else
  1809. float recip367 = 1.0 / _Scale;
  1810. #endif
  1811. float Scale228 = recip367;
  1812. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  1813. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  1814. float3 break332 = WindDir317;
  1815. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  1816. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  1817. float4 WindDirWeights341 = appendResult340;
  1818. float4 break344 = abs( WindDirWeights341 );
  1819. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  1820. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  1821. float4 transform70 = mul(GetObjectToWorldMatrix(),v.positionOS);
  1822. float4 temp_output_71_0 = (transform70).xyzw;
  1823. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  1824. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  1825. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  1826. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  1827. float time97 = 0.0;
  1828. float2 voronoiSmoothId97 = 0;
  1829. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  1830. float2 appendResult85 = (float2(break84.z , break84.y));
  1831. float2 coords97 = appendResult85 * temp_output_198_0;
  1832. float2 id97 = 0;
  1833. float2 uv97 = 0;
  1834. float fade97 = 0.5;
  1835. float voroi97 = 0;
  1836. float rest97 = 0;
  1837. for( int it97 = 0; it97 <3; it97++ ){
  1838. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  1839. rest97 += fade97;
  1840. coords97 *= 2;
  1841. fade97 *= 0.5;
  1842. }//Voronoi97
  1843. voroi97 /= rest97;
  1844. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( v.normalOS, 0 ) ).xyz;
  1845. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  1846. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  1847. float3 break104 = ( temp_output_93_0 / dotResult94 );
  1848. float time96 = 217.0;
  1849. float2 voronoiSmoothId96 = 0;
  1850. float2 appendResult86 = (float2(break84.z , break84.x));
  1851. float2 coords96 = appendResult86 * temp_output_198_0;
  1852. float2 id96 = 0;
  1853. float2 uv96 = 0;
  1854. float fade96 = 0.5;
  1855. float voroi96 = 0;
  1856. float rest96 = 0;
  1857. for( int it96 = 0; it96 <3; it96++ ){
  1858. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  1859. rest96 += fade96;
  1860. coords96 *= 2;
  1861. fade96 *= 0.5;
  1862. }//Voronoi96
  1863. voroi96 /= rest96;
  1864. float time89 = 137.0;
  1865. float2 voronoiSmoothId89 = 0;
  1866. float2 appendResult87 = (float2(break84.x , break84.y));
  1867. float2 coords89 = appendResult87 * temp_output_198_0;
  1868. float2 id89 = 0;
  1869. float2 uv89 = 0;
  1870. float fade89 = 0.5;
  1871. float voroi89 = 0;
  1872. float rest89 = 0;
  1873. for( int it89 = 0; it89 <3; it89++ ){
  1874. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  1875. rest89 += fade89;
  1876. coords89 *= 2;
  1877. fade89 *= 0.5;
  1878. }//Voronoi89
  1879. voroi89 /= rest89;
  1880. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  1881. float temp_output_122_0 = saturate( ( ( temp_output_118_0 * _NoiseStrength ) + ( temp_output_190_0 * _VoronoiStrength ) ) );
  1882. float3 ase_objectScale = float3( length( GetObjectToWorldMatrix()[ 0 ].xyz ), length( GetObjectToWorldMatrix()[ 1 ].xyz ), length( GetObjectToWorldMatrix()[ 2 ].xyz ) );
  1883. float3 temp_output_184_0 = ( ( ( temp_output_122_0 - 0.5 ) * v.normalOS * ( _NoiseDisplacement / Scale228 ) ) / ase_objectScale );
  1884. float4 temp_output_2_0_g146 = _Mask0;
  1885. float3 worldToObj306 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g146).xyz, 1 ) ).xyz;
  1886. float3 ase_objectPosition = GetAbsolutePositionWS( UNITY_MATRIX_M._m03_m13_m23 );
  1887. float4 appendResult313 = (float4((temp_output_2_0_g146).w , 0.0 , 0.0 , 0.0));
  1888. float3 worldToObj307 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult313 ).xyz, 1 ) ).xyz;
  1889. float3 temp_output_304_0 = ( temp_output_184_0 + ( min( ( distance( ( temp_output_184_0 + v.positionOS.xyz ) , worldToObj306 ) - length( worldToObj307 ) ) , 0.0 ) * v.normalOS ) );
  1890. float4 temp_output_2_0_g153 = _Mask1;
  1891. float3 worldToObj357 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g153).xyz, 1 ) ).xyz;
  1892. float4 appendResult354 = (float4((temp_output_2_0_g153).w , 0.0 , 0.0 , 0.0));
  1893. float3 worldToObj358 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult354 ).xyz, 1 ) ).xyz;
  1894. float3 VertexOffset305 = ( temp_output_304_0 + ( min( ( distance( ( temp_output_304_0 + v.positionOS.xyz ) , worldToObj357 ) - length( worldToObj358 ) ) , 0.0 ) * v.normalOS ) );
  1895. float4 ase_clipPos = TransformObjectToHClip((v.positionOS).xyz);
  1896. float4 screenPos = ComputeScreenPos(ase_clipPos);
  1897. o.ase_texcoord5 = screenPos;
  1898. float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.positionOS.xyz));
  1899. float eyeDepth = -objectToViewPos.z;
  1900. o.ase_texcoord6.x = eyeDepth;
  1901. o.ase_texcoord4 = v.positionOS;
  1902. o.ase_normal = v.normalOS;
  1903. o.ase_color = v.ase_color;
  1904. //setting value to unused interpolator channels and avoid initialization warnings
  1905. o.ase_texcoord6.yzw = 0;
  1906. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1907. float3 defaultVertexValue = v.positionOS.xyz;
  1908. #else
  1909. float3 defaultVertexValue = float3(0, 0, 0);
  1910. #endif
  1911. float3 vertexValue = VertexOffset305;
  1912. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1913. v.positionOS.xyz = vertexValue;
  1914. #else
  1915. v.positionOS.xyz += vertexValue;
  1916. #endif
  1917. v.normalOS = v.normalOS;
  1918. float3 positionWS = TransformObjectToWorld( v.positionOS.xyz );
  1919. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  1920. o.positionWS = positionWS;
  1921. #endif
  1922. o.positionCS = MetaVertexPosition( v.positionOS, v.texcoord1.xy, v.texcoord1.xy, unity_LightmapST, unity_DynamicLightmapST );
  1923. #ifdef EDITOR_VISUALIZATION
  1924. float2 VizUV = 0;
  1925. float4 LightCoord = 0;
  1926. UnityEditorVizData(v.positionOS.xyz, v.texcoord0.xy, v.texcoord1.xy, v.texcoord2.xy, VizUV, LightCoord);
  1927. o.VizUV = float4(VizUV, 0, 0);
  1928. o.LightCoord = LightCoord;
  1929. #endif
  1930. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  1931. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  1932. vertexInput.positionWS = positionWS;
  1933. vertexInput.positionCS = o.positionCS;
  1934. o.shadowCoord = GetShadowCoord( vertexInput );
  1935. #endif
  1936. return o;
  1937. }
  1938. #if defined(ASE_TESSELLATION)
  1939. struct VertexControl
  1940. {
  1941. float4 vertex : INTERNALTESSPOS;
  1942. float3 normalOS : NORMAL;
  1943. float4 texcoord0 : TEXCOORD0;
  1944. float4 texcoord1 : TEXCOORD1;
  1945. float4 texcoord2 : TEXCOORD2;
  1946. float4 ase_color : COLOR;
  1947. UNITY_VERTEX_INPUT_INSTANCE_ID
  1948. };
  1949. struct TessellationFactors
  1950. {
  1951. float edge[3] : SV_TessFactor;
  1952. float inside : SV_InsideTessFactor;
  1953. };
  1954. VertexControl vert ( VertexInput v )
  1955. {
  1956. VertexControl o;
  1957. UNITY_SETUP_INSTANCE_ID(v);
  1958. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1959. o.vertex = v.positionOS;
  1960. o.normalOS = v.normalOS;
  1961. o.texcoord0 = v.texcoord0;
  1962. o.texcoord1 = v.texcoord1;
  1963. o.texcoord2 = v.texcoord2;
  1964. o.ase_color = v.ase_color;
  1965. return o;
  1966. }
  1967. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1968. {
  1969. TessellationFactors o;
  1970. float4 tf = 1;
  1971. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1972. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1973. #if defined(ASE_FIXED_TESSELLATION)
  1974. tf = FixedTess( tessValue );
  1975. #elif defined(ASE_DISTANCE_TESSELLATION)
  1976. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1977. #elif defined(ASE_LENGTH_TESSELLATION)
  1978. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1979. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1980. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1981. #endif
  1982. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1983. return o;
  1984. }
  1985. [domain("tri")]
  1986. [partitioning("fractional_odd")]
  1987. [outputtopology("triangle_cw")]
  1988. [patchconstantfunc("TessellationFunction")]
  1989. [outputcontrolpoints(3)]
  1990. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1991. {
  1992. return patch[id];
  1993. }
  1994. [domain("tri")]
  1995. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1996. {
  1997. VertexInput o = (VertexInput) 0;
  1998. o.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1999. o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  2000. o.texcoord0 = patch[0].texcoord0 * bary.x + patch[1].texcoord0 * bary.y + patch[2].texcoord0 * bary.z;
  2001. o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
  2002. o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z;
  2003. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  2004. #if defined(ASE_PHONG_TESSELLATION)
  2005. float3 pp[3];
  2006. for (int i = 0; i < 3; ++i)
  2007. pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  2008. float phongStrength = _TessPhongStrength;
  2009. o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz;
  2010. #endif
  2011. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  2012. return VertexFunction(o);
  2013. }
  2014. #else
  2015. VertexOutput vert ( VertexInput v )
  2016. {
  2017. return VertexFunction( v );
  2018. }
  2019. #endif
  2020. half4 frag(VertexOutput IN ) : SV_TARGET
  2021. {
  2022. UNITY_SETUP_INSTANCE_ID(IN);
  2023. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  2024. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  2025. float3 WorldPosition = IN.positionWS;
  2026. #endif
  2027. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  2028. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  2029. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  2030. ShadowCoords = IN.shadowCoord;
  2031. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  2032. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  2033. #endif
  2034. #endif
  2035. #if ( SHADER_TARGET >= 50 )
  2036. float recip367 = rcp( _Scale );
  2037. #else
  2038. float recip367 = 1.0 / _Scale;
  2039. #endif
  2040. float Scale228 = recip367;
  2041. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  2042. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  2043. float3 break332 = WindDir317;
  2044. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  2045. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  2046. float4 WindDirWeights341 = appendResult340;
  2047. float4 break344 = abs( WindDirWeights341 );
  2048. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  2049. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  2050. float4 transform70 = mul(GetObjectToWorldMatrix(),IN.ase_texcoord4);
  2051. float4 temp_output_71_0 = (transform70).xyzw;
  2052. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  2053. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  2054. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  2055. float NoiseColor3D151 = temp_output_118_0;
  2056. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  2057. float time97 = 0.0;
  2058. float2 voronoiSmoothId97 = 0;
  2059. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  2060. float2 appendResult85 = (float2(break84.z , break84.y));
  2061. float2 coords97 = appendResult85 * temp_output_198_0;
  2062. float2 id97 = 0;
  2063. float2 uv97 = 0;
  2064. float fade97 = 0.5;
  2065. float voroi97 = 0;
  2066. float rest97 = 0;
  2067. for( int it97 = 0; it97 <3; it97++ ){
  2068. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  2069. rest97 += fade97;
  2070. coords97 *= 2;
  2071. fade97 *= 0.5;
  2072. }//Voronoi97
  2073. voroi97 /= rest97;
  2074. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( IN.ase_normal, 0 ) ).xyz;
  2075. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  2076. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  2077. float3 break104 = ( temp_output_93_0 / dotResult94 );
  2078. float time96 = 217.0;
  2079. float2 voronoiSmoothId96 = 0;
  2080. float2 appendResult86 = (float2(break84.z , break84.x));
  2081. float2 coords96 = appendResult86 * temp_output_198_0;
  2082. float2 id96 = 0;
  2083. float2 uv96 = 0;
  2084. float fade96 = 0.5;
  2085. float voroi96 = 0;
  2086. float rest96 = 0;
  2087. for( int it96 = 0; it96 <3; it96++ ){
  2088. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  2089. rest96 += fade96;
  2090. coords96 *= 2;
  2091. fade96 *= 0.5;
  2092. }//Voronoi96
  2093. voroi96 /= rest96;
  2094. float time89 = 137.0;
  2095. float2 voronoiSmoothId89 = 0;
  2096. float2 appendResult87 = (float2(break84.x , break84.y));
  2097. float2 coords89 = appendResult87 * temp_output_198_0;
  2098. float2 id89 = 0;
  2099. float2 uv89 = 0;
  2100. float fade89 = 0.5;
  2101. float voroi89 = 0;
  2102. float rest89 = 0;
  2103. for( int it89 = 0; it89 <3; it89++ ){
  2104. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  2105. rest89 += fade89;
  2106. coords89 *= 2;
  2107. fade89 *= 0.5;
  2108. }//Voronoi89
  2109. voroi89 /= rest89;
  2110. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  2111. float NoiseColorVoronoi152 = temp_output_190_0;
  2112. float lerpResult157 = lerp( NoiseColor3D151 , NoiseColorVoronoi152 , _NoiseColorMix);
  2113. float NoiseColorMix158 = lerpResult157;
  2114. float3 temp_cast_3 = (NoiseColorMix158).xxx;
  2115. float temp_output_2_0_g159 = _NoiseColorStrength;
  2116. float temp_output_3_0_g159 = ( 1.0 - temp_output_2_0_g159 );
  2117. float3 appendResult7_g159 = (float3(temp_output_3_0_g159 , temp_output_3_0_g159 , temp_output_3_0_g159));
  2118. float3 temp_output_21_0 = ( ( temp_cast_3 * temp_output_2_0_g159 ) + appendResult7_g159 );
  2119. float4 lerpResult161 = lerp( _BaseColor , IN.ase_color , _VertexColorStrength);
  2120. float4 Albedo30 = saturate( ( float4( temp_output_21_0 , 0.0 ) * lerpResult161 ) );
  2121. float3 temp_cast_6 = (NoiseColorMix158).xxx;
  2122. float temp_output_2_0_g157 = _EmmissiveNoiseColor;
  2123. float temp_output_3_0_g157 = ( 1.0 - temp_output_2_0_g157 );
  2124. float3 appendResult7_g157 = (float3(temp_output_3_0_g157 , temp_output_3_0_g157 , temp_output_3_0_g157));
  2125. float4 screenPos = IN.ase_texcoord5;
  2126. float4 ase_screenPosNorm = screenPos / screenPos.w;
  2127. ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
  2128. float clampDepth368 = SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy );
  2129. float temp_output_385_0 = abs( ( _ProjectionParams.z - _ProjectionParams.y ) );
  2130. float eyeDepth = IN.ase_texcoord6.x;
  2131. float cameraDepthFade389 = (( eyeDepth -_ProjectionParams.y - 0.0 ) / temp_output_385_0);
  2132. float temp_output_1_0_g160 = saturate( ( ( ( ( 1.0 - clampDepth368 ) - cameraDepthFade389 ) * temp_output_385_0 ) / _DepthDistance ) );
  2133. float DepthFade43 = saturate( ( ( ( pow( temp_output_1_0_g160 , 5.0 ) * 6.0 ) - ( pow( temp_output_1_0_g160 , 4.0 ) * 15.0 ) ) + ( pow( temp_output_1_0_g160 , 3.0 ) * 10.0 ) ) );
  2134. float3 temp_cast_8 = (DepthFade43).xxx;
  2135. float temp_output_2_0_g158 = _EmmissiveDepthFade;
  2136. float temp_output_3_0_g158 = ( 1.0 - temp_output_2_0_g158 );
  2137. float3 appendResult7_g158 = (float3(temp_output_3_0_g158 , temp_output_3_0_g158 , temp_output_3_0_g158));
  2138. float4 temp_output_2_0_g155 = lerpResult161;
  2139. float BaseColorAlpha162 = (temp_output_2_0_g155).a;
  2140. float3 BaseColor = Albedo30.rgb;
  2141. float3 Emission = ( ( _EmmissiveColor * float4( ( ( temp_cast_6 * temp_output_2_0_g157 ) + appendResult7_g157 ) , 0.0 ) ) * float4( ( ( temp_cast_8 * temp_output_2_0_g158 ) + appendResult7_g158 ) , 0.0 ) ).rgb;
  2142. float Alpha = ( DepthFade43 * BaseColorAlpha162 );
  2143. float AlphaClipThreshold = 0.0;
  2144. #ifdef _ALPHATEST_ON
  2145. clip(Alpha - AlphaClipThreshold);
  2146. #endif
  2147. MetaInput metaInput = (MetaInput)0;
  2148. metaInput.Albedo = BaseColor;
  2149. metaInput.Emission = Emission;
  2150. #ifdef EDITOR_VISUALIZATION
  2151. metaInput.VizUV = IN.VizUV.xy;
  2152. metaInput.LightCoord = IN.LightCoord;
  2153. #endif
  2154. return UnityMetaFragment(metaInput);
  2155. }
  2156. ENDHLSL
  2157. }
  2158. Pass
  2159. {
  2160. Name "Universal2D"
  2161. Tags { "LightMode"="Universal2D" }
  2162. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  2163. ZWrite On
  2164. ZTest LEqual
  2165. Offset 0 , 0
  2166. ColorMask RGBA
  2167. HLSLPROGRAM
  2168. #define _NORMAL_DROPOFF_TS 1
  2169. #define ASE_FOG 1
  2170. #define ASE_PHONG_TESSELLATION
  2171. #define ASE_DEPTH_WRITE_ON
  2172. #define ASE_TESSELLATION 1
  2173. #pragma require tessellation tessHW
  2174. #pragma hull HullFunction
  2175. #pragma domain DomainFunction
  2176. #define ASE_TRANSLUCENCY 1
  2177. #define ASE_LENGTH_TESSELLATION
  2178. #define _SURFACE_TYPE_TRANSPARENT 1
  2179. #define _EMISSION
  2180. #define _ALPHATEST_ON 1
  2181. #define ASE_SRP_VERSION 140004
  2182. #define REQUIRE_DEPTH_TEXTURE 1
  2183. #pragma vertex vert
  2184. #pragma fragment frag
  2185. #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE)
  2186. #define _SPECULAR_COLOR 1
  2187. #endif
  2188. #define SHADERPASS SHADERPASS_2D
  2189. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  2190. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  2191. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  2192. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  2193. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  2194. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  2195. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  2196. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  2197. #define ASE_NEEDS_VERT_POSITION
  2198. #define ASE_NEEDS_VERT_NORMAL
  2199. struct VertexInput
  2200. {
  2201. float4 positionOS : POSITION;
  2202. float3 normalOS : NORMAL;
  2203. float4 ase_color : COLOR;
  2204. UNITY_VERTEX_INPUT_INSTANCE_ID
  2205. };
  2206. struct VertexOutput
  2207. {
  2208. float4 positionCS : SV_POSITION;
  2209. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  2210. float3 positionWS : TEXCOORD0;
  2211. #endif
  2212. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  2213. float4 shadowCoord : TEXCOORD1;
  2214. #endif
  2215. float4 ase_texcoord2 : TEXCOORD2;
  2216. float3 ase_normal : NORMAL;
  2217. float4 ase_color : COLOR;
  2218. float4 ase_texcoord3 : TEXCOORD3;
  2219. float4 ase_texcoord4 : TEXCOORD4;
  2220. UNITY_VERTEX_INPUT_INSTANCE_ID
  2221. UNITY_VERTEX_OUTPUT_STEREO
  2222. };
  2223. CBUFFER_START(UnityPerMaterial)
  2224. float4 _EmmissiveColor;
  2225. float4 _BaseColor;
  2226. float4 _Mask1;
  2227. float4 _Mask0;
  2228. float3 _NoiseScale3D;
  2229. float3 _WindDirection;
  2230. float3 _AdditionalNoiseDir;
  2231. float3 _AdditionalVoronoiDir;
  2232. float _Scale;
  2233. float _EmmissiveNoiseColor;
  2234. float _VertexColorStrength;
  2235. float _NoiseColorStrength;
  2236. float _NoiseColorMix;
  2237. float _VoronoiStrength;
  2238. float _DepthDistance;
  2239. float _VorSpeed;
  2240. float _VoronoiScale;
  2241. float _NoiseStrength;
  2242. float _NoiseScale;
  2243. float _WindSpeed;
  2244. float _NoiseSpeed;
  2245. float _NoiseDisplacement;
  2246. float _EmmissiveDepthFade;
  2247. #ifdef ASE_TRANSMISSION
  2248. float _TransmissionShadow;
  2249. #endif
  2250. #ifdef ASE_TRANSLUCENCY
  2251. float _TransStrength;
  2252. float _TransNormal;
  2253. float _TransScattering;
  2254. float _TransDirect;
  2255. float _TransAmbient;
  2256. float _TransShadow;
  2257. #endif
  2258. #ifdef ASE_TESSELLATION
  2259. float _TessPhongStrength;
  2260. float _TessValue;
  2261. float _TessMin;
  2262. float _TessMax;
  2263. float _TessEdgeLength;
  2264. float _TessMaxDisp;
  2265. #endif
  2266. CBUFFER_END
  2267. #ifdef SCENEPICKINGPASS
  2268. float4 _SelectionID;
  2269. #endif
  2270. #ifdef SCENESELECTIONPASS
  2271. int _ObjectId;
  2272. int _PassValue;
  2273. #endif
  2274. float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
  2275. float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
  2276. float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
  2277. float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
  2278. float snoise( float3 v )
  2279. {
  2280. const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
  2281. float3 i = floor( v + dot( v, C.yyy ) );
  2282. float3 x0 = v - i + dot( i, C.xxx );
  2283. float3 g = step( x0.yzx, x0.xyz );
  2284. float3 l = 1.0 - g;
  2285. float3 i1 = min( g.xyz, l.zxy );
  2286. float3 i2 = max( g.xyz, l.zxy );
  2287. float3 x1 = x0 - i1 + C.xxx;
  2288. float3 x2 = x0 - i2 + C.yyy;
  2289. float3 x3 = x0 - 0.5;
  2290. i = mod3D289( i);
  2291. float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
  2292. float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
  2293. float4 x_ = floor( j / 7.0 );
  2294. float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
  2295. float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  2296. float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  2297. float4 h = 1.0 - abs( x ) - abs( y );
  2298. float4 b0 = float4( x.xy, y.xy );
  2299. float4 b1 = float4( x.zw, y.zw );
  2300. float4 s0 = floor( b0 ) * 2.0 + 1.0;
  2301. float4 s1 = floor( b1 ) * 2.0 + 1.0;
  2302. float4 sh = -step( h, 0.0 );
  2303. float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
  2304. float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
  2305. float3 g0 = float3( a0.xy, h.x );
  2306. float3 g1 = float3( a0.zw, h.y );
  2307. float3 g2 = float3( a1.xy, h.z );
  2308. float3 g3 = float3( a1.zw, h.w );
  2309. float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
  2310. g0 *= norm.x;
  2311. g1 *= norm.y;
  2312. g2 *= norm.z;
  2313. g3 *= norm.w;
  2314. float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
  2315. m = m* m;
  2316. m = m* m;
  2317. float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
  2318. return 42.0 * dot( m, px);
  2319. }
  2320. float2 voronoihash97( float2 p )
  2321. {
  2322. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  2323. return frac( sin( p ) *43758.5453);
  2324. }
  2325. float voronoi97( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  2326. {
  2327. float2 n = floor( v );
  2328. float2 f = frac( v );
  2329. float F1 = 8.0;
  2330. float F2 = 8.0; float2 mg = 0;
  2331. for ( int j = -1; j <= 1; j++ )
  2332. {
  2333. for ( int i = -1; i <= 1; i++ )
  2334. {
  2335. float2 g = float2( i, j );
  2336. float2 o = voronoihash97( n + g );
  2337. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  2338. float d = 0.5 * dot( r, r );
  2339. if( d<F1 ) {
  2340. F2 = F1;
  2341. F1 = d; mg = g; mr = r; id = o;
  2342. } else if( d<F2 ) {
  2343. F2 = d;
  2344. }
  2345. }
  2346. }
  2347. return F1;
  2348. }
  2349. float2 voronoihash96( float2 p )
  2350. {
  2351. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  2352. return frac( sin( p ) *43758.5453);
  2353. }
  2354. float voronoi96( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  2355. {
  2356. float2 n = floor( v );
  2357. float2 f = frac( v );
  2358. float F1 = 8.0;
  2359. float F2 = 8.0; float2 mg = 0;
  2360. for ( int j = -1; j <= 1; j++ )
  2361. {
  2362. for ( int i = -1; i <= 1; i++ )
  2363. {
  2364. float2 g = float2( i, j );
  2365. float2 o = voronoihash96( n + g );
  2366. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  2367. float d = 0.5 * dot( r, r );
  2368. if( d<F1 ) {
  2369. F2 = F1;
  2370. F1 = d; mg = g; mr = r; id = o;
  2371. } else if( d<F2 ) {
  2372. F2 = d;
  2373. }
  2374. }
  2375. }
  2376. return F1;
  2377. }
  2378. float2 voronoihash89( float2 p )
  2379. {
  2380. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  2381. return frac( sin( p ) *43758.5453);
  2382. }
  2383. float voronoi89( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  2384. {
  2385. float2 n = floor( v );
  2386. float2 f = frac( v );
  2387. float F1 = 8.0;
  2388. float F2 = 8.0; float2 mg = 0;
  2389. for ( int j = -1; j <= 1; j++ )
  2390. {
  2391. for ( int i = -1; i <= 1; i++ )
  2392. {
  2393. float2 g = float2( i, j );
  2394. float2 o = voronoihash89( n + g );
  2395. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  2396. float d = 0.5 * dot( r, r );
  2397. if( d<F1 ) {
  2398. F2 = F1;
  2399. F1 = d; mg = g; mr = r; id = o;
  2400. } else if( d<F2 ) {
  2401. F2 = d;
  2402. }
  2403. }
  2404. }
  2405. return F1;
  2406. }
  2407. VertexOutput VertexFunction( VertexInput v )
  2408. {
  2409. VertexOutput o = (VertexOutput)0;
  2410. UNITY_SETUP_INSTANCE_ID( v );
  2411. UNITY_TRANSFER_INSTANCE_ID( v, o );
  2412. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
  2413. #if ( SHADER_TARGET >= 50 )
  2414. float recip367 = rcp( _Scale );
  2415. #else
  2416. float recip367 = 1.0 / _Scale;
  2417. #endif
  2418. float Scale228 = recip367;
  2419. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  2420. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  2421. float3 break332 = WindDir317;
  2422. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  2423. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  2424. float4 WindDirWeights341 = appendResult340;
  2425. float4 break344 = abs( WindDirWeights341 );
  2426. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  2427. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  2428. float4 transform70 = mul(GetObjectToWorldMatrix(),v.positionOS);
  2429. float4 temp_output_71_0 = (transform70).xyzw;
  2430. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  2431. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  2432. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  2433. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  2434. float time97 = 0.0;
  2435. float2 voronoiSmoothId97 = 0;
  2436. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  2437. float2 appendResult85 = (float2(break84.z , break84.y));
  2438. float2 coords97 = appendResult85 * temp_output_198_0;
  2439. float2 id97 = 0;
  2440. float2 uv97 = 0;
  2441. float fade97 = 0.5;
  2442. float voroi97 = 0;
  2443. float rest97 = 0;
  2444. for( int it97 = 0; it97 <3; it97++ ){
  2445. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  2446. rest97 += fade97;
  2447. coords97 *= 2;
  2448. fade97 *= 0.5;
  2449. }//Voronoi97
  2450. voroi97 /= rest97;
  2451. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( v.normalOS, 0 ) ).xyz;
  2452. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  2453. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  2454. float3 break104 = ( temp_output_93_0 / dotResult94 );
  2455. float time96 = 217.0;
  2456. float2 voronoiSmoothId96 = 0;
  2457. float2 appendResult86 = (float2(break84.z , break84.x));
  2458. float2 coords96 = appendResult86 * temp_output_198_0;
  2459. float2 id96 = 0;
  2460. float2 uv96 = 0;
  2461. float fade96 = 0.5;
  2462. float voroi96 = 0;
  2463. float rest96 = 0;
  2464. for( int it96 = 0; it96 <3; it96++ ){
  2465. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  2466. rest96 += fade96;
  2467. coords96 *= 2;
  2468. fade96 *= 0.5;
  2469. }//Voronoi96
  2470. voroi96 /= rest96;
  2471. float time89 = 137.0;
  2472. float2 voronoiSmoothId89 = 0;
  2473. float2 appendResult87 = (float2(break84.x , break84.y));
  2474. float2 coords89 = appendResult87 * temp_output_198_0;
  2475. float2 id89 = 0;
  2476. float2 uv89 = 0;
  2477. float fade89 = 0.5;
  2478. float voroi89 = 0;
  2479. float rest89 = 0;
  2480. for( int it89 = 0; it89 <3; it89++ ){
  2481. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  2482. rest89 += fade89;
  2483. coords89 *= 2;
  2484. fade89 *= 0.5;
  2485. }//Voronoi89
  2486. voroi89 /= rest89;
  2487. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  2488. float temp_output_122_0 = saturate( ( ( temp_output_118_0 * _NoiseStrength ) + ( temp_output_190_0 * _VoronoiStrength ) ) );
  2489. float3 ase_objectScale = float3( length( GetObjectToWorldMatrix()[ 0 ].xyz ), length( GetObjectToWorldMatrix()[ 1 ].xyz ), length( GetObjectToWorldMatrix()[ 2 ].xyz ) );
  2490. float3 temp_output_184_0 = ( ( ( temp_output_122_0 - 0.5 ) * v.normalOS * ( _NoiseDisplacement / Scale228 ) ) / ase_objectScale );
  2491. float4 temp_output_2_0_g146 = _Mask0;
  2492. float3 worldToObj306 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g146).xyz, 1 ) ).xyz;
  2493. float3 ase_objectPosition = GetAbsolutePositionWS( UNITY_MATRIX_M._m03_m13_m23 );
  2494. float4 appendResult313 = (float4((temp_output_2_0_g146).w , 0.0 , 0.0 , 0.0));
  2495. float3 worldToObj307 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult313 ).xyz, 1 ) ).xyz;
  2496. float3 temp_output_304_0 = ( temp_output_184_0 + ( min( ( distance( ( temp_output_184_0 + v.positionOS.xyz ) , worldToObj306 ) - length( worldToObj307 ) ) , 0.0 ) * v.normalOS ) );
  2497. float4 temp_output_2_0_g153 = _Mask1;
  2498. float3 worldToObj357 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g153).xyz, 1 ) ).xyz;
  2499. float4 appendResult354 = (float4((temp_output_2_0_g153).w , 0.0 , 0.0 , 0.0));
  2500. float3 worldToObj358 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult354 ).xyz, 1 ) ).xyz;
  2501. float3 VertexOffset305 = ( temp_output_304_0 + ( min( ( distance( ( temp_output_304_0 + v.positionOS.xyz ) , worldToObj357 ) - length( worldToObj358 ) ) , 0.0 ) * v.normalOS ) );
  2502. float4 ase_clipPos = TransformObjectToHClip((v.positionOS).xyz);
  2503. float4 screenPos = ComputeScreenPos(ase_clipPos);
  2504. o.ase_texcoord3 = screenPos;
  2505. float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.positionOS.xyz));
  2506. float eyeDepth = -objectToViewPos.z;
  2507. o.ase_texcoord4.x = eyeDepth;
  2508. o.ase_texcoord2 = v.positionOS;
  2509. o.ase_normal = v.normalOS;
  2510. o.ase_color = v.ase_color;
  2511. //setting value to unused interpolator channels and avoid initialization warnings
  2512. o.ase_texcoord4.yzw = 0;
  2513. #ifdef ASE_ABSOLUTE_VERTEX_POS
  2514. float3 defaultVertexValue = v.positionOS.xyz;
  2515. #else
  2516. float3 defaultVertexValue = float3(0, 0, 0);
  2517. #endif
  2518. float3 vertexValue = VertexOffset305;
  2519. #ifdef ASE_ABSOLUTE_VERTEX_POS
  2520. v.positionOS.xyz = vertexValue;
  2521. #else
  2522. v.positionOS.xyz += vertexValue;
  2523. #endif
  2524. v.normalOS = v.normalOS;
  2525. VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
  2526. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  2527. o.positionWS = vertexInput.positionWS;
  2528. #endif
  2529. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  2530. o.shadowCoord = GetShadowCoord( vertexInput );
  2531. #endif
  2532. o.positionCS = vertexInput.positionCS;
  2533. return o;
  2534. }
  2535. #if defined(ASE_TESSELLATION)
  2536. struct VertexControl
  2537. {
  2538. float4 vertex : INTERNALTESSPOS;
  2539. float3 normalOS : NORMAL;
  2540. float4 ase_color : COLOR;
  2541. UNITY_VERTEX_INPUT_INSTANCE_ID
  2542. };
  2543. struct TessellationFactors
  2544. {
  2545. float edge[3] : SV_TessFactor;
  2546. float inside : SV_InsideTessFactor;
  2547. };
  2548. VertexControl vert ( VertexInput v )
  2549. {
  2550. VertexControl o;
  2551. UNITY_SETUP_INSTANCE_ID(v);
  2552. UNITY_TRANSFER_INSTANCE_ID(v, o);
  2553. o.vertex = v.positionOS;
  2554. o.normalOS = v.normalOS;
  2555. o.ase_color = v.ase_color;
  2556. return o;
  2557. }
  2558. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  2559. {
  2560. TessellationFactors o;
  2561. float4 tf = 1;
  2562. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  2563. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  2564. #if defined(ASE_FIXED_TESSELLATION)
  2565. tf = FixedTess( tessValue );
  2566. #elif defined(ASE_DISTANCE_TESSELLATION)
  2567. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  2568. #elif defined(ASE_LENGTH_TESSELLATION)
  2569. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  2570. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  2571. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  2572. #endif
  2573. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  2574. return o;
  2575. }
  2576. [domain("tri")]
  2577. [partitioning("fractional_odd")]
  2578. [outputtopology("triangle_cw")]
  2579. [patchconstantfunc("TessellationFunction")]
  2580. [outputcontrolpoints(3)]
  2581. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  2582. {
  2583. return patch[id];
  2584. }
  2585. [domain("tri")]
  2586. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  2587. {
  2588. VertexInput o = (VertexInput) 0;
  2589. o.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  2590. o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  2591. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  2592. #if defined(ASE_PHONG_TESSELLATION)
  2593. float3 pp[3];
  2594. for (int i = 0; i < 3; ++i)
  2595. pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  2596. float phongStrength = _TessPhongStrength;
  2597. o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz;
  2598. #endif
  2599. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  2600. return VertexFunction(o);
  2601. }
  2602. #else
  2603. VertexOutput vert ( VertexInput v )
  2604. {
  2605. return VertexFunction( v );
  2606. }
  2607. #endif
  2608. half4 frag(VertexOutput IN ) : SV_TARGET
  2609. {
  2610. UNITY_SETUP_INSTANCE_ID( IN );
  2611. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  2612. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  2613. float3 WorldPosition = IN.positionWS;
  2614. #endif
  2615. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  2616. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  2617. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  2618. ShadowCoords = IN.shadowCoord;
  2619. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  2620. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  2621. #endif
  2622. #endif
  2623. #if ( SHADER_TARGET >= 50 )
  2624. float recip367 = rcp( _Scale );
  2625. #else
  2626. float recip367 = 1.0 / _Scale;
  2627. #endif
  2628. float Scale228 = recip367;
  2629. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  2630. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  2631. float3 break332 = WindDir317;
  2632. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  2633. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  2634. float4 WindDirWeights341 = appendResult340;
  2635. float4 break344 = abs( WindDirWeights341 );
  2636. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  2637. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  2638. float4 transform70 = mul(GetObjectToWorldMatrix(),IN.ase_texcoord2);
  2639. float4 temp_output_71_0 = (transform70).xyzw;
  2640. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  2641. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  2642. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  2643. float NoiseColor3D151 = temp_output_118_0;
  2644. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  2645. float time97 = 0.0;
  2646. float2 voronoiSmoothId97 = 0;
  2647. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  2648. float2 appendResult85 = (float2(break84.z , break84.y));
  2649. float2 coords97 = appendResult85 * temp_output_198_0;
  2650. float2 id97 = 0;
  2651. float2 uv97 = 0;
  2652. float fade97 = 0.5;
  2653. float voroi97 = 0;
  2654. float rest97 = 0;
  2655. for( int it97 = 0; it97 <3; it97++ ){
  2656. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  2657. rest97 += fade97;
  2658. coords97 *= 2;
  2659. fade97 *= 0.5;
  2660. }//Voronoi97
  2661. voroi97 /= rest97;
  2662. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( IN.ase_normal, 0 ) ).xyz;
  2663. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  2664. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  2665. float3 break104 = ( temp_output_93_0 / dotResult94 );
  2666. float time96 = 217.0;
  2667. float2 voronoiSmoothId96 = 0;
  2668. float2 appendResult86 = (float2(break84.z , break84.x));
  2669. float2 coords96 = appendResult86 * temp_output_198_0;
  2670. float2 id96 = 0;
  2671. float2 uv96 = 0;
  2672. float fade96 = 0.5;
  2673. float voroi96 = 0;
  2674. float rest96 = 0;
  2675. for( int it96 = 0; it96 <3; it96++ ){
  2676. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  2677. rest96 += fade96;
  2678. coords96 *= 2;
  2679. fade96 *= 0.5;
  2680. }//Voronoi96
  2681. voroi96 /= rest96;
  2682. float time89 = 137.0;
  2683. float2 voronoiSmoothId89 = 0;
  2684. float2 appendResult87 = (float2(break84.x , break84.y));
  2685. float2 coords89 = appendResult87 * temp_output_198_0;
  2686. float2 id89 = 0;
  2687. float2 uv89 = 0;
  2688. float fade89 = 0.5;
  2689. float voroi89 = 0;
  2690. float rest89 = 0;
  2691. for( int it89 = 0; it89 <3; it89++ ){
  2692. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  2693. rest89 += fade89;
  2694. coords89 *= 2;
  2695. fade89 *= 0.5;
  2696. }//Voronoi89
  2697. voroi89 /= rest89;
  2698. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  2699. float NoiseColorVoronoi152 = temp_output_190_0;
  2700. float lerpResult157 = lerp( NoiseColor3D151 , NoiseColorVoronoi152 , _NoiseColorMix);
  2701. float NoiseColorMix158 = lerpResult157;
  2702. float3 temp_cast_3 = (NoiseColorMix158).xxx;
  2703. float temp_output_2_0_g159 = _NoiseColorStrength;
  2704. float temp_output_3_0_g159 = ( 1.0 - temp_output_2_0_g159 );
  2705. float3 appendResult7_g159 = (float3(temp_output_3_0_g159 , temp_output_3_0_g159 , temp_output_3_0_g159));
  2706. float3 temp_output_21_0 = ( ( temp_cast_3 * temp_output_2_0_g159 ) + appendResult7_g159 );
  2707. float4 lerpResult161 = lerp( _BaseColor , IN.ase_color , _VertexColorStrength);
  2708. float4 Albedo30 = saturate( ( float4( temp_output_21_0 , 0.0 ) * lerpResult161 ) );
  2709. float4 screenPos = IN.ase_texcoord3;
  2710. float4 ase_screenPosNorm = screenPos / screenPos.w;
  2711. ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
  2712. float clampDepth368 = SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy );
  2713. float temp_output_385_0 = abs( ( _ProjectionParams.z - _ProjectionParams.y ) );
  2714. float eyeDepth = IN.ase_texcoord4.x;
  2715. float cameraDepthFade389 = (( eyeDepth -_ProjectionParams.y - 0.0 ) / temp_output_385_0);
  2716. float temp_output_1_0_g160 = saturate( ( ( ( ( 1.0 - clampDepth368 ) - cameraDepthFade389 ) * temp_output_385_0 ) / _DepthDistance ) );
  2717. float DepthFade43 = saturate( ( ( ( pow( temp_output_1_0_g160 , 5.0 ) * 6.0 ) - ( pow( temp_output_1_0_g160 , 4.0 ) * 15.0 ) ) + ( pow( temp_output_1_0_g160 , 3.0 ) * 10.0 ) ) );
  2718. float4 temp_output_2_0_g155 = lerpResult161;
  2719. float BaseColorAlpha162 = (temp_output_2_0_g155).a;
  2720. float3 BaseColor = Albedo30.rgb;
  2721. float Alpha = ( DepthFade43 * BaseColorAlpha162 );
  2722. float AlphaClipThreshold = 0.0;
  2723. half4 color = half4(BaseColor, Alpha );
  2724. #ifdef _ALPHATEST_ON
  2725. clip(Alpha - AlphaClipThreshold);
  2726. #endif
  2727. return color;
  2728. }
  2729. ENDHLSL
  2730. }
  2731. Pass
  2732. {
  2733. Name "DepthNormals"
  2734. Tags { "LightMode"="DepthNormalsOnly" }
  2735. ZWrite On
  2736. Blend One Zero
  2737. ZTest LEqual
  2738. ZWrite On
  2739. HLSLPROGRAM
  2740. #define _NORMAL_DROPOFF_TS 1
  2741. #pragma multi_compile_instancing
  2742. #pragma multi_compile _ LOD_FADE_CROSSFADE
  2743. #define ASE_FOG 1
  2744. #define ASE_PHONG_TESSELLATION
  2745. #define ASE_DEPTH_WRITE_ON
  2746. #define ASE_TESSELLATION 1
  2747. #pragma require tessellation tessHW
  2748. #pragma hull HullFunction
  2749. #pragma domain DomainFunction
  2750. #define ASE_TRANSLUCENCY 1
  2751. #define ASE_LENGTH_TESSELLATION
  2752. #define _SURFACE_TYPE_TRANSPARENT 1
  2753. #define _EMISSION
  2754. #define _ALPHATEST_ON 1
  2755. #define ASE_SRP_VERSION 140004
  2756. #define REQUIRE_DEPTH_TEXTURE 1
  2757. #pragma multi_compile _ DOTS_INSTANCING_ON
  2758. #pragma multi_compile_fragment _ _WRITE_RENDERING_LAYERS
  2759. #pragma vertex vert
  2760. #pragma fragment frag
  2761. #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE)
  2762. #define _SPECULAR_COLOR 1
  2763. #endif
  2764. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  2765. //#define SHADERPASS SHADERPASS_DEPTHNORMALS
  2766. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  2767. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  2768. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  2769. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  2770. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  2771. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  2772. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  2773. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  2774. #if defined(LOD_FADE_CROSSFADE)
  2775. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  2776. #endif
  2777. #define ASE_NEEDS_VERT_POSITION
  2778. #define ASE_NEEDS_VERT_NORMAL
  2779. #define ASE_NEEDS_FRAG_SCREEN_POSITION
  2780. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
  2781. #define ASE_SV_DEPTH SV_DepthLessEqual
  2782. #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
  2783. #else
  2784. #define ASE_SV_DEPTH SV_Depth
  2785. #define ASE_SV_POSITION_QUALIFIERS
  2786. #endif
  2787. struct VertexInput
  2788. {
  2789. float4 positionOS : POSITION;
  2790. float3 normalOS : NORMAL;
  2791. float4 tangentOS : TANGENT;
  2792. float4 ase_color : COLOR;
  2793. UNITY_VERTEX_INPUT_INSTANCE_ID
  2794. };
  2795. struct VertexOutput
  2796. {
  2797. ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
  2798. float4 clipPosV : TEXCOORD0;
  2799. float3 worldNormal : TEXCOORD1;
  2800. float4 worldTangent : TEXCOORD2;
  2801. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  2802. float3 positionWS : TEXCOORD3;
  2803. #endif
  2804. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  2805. float4 shadowCoord : TEXCOORD4;
  2806. #endif
  2807. float4 ase_texcoord5 : TEXCOORD5;
  2808. float4 ase_color : COLOR;
  2809. UNITY_VERTEX_INPUT_INSTANCE_ID
  2810. UNITY_VERTEX_OUTPUT_STEREO
  2811. };
  2812. CBUFFER_START(UnityPerMaterial)
  2813. float4 _EmmissiveColor;
  2814. float4 _BaseColor;
  2815. float4 _Mask1;
  2816. float4 _Mask0;
  2817. float3 _NoiseScale3D;
  2818. float3 _WindDirection;
  2819. float3 _AdditionalNoiseDir;
  2820. float3 _AdditionalVoronoiDir;
  2821. float _Scale;
  2822. float _EmmissiveNoiseColor;
  2823. float _VertexColorStrength;
  2824. float _NoiseColorStrength;
  2825. float _NoiseColorMix;
  2826. float _VoronoiStrength;
  2827. float _DepthDistance;
  2828. float _VorSpeed;
  2829. float _VoronoiScale;
  2830. float _NoiseStrength;
  2831. float _NoiseScale;
  2832. float _WindSpeed;
  2833. float _NoiseSpeed;
  2834. float _NoiseDisplacement;
  2835. float _EmmissiveDepthFade;
  2836. #ifdef ASE_TRANSMISSION
  2837. float _TransmissionShadow;
  2838. #endif
  2839. #ifdef ASE_TRANSLUCENCY
  2840. float _TransStrength;
  2841. float _TransNormal;
  2842. float _TransScattering;
  2843. float _TransDirect;
  2844. float _TransAmbient;
  2845. float _TransShadow;
  2846. #endif
  2847. #ifdef ASE_TESSELLATION
  2848. float _TessPhongStrength;
  2849. float _TessValue;
  2850. float _TessMin;
  2851. float _TessMax;
  2852. float _TessEdgeLength;
  2853. float _TessMaxDisp;
  2854. #endif
  2855. CBUFFER_END
  2856. #ifdef SCENEPICKINGPASS
  2857. float4 _SelectionID;
  2858. #endif
  2859. #ifdef SCENESELECTIONPASS
  2860. int _ObjectId;
  2861. int _PassValue;
  2862. #endif
  2863. float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
  2864. float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
  2865. float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
  2866. float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
  2867. float snoise( float3 v )
  2868. {
  2869. const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
  2870. float3 i = floor( v + dot( v, C.yyy ) );
  2871. float3 x0 = v - i + dot( i, C.xxx );
  2872. float3 g = step( x0.yzx, x0.xyz );
  2873. float3 l = 1.0 - g;
  2874. float3 i1 = min( g.xyz, l.zxy );
  2875. float3 i2 = max( g.xyz, l.zxy );
  2876. float3 x1 = x0 - i1 + C.xxx;
  2877. float3 x2 = x0 - i2 + C.yyy;
  2878. float3 x3 = x0 - 0.5;
  2879. i = mod3D289( i);
  2880. float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
  2881. float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
  2882. float4 x_ = floor( j / 7.0 );
  2883. float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
  2884. float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  2885. float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  2886. float4 h = 1.0 - abs( x ) - abs( y );
  2887. float4 b0 = float4( x.xy, y.xy );
  2888. float4 b1 = float4( x.zw, y.zw );
  2889. float4 s0 = floor( b0 ) * 2.0 + 1.0;
  2890. float4 s1 = floor( b1 ) * 2.0 + 1.0;
  2891. float4 sh = -step( h, 0.0 );
  2892. float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
  2893. float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
  2894. float3 g0 = float3( a0.xy, h.x );
  2895. float3 g1 = float3( a0.zw, h.y );
  2896. float3 g2 = float3( a1.xy, h.z );
  2897. float3 g3 = float3( a1.zw, h.w );
  2898. float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
  2899. g0 *= norm.x;
  2900. g1 *= norm.y;
  2901. g2 *= norm.z;
  2902. g3 *= norm.w;
  2903. float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
  2904. m = m* m;
  2905. m = m* m;
  2906. float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
  2907. return 42.0 * dot( m, px);
  2908. }
  2909. float2 voronoihash97( float2 p )
  2910. {
  2911. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  2912. return frac( sin( p ) *43758.5453);
  2913. }
  2914. float voronoi97( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  2915. {
  2916. float2 n = floor( v );
  2917. float2 f = frac( v );
  2918. float F1 = 8.0;
  2919. float F2 = 8.0; float2 mg = 0;
  2920. for ( int j = -1; j <= 1; j++ )
  2921. {
  2922. for ( int i = -1; i <= 1; i++ )
  2923. {
  2924. float2 g = float2( i, j );
  2925. float2 o = voronoihash97( n + g );
  2926. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  2927. float d = 0.5 * dot( r, r );
  2928. if( d<F1 ) {
  2929. F2 = F1;
  2930. F1 = d; mg = g; mr = r; id = o;
  2931. } else if( d<F2 ) {
  2932. F2 = d;
  2933. }
  2934. }
  2935. }
  2936. return F1;
  2937. }
  2938. float2 voronoihash96( float2 p )
  2939. {
  2940. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  2941. return frac( sin( p ) *43758.5453);
  2942. }
  2943. float voronoi96( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  2944. {
  2945. float2 n = floor( v );
  2946. float2 f = frac( v );
  2947. float F1 = 8.0;
  2948. float F2 = 8.0; float2 mg = 0;
  2949. for ( int j = -1; j <= 1; j++ )
  2950. {
  2951. for ( int i = -1; i <= 1; i++ )
  2952. {
  2953. float2 g = float2( i, j );
  2954. float2 o = voronoihash96( n + g );
  2955. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  2956. float d = 0.5 * dot( r, r );
  2957. if( d<F1 ) {
  2958. F2 = F1;
  2959. F1 = d; mg = g; mr = r; id = o;
  2960. } else if( d<F2 ) {
  2961. F2 = d;
  2962. }
  2963. }
  2964. }
  2965. return F1;
  2966. }
  2967. float2 voronoihash89( float2 p )
  2968. {
  2969. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  2970. return frac( sin( p ) *43758.5453);
  2971. }
  2972. float voronoi89( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  2973. {
  2974. float2 n = floor( v );
  2975. float2 f = frac( v );
  2976. float F1 = 8.0;
  2977. float F2 = 8.0; float2 mg = 0;
  2978. for ( int j = -1; j <= 1; j++ )
  2979. {
  2980. for ( int i = -1; i <= 1; i++ )
  2981. {
  2982. float2 g = float2( i, j );
  2983. float2 o = voronoihash89( n + g );
  2984. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  2985. float d = 0.5 * dot( r, r );
  2986. if( d<F1 ) {
  2987. F2 = F1;
  2988. F1 = d; mg = g; mr = r; id = o;
  2989. } else if( d<F2 ) {
  2990. F2 = d;
  2991. }
  2992. }
  2993. }
  2994. return F1;
  2995. }
  2996. VertexOutput VertexFunction( VertexInput v )
  2997. {
  2998. VertexOutput o = (VertexOutput)0;
  2999. UNITY_SETUP_INSTANCE_ID(v);
  3000. UNITY_TRANSFER_INSTANCE_ID(v, o);
  3001. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  3002. #if ( SHADER_TARGET >= 50 )
  3003. float recip367 = rcp( _Scale );
  3004. #else
  3005. float recip367 = 1.0 / _Scale;
  3006. #endif
  3007. float Scale228 = recip367;
  3008. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  3009. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  3010. float3 break332 = WindDir317;
  3011. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  3012. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  3013. float4 WindDirWeights341 = appendResult340;
  3014. float4 break344 = abs( WindDirWeights341 );
  3015. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  3016. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  3017. float4 transform70 = mul(GetObjectToWorldMatrix(),v.positionOS);
  3018. float4 temp_output_71_0 = (transform70).xyzw;
  3019. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  3020. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  3021. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  3022. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  3023. float time97 = 0.0;
  3024. float2 voronoiSmoothId97 = 0;
  3025. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  3026. float2 appendResult85 = (float2(break84.z , break84.y));
  3027. float2 coords97 = appendResult85 * temp_output_198_0;
  3028. float2 id97 = 0;
  3029. float2 uv97 = 0;
  3030. float fade97 = 0.5;
  3031. float voroi97 = 0;
  3032. float rest97 = 0;
  3033. for( int it97 = 0; it97 <3; it97++ ){
  3034. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  3035. rest97 += fade97;
  3036. coords97 *= 2;
  3037. fade97 *= 0.5;
  3038. }//Voronoi97
  3039. voroi97 /= rest97;
  3040. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( v.normalOS, 0 ) ).xyz;
  3041. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  3042. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  3043. float3 break104 = ( temp_output_93_0 / dotResult94 );
  3044. float time96 = 217.0;
  3045. float2 voronoiSmoothId96 = 0;
  3046. float2 appendResult86 = (float2(break84.z , break84.x));
  3047. float2 coords96 = appendResult86 * temp_output_198_0;
  3048. float2 id96 = 0;
  3049. float2 uv96 = 0;
  3050. float fade96 = 0.5;
  3051. float voroi96 = 0;
  3052. float rest96 = 0;
  3053. for( int it96 = 0; it96 <3; it96++ ){
  3054. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  3055. rest96 += fade96;
  3056. coords96 *= 2;
  3057. fade96 *= 0.5;
  3058. }//Voronoi96
  3059. voroi96 /= rest96;
  3060. float time89 = 137.0;
  3061. float2 voronoiSmoothId89 = 0;
  3062. float2 appendResult87 = (float2(break84.x , break84.y));
  3063. float2 coords89 = appendResult87 * temp_output_198_0;
  3064. float2 id89 = 0;
  3065. float2 uv89 = 0;
  3066. float fade89 = 0.5;
  3067. float voroi89 = 0;
  3068. float rest89 = 0;
  3069. for( int it89 = 0; it89 <3; it89++ ){
  3070. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  3071. rest89 += fade89;
  3072. coords89 *= 2;
  3073. fade89 *= 0.5;
  3074. }//Voronoi89
  3075. voroi89 /= rest89;
  3076. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  3077. float temp_output_122_0 = saturate( ( ( temp_output_118_0 * _NoiseStrength ) + ( temp_output_190_0 * _VoronoiStrength ) ) );
  3078. float3 ase_objectScale = float3( length( GetObjectToWorldMatrix()[ 0 ].xyz ), length( GetObjectToWorldMatrix()[ 1 ].xyz ), length( GetObjectToWorldMatrix()[ 2 ].xyz ) );
  3079. float3 temp_output_184_0 = ( ( ( temp_output_122_0 - 0.5 ) * v.normalOS * ( _NoiseDisplacement / Scale228 ) ) / ase_objectScale );
  3080. float4 temp_output_2_0_g146 = _Mask0;
  3081. float3 worldToObj306 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g146).xyz, 1 ) ).xyz;
  3082. float3 ase_objectPosition = GetAbsolutePositionWS( UNITY_MATRIX_M._m03_m13_m23 );
  3083. float4 appendResult313 = (float4((temp_output_2_0_g146).w , 0.0 , 0.0 , 0.0));
  3084. float3 worldToObj307 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult313 ).xyz, 1 ) ).xyz;
  3085. float3 temp_output_304_0 = ( temp_output_184_0 + ( min( ( distance( ( temp_output_184_0 + v.positionOS.xyz ) , worldToObj306 ) - length( worldToObj307 ) ) , 0.0 ) * v.normalOS ) );
  3086. float4 temp_output_2_0_g153 = _Mask1;
  3087. float3 worldToObj357 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g153).xyz, 1 ) ).xyz;
  3088. float4 appendResult354 = (float4((temp_output_2_0_g153).w , 0.0 , 0.0 , 0.0));
  3089. float3 worldToObj358 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult354 ).xyz, 1 ) ).xyz;
  3090. float3 VertexOffset305 = ( temp_output_304_0 + ( min( ( distance( ( temp_output_304_0 + v.positionOS.xyz ) , worldToObj357 ) - length( worldToObj358 ) ) , 0.0 ) * v.normalOS ) );
  3091. float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.positionOS.xyz));
  3092. float eyeDepth = -objectToViewPos.z;
  3093. o.ase_texcoord5.x = eyeDepth;
  3094. o.ase_color = v.ase_color;
  3095. //setting value to unused interpolator channels and avoid initialization warnings
  3096. o.ase_texcoord5.yzw = 0;
  3097. #ifdef ASE_ABSOLUTE_VERTEX_POS
  3098. float3 defaultVertexValue = v.positionOS.xyz;
  3099. #else
  3100. float3 defaultVertexValue = float3(0, 0, 0);
  3101. #endif
  3102. float3 vertexValue = VertexOffset305;
  3103. #ifdef ASE_ABSOLUTE_VERTEX_POS
  3104. v.positionOS.xyz = vertexValue;
  3105. #else
  3106. v.positionOS.xyz += vertexValue;
  3107. #endif
  3108. v.normalOS = v.normalOS;
  3109. v.tangentOS = v.tangentOS;
  3110. VertexPositionInputs vertexInput = GetVertexPositionInputs( v.positionOS.xyz );
  3111. float3 normalWS = TransformObjectToWorldNormal( v.normalOS );
  3112. float4 tangentWS = float4( TransformObjectToWorldDir( v.tangentOS.xyz ), v.tangentOS.w );
  3113. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  3114. o.positionWS = vertexInput.positionWS;
  3115. #endif
  3116. o.worldNormal = normalWS;
  3117. o.worldTangent = tangentWS;
  3118. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  3119. o.shadowCoord = GetShadowCoord( vertexInput );
  3120. #endif
  3121. o.positionCS = vertexInput.positionCS;
  3122. o.clipPosV = vertexInput.positionCS;
  3123. return o;
  3124. }
  3125. #if defined(ASE_TESSELLATION)
  3126. struct VertexControl
  3127. {
  3128. float4 vertex : INTERNALTESSPOS;
  3129. float3 normalOS : NORMAL;
  3130. float4 tangentOS : TANGENT;
  3131. float4 ase_color : COLOR;
  3132. UNITY_VERTEX_INPUT_INSTANCE_ID
  3133. };
  3134. struct TessellationFactors
  3135. {
  3136. float edge[3] : SV_TessFactor;
  3137. float inside : SV_InsideTessFactor;
  3138. };
  3139. VertexControl vert ( VertexInput v )
  3140. {
  3141. VertexControl o;
  3142. UNITY_SETUP_INSTANCE_ID(v);
  3143. UNITY_TRANSFER_INSTANCE_ID(v, o);
  3144. o.vertex = v.positionOS;
  3145. o.normalOS = v.normalOS;
  3146. o.tangentOS = v.tangentOS;
  3147. o.ase_color = v.ase_color;
  3148. return o;
  3149. }
  3150. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  3151. {
  3152. TessellationFactors o;
  3153. float4 tf = 1;
  3154. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  3155. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  3156. #if defined(ASE_FIXED_TESSELLATION)
  3157. tf = FixedTess( tessValue );
  3158. #elif defined(ASE_DISTANCE_TESSELLATION)
  3159. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  3160. #elif defined(ASE_LENGTH_TESSELLATION)
  3161. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  3162. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  3163. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  3164. #endif
  3165. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  3166. return o;
  3167. }
  3168. [domain("tri")]
  3169. [partitioning("fractional_odd")]
  3170. [outputtopology("triangle_cw")]
  3171. [patchconstantfunc("TessellationFunction")]
  3172. [outputcontrolpoints(3)]
  3173. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  3174. {
  3175. return patch[id];
  3176. }
  3177. [domain("tri")]
  3178. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  3179. {
  3180. VertexInput o = (VertexInput) 0;
  3181. o.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  3182. o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  3183. o.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z;
  3184. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  3185. #if defined(ASE_PHONG_TESSELLATION)
  3186. float3 pp[3];
  3187. for (int i = 0; i < 3; ++i)
  3188. pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  3189. float phongStrength = _TessPhongStrength;
  3190. o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz;
  3191. #endif
  3192. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  3193. return VertexFunction(o);
  3194. }
  3195. #else
  3196. VertexOutput vert ( VertexInput v )
  3197. {
  3198. return VertexFunction( v );
  3199. }
  3200. #endif
  3201. void frag( VertexOutput IN
  3202. , out half4 outNormalWS : SV_Target0
  3203. #ifdef ASE_DEPTH_WRITE_ON
  3204. ,out float outputDepth : ASE_SV_DEPTH
  3205. #endif
  3206. #ifdef _WRITE_RENDERING_LAYERS
  3207. , out float4 outRenderingLayers : SV_Target1
  3208. #endif
  3209. )
  3210. {
  3211. UNITY_SETUP_INSTANCE_ID(IN);
  3212. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  3213. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  3214. float3 WorldPosition = IN.positionWS;
  3215. #endif
  3216. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  3217. float3 WorldNormal = IN.worldNormal;
  3218. float4 WorldTangent = IN.worldTangent;
  3219. float4 ClipPos = IN.clipPosV;
  3220. float4 ScreenPos = ComputeScreenPos( IN.clipPosV );
  3221. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  3222. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  3223. ShadowCoords = IN.shadowCoord;
  3224. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  3225. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  3226. #endif
  3227. #endif
  3228. float4 ase_screenPosNorm = ScreenPos / ScreenPos.w;
  3229. ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
  3230. float clampDepth368 = SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy );
  3231. float temp_output_385_0 = abs( ( _ProjectionParams.z - _ProjectionParams.y ) );
  3232. float eyeDepth = IN.ase_texcoord5.x;
  3233. float cameraDepthFade389 = (( eyeDepth -_ProjectionParams.y - 0.0 ) / temp_output_385_0);
  3234. float temp_output_1_0_g160 = saturate( ( ( ( ( 1.0 - clampDepth368 ) - cameraDepthFade389 ) * temp_output_385_0 ) / _DepthDistance ) );
  3235. float DepthFade43 = saturate( ( ( ( pow( temp_output_1_0_g160 , 5.0 ) * 6.0 ) - ( pow( temp_output_1_0_g160 , 4.0 ) * 15.0 ) ) + ( pow( temp_output_1_0_g160 , 3.0 ) * 10.0 ) ) );
  3236. float4 lerpResult161 = lerp( _BaseColor , IN.ase_color , _VertexColorStrength);
  3237. float4 temp_output_2_0_g155 = lerpResult161;
  3238. float BaseColorAlpha162 = (temp_output_2_0_g155).a;
  3239. float3 Normal = float3(0, 0, 1);
  3240. float Alpha = ( DepthFade43 * BaseColorAlpha162 );
  3241. float AlphaClipThreshold = 0.0;
  3242. #ifdef ASE_DEPTH_WRITE_ON
  3243. float DepthValue = IN.positionCS.z;
  3244. #endif
  3245. #ifdef _ALPHATEST_ON
  3246. clip(Alpha - AlphaClipThreshold);
  3247. #endif
  3248. #if defined(LOD_FADE_CROSSFADE)
  3249. LODFadeCrossFade( IN.positionCS );
  3250. #endif
  3251. #ifdef ASE_DEPTH_WRITE_ON
  3252. outputDepth = DepthValue;
  3253. #endif
  3254. #if defined(_GBUFFER_NORMALS_OCT)
  3255. float2 octNormalWS = PackNormalOctQuadEncode(WorldNormal);
  3256. float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5);
  3257. half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS);
  3258. outNormalWS = half4(packedNormalWS, 0.0);
  3259. #else
  3260. #if defined(_NORMALMAP)
  3261. #if _NORMAL_DROPOFF_TS
  3262. float crossSign = (WorldTangent.w > 0.0 ? 1.0 : -1.0) * GetOddNegativeScale();
  3263. float3 bitangent = crossSign * cross(WorldNormal.xyz, WorldTangent.xyz);
  3264. float3 normalWS = TransformTangentToWorld(Normal, half3x3(WorldTangent.xyz, bitangent, WorldNormal.xyz));
  3265. #elif _NORMAL_DROPOFF_OS
  3266. float3 normalWS = TransformObjectToWorldNormal(Normal);
  3267. #elif _NORMAL_DROPOFF_WS
  3268. float3 normalWS = Normal;
  3269. #endif
  3270. #else
  3271. float3 normalWS = WorldNormal;
  3272. #endif
  3273. outNormalWS = half4(NormalizeNormalPerPixel(normalWS), 0.0);
  3274. #endif
  3275. #ifdef _WRITE_RENDERING_LAYERS
  3276. uint renderingLayers = GetMeshRenderingLayer();
  3277. outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 );
  3278. #endif
  3279. }
  3280. ENDHLSL
  3281. }
  3282. Pass
  3283. {
  3284. Name "SceneSelectionPass"
  3285. Tags { "LightMode"="SceneSelectionPass" }
  3286. Cull Off
  3287. AlphaToMask Off
  3288. HLSLPROGRAM
  3289. #define _NORMAL_DROPOFF_TS 1
  3290. #define ASE_FOG 1
  3291. #define ASE_PHONG_TESSELLATION
  3292. #define ASE_DEPTH_WRITE_ON
  3293. #define ASE_TESSELLATION 1
  3294. #pragma require tessellation tessHW
  3295. #pragma hull HullFunction
  3296. #pragma domain DomainFunction
  3297. #define ASE_TRANSLUCENCY 1
  3298. #define ASE_LENGTH_TESSELLATION
  3299. #define _SURFACE_TYPE_TRANSPARENT 1
  3300. #define _EMISSION
  3301. #define _ALPHATEST_ON 1
  3302. #define ASE_SRP_VERSION 140004
  3303. #define REQUIRE_DEPTH_TEXTURE 1
  3304. #pragma multi_compile _ DOTS_INSTANCING_ON
  3305. #pragma vertex vert
  3306. #pragma fragment frag
  3307. #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE)
  3308. #define _SPECULAR_COLOR 1
  3309. #endif
  3310. #define SCENESELECTIONPASS 1
  3311. #define ATTRIBUTES_NEED_NORMAL
  3312. #define ATTRIBUTES_NEED_TANGENT
  3313. #define SHADERPASS SHADERPASS_DEPTHONLY
  3314. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  3315. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  3316. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  3317. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  3318. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  3319. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  3320. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  3321. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  3322. #define ASE_NEEDS_VERT_POSITION
  3323. #define ASE_NEEDS_VERT_NORMAL
  3324. struct VertexInput
  3325. {
  3326. float4 positionOS : POSITION;
  3327. float3 normalOS : NORMAL;
  3328. float4 ase_color : COLOR;
  3329. UNITY_VERTEX_INPUT_INSTANCE_ID
  3330. };
  3331. struct VertexOutput
  3332. {
  3333. float4 positionCS : SV_POSITION;
  3334. float4 ase_texcoord : TEXCOORD0;
  3335. float4 ase_texcoord1 : TEXCOORD1;
  3336. float4 ase_color : COLOR;
  3337. UNITY_VERTEX_INPUT_INSTANCE_ID
  3338. UNITY_VERTEX_OUTPUT_STEREO
  3339. };
  3340. CBUFFER_START(UnityPerMaterial)
  3341. float4 _EmmissiveColor;
  3342. float4 _BaseColor;
  3343. float4 _Mask1;
  3344. float4 _Mask0;
  3345. float3 _NoiseScale3D;
  3346. float3 _WindDirection;
  3347. float3 _AdditionalNoiseDir;
  3348. float3 _AdditionalVoronoiDir;
  3349. float _Scale;
  3350. float _EmmissiveNoiseColor;
  3351. float _VertexColorStrength;
  3352. float _NoiseColorStrength;
  3353. float _NoiseColorMix;
  3354. float _VoronoiStrength;
  3355. float _DepthDistance;
  3356. float _VorSpeed;
  3357. float _VoronoiScale;
  3358. float _NoiseStrength;
  3359. float _NoiseScale;
  3360. float _WindSpeed;
  3361. float _NoiseSpeed;
  3362. float _NoiseDisplacement;
  3363. float _EmmissiveDepthFade;
  3364. #ifdef ASE_TRANSMISSION
  3365. float _TransmissionShadow;
  3366. #endif
  3367. #ifdef ASE_TRANSLUCENCY
  3368. float _TransStrength;
  3369. float _TransNormal;
  3370. float _TransScattering;
  3371. float _TransDirect;
  3372. float _TransAmbient;
  3373. float _TransShadow;
  3374. #endif
  3375. #ifdef ASE_TESSELLATION
  3376. float _TessPhongStrength;
  3377. float _TessValue;
  3378. float _TessMin;
  3379. float _TessMax;
  3380. float _TessEdgeLength;
  3381. float _TessMaxDisp;
  3382. #endif
  3383. CBUFFER_END
  3384. #ifdef SCENEPICKINGPASS
  3385. float4 _SelectionID;
  3386. #endif
  3387. #ifdef SCENESELECTIONPASS
  3388. int _ObjectId;
  3389. int _PassValue;
  3390. #endif
  3391. float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
  3392. float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
  3393. float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
  3394. float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
  3395. float snoise( float3 v )
  3396. {
  3397. const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
  3398. float3 i = floor( v + dot( v, C.yyy ) );
  3399. float3 x0 = v - i + dot( i, C.xxx );
  3400. float3 g = step( x0.yzx, x0.xyz );
  3401. float3 l = 1.0 - g;
  3402. float3 i1 = min( g.xyz, l.zxy );
  3403. float3 i2 = max( g.xyz, l.zxy );
  3404. float3 x1 = x0 - i1 + C.xxx;
  3405. float3 x2 = x0 - i2 + C.yyy;
  3406. float3 x3 = x0 - 0.5;
  3407. i = mod3D289( i);
  3408. float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
  3409. float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
  3410. float4 x_ = floor( j / 7.0 );
  3411. float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
  3412. float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  3413. float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  3414. float4 h = 1.0 - abs( x ) - abs( y );
  3415. float4 b0 = float4( x.xy, y.xy );
  3416. float4 b1 = float4( x.zw, y.zw );
  3417. float4 s0 = floor( b0 ) * 2.0 + 1.0;
  3418. float4 s1 = floor( b1 ) * 2.0 + 1.0;
  3419. float4 sh = -step( h, 0.0 );
  3420. float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
  3421. float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
  3422. float3 g0 = float3( a0.xy, h.x );
  3423. float3 g1 = float3( a0.zw, h.y );
  3424. float3 g2 = float3( a1.xy, h.z );
  3425. float3 g3 = float3( a1.zw, h.w );
  3426. float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
  3427. g0 *= norm.x;
  3428. g1 *= norm.y;
  3429. g2 *= norm.z;
  3430. g3 *= norm.w;
  3431. float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
  3432. m = m* m;
  3433. m = m* m;
  3434. float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
  3435. return 42.0 * dot( m, px);
  3436. }
  3437. float2 voronoihash97( float2 p )
  3438. {
  3439. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  3440. return frac( sin( p ) *43758.5453);
  3441. }
  3442. float voronoi97( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  3443. {
  3444. float2 n = floor( v );
  3445. float2 f = frac( v );
  3446. float F1 = 8.0;
  3447. float F2 = 8.0; float2 mg = 0;
  3448. for ( int j = -1; j <= 1; j++ )
  3449. {
  3450. for ( int i = -1; i <= 1; i++ )
  3451. {
  3452. float2 g = float2( i, j );
  3453. float2 o = voronoihash97( n + g );
  3454. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  3455. float d = 0.5 * dot( r, r );
  3456. if( d<F1 ) {
  3457. F2 = F1;
  3458. F1 = d; mg = g; mr = r; id = o;
  3459. } else if( d<F2 ) {
  3460. F2 = d;
  3461. }
  3462. }
  3463. }
  3464. return F1;
  3465. }
  3466. float2 voronoihash96( float2 p )
  3467. {
  3468. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  3469. return frac( sin( p ) *43758.5453);
  3470. }
  3471. float voronoi96( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  3472. {
  3473. float2 n = floor( v );
  3474. float2 f = frac( v );
  3475. float F1 = 8.0;
  3476. float F2 = 8.0; float2 mg = 0;
  3477. for ( int j = -1; j <= 1; j++ )
  3478. {
  3479. for ( int i = -1; i <= 1; i++ )
  3480. {
  3481. float2 g = float2( i, j );
  3482. float2 o = voronoihash96( n + g );
  3483. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  3484. float d = 0.5 * dot( r, r );
  3485. if( d<F1 ) {
  3486. F2 = F1;
  3487. F1 = d; mg = g; mr = r; id = o;
  3488. } else if( d<F2 ) {
  3489. F2 = d;
  3490. }
  3491. }
  3492. }
  3493. return F1;
  3494. }
  3495. float2 voronoihash89( float2 p )
  3496. {
  3497. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  3498. return frac( sin( p ) *43758.5453);
  3499. }
  3500. float voronoi89( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  3501. {
  3502. float2 n = floor( v );
  3503. float2 f = frac( v );
  3504. float F1 = 8.0;
  3505. float F2 = 8.0; float2 mg = 0;
  3506. for ( int j = -1; j <= 1; j++ )
  3507. {
  3508. for ( int i = -1; i <= 1; i++ )
  3509. {
  3510. float2 g = float2( i, j );
  3511. float2 o = voronoihash89( n + g );
  3512. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  3513. float d = 0.5 * dot( r, r );
  3514. if( d<F1 ) {
  3515. F2 = F1;
  3516. F1 = d; mg = g; mr = r; id = o;
  3517. } else if( d<F2 ) {
  3518. F2 = d;
  3519. }
  3520. }
  3521. }
  3522. return F1;
  3523. }
  3524. struct SurfaceDescription
  3525. {
  3526. float Alpha;
  3527. float AlphaClipThreshold;
  3528. };
  3529. VertexOutput VertexFunction(VertexInput v )
  3530. {
  3531. VertexOutput o;
  3532. ZERO_INITIALIZE(VertexOutput, o);
  3533. UNITY_SETUP_INSTANCE_ID(v);
  3534. UNITY_TRANSFER_INSTANCE_ID(v, o);
  3535. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  3536. #if ( SHADER_TARGET >= 50 )
  3537. float recip367 = rcp( _Scale );
  3538. #else
  3539. float recip367 = 1.0 / _Scale;
  3540. #endif
  3541. float Scale228 = recip367;
  3542. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  3543. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  3544. float3 break332 = WindDir317;
  3545. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  3546. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  3547. float4 WindDirWeights341 = appendResult340;
  3548. float4 break344 = abs( WindDirWeights341 );
  3549. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  3550. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  3551. float4 transform70 = mul(GetObjectToWorldMatrix(),v.positionOS);
  3552. float4 temp_output_71_0 = (transform70).xyzw;
  3553. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  3554. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  3555. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  3556. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  3557. float time97 = 0.0;
  3558. float2 voronoiSmoothId97 = 0;
  3559. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  3560. float2 appendResult85 = (float2(break84.z , break84.y));
  3561. float2 coords97 = appendResult85 * temp_output_198_0;
  3562. float2 id97 = 0;
  3563. float2 uv97 = 0;
  3564. float fade97 = 0.5;
  3565. float voroi97 = 0;
  3566. float rest97 = 0;
  3567. for( int it97 = 0; it97 <3; it97++ ){
  3568. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  3569. rest97 += fade97;
  3570. coords97 *= 2;
  3571. fade97 *= 0.5;
  3572. }//Voronoi97
  3573. voroi97 /= rest97;
  3574. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( v.normalOS, 0 ) ).xyz;
  3575. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  3576. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  3577. float3 break104 = ( temp_output_93_0 / dotResult94 );
  3578. float time96 = 217.0;
  3579. float2 voronoiSmoothId96 = 0;
  3580. float2 appendResult86 = (float2(break84.z , break84.x));
  3581. float2 coords96 = appendResult86 * temp_output_198_0;
  3582. float2 id96 = 0;
  3583. float2 uv96 = 0;
  3584. float fade96 = 0.5;
  3585. float voroi96 = 0;
  3586. float rest96 = 0;
  3587. for( int it96 = 0; it96 <3; it96++ ){
  3588. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  3589. rest96 += fade96;
  3590. coords96 *= 2;
  3591. fade96 *= 0.5;
  3592. }//Voronoi96
  3593. voroi96 /= rest96;
  3594. float time89 = 137.0;
  3595. float2 voronoiSmoothId89 = 0;
  3596. float2 appendResult87 = (float2(break84.x , break84.y));
  3597. float2 coords89 = appendResult87 * temp_output_198_0;
  3598. float2 id89 = 0;
  3599. float2 uv89 = 0;
  3600. float fade89 = 0.5;
  3601. float voroi89 = 0;
  3602. float rest89 = 0;
  3603. for( int it89 = 0; it89 <3; it89++ ){
  3604. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  3605. rest89 += fade89;
  3606. coords89 *= 2;
  3607. fade89 *= 0.5;
  3608. }//Voronoi89
  3609. voroi89 /= rest89;
  3610. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  3611. float temp_output_122_0 = saturate( ( ( temp_output_118_0 * _NoiseStrength ) + ( temp_output_190_0 * _VoronoiStrength ) ) );
  3612. float3 ase_objectScale = float3( length( GetObjectToWorldMatrix()[ 0 ].xyz ), length( GetObjectToWorldMatrix()[ 1 ].xyz ), length( GetObjectToWorldMatrix()[ 2 ].xyz ) );
  3613. float3 temp_output_184_0 = ( ( ( temp_output_122_0 - 0.5 ) * v.normalOS * ( _NoiseDisplacement / Scale228 ) ) / ase_objectScale );
  3614. float4 temp_output_2_0_g146 = _Mask0;
  3615. float3 worldToObj306 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g146).xyz, 1 ) ).xyz;
  3616. float3 ase_objectPosition = GetAbsolutePositionWS( UNITY_MATRIX_M._m03_m13_m23 );
  3617. float4 appendResult313 = (float4((temp_output_2_0_g146).w , 0.0 , 0.0 , 0.0));
  3618. float3 worldToObj307 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult313 ).xyz, 1 ) ).xyz;
  3619. float3 temp_output_304_0 = ( temp_output_184_0 + ( min( ( distance( ( temp_output_184_0 + v.positionOS.xyz ) , worldToObj306 ) - length( worldToObj307 ) ) , 0.0 ) * v.normalOS ) );
  3620. float4 temp_output_2_0_g153 = _Mask1;
  3621. float3 worldToObj357 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g153).xyz, 1 ) ).xyz;
  3622. float4 appendResult354 = (float4((temp_output_2_0_g153).w , 0.0 , 0.0 , 0.0));
  3623. float3 worldToObj358 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult354 ).xyz, 1 ) ).xyz;
  3624. float3 VertexOffset305 = ( temp_output_304_0 + ( min( ( distance( ( temp_output_304_0 + v.positionOS.xyz ) , worldToObj357 ) - length( worldToObj358 ) ) , 0.0 ) * v.normalOS ) );
  3625. float4 ase_clipPos = TransformObjectToHClip((v.positionOS).xyz);
  3626. float4 screenPos = ComputeScreenPos(ase_clipPos);
  3627. o.ase_texcoord = screenPos;
  3628. float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.positionOS.xyz));
  3629. float eyeDepth = -objectToViewPos.z;
  3630. o.ase_texcoord1.x = eyeDepth;
  3631. o.ase_color = v.ase_color;
  3632. //setting value to unused interpolator channels and avoid initialization warnings
  3633. o.ase_texcoord1.yzw = 0;
  3634. #ifdef ASE_ABSOLUTE_VERTEX_POS
  3635. float3 defaultVertexValue = v.positionOS.xyz;
  3636. #else
  3637. float3 defaultVertexValue = float3(0, 0, 0);
  3638. #endif
  3639. float3 vertexValue = VertexOffset305;
  3640. #ifdef ASE_ABSOLUTE_VERTEX_POS
  3641. v.positionOS.xyz = vertexValue;
  3642. #else
  3643. v.positionOS.xyz += vertexValue;
  3644. #endif
  3645. v.normalOS = v.normalOS;
  3646. float3 positionWS = TransformObjectToWorld( v.positionOS.xyz );
  3647. o.positionCS = TransformWorldToHClip(positionWS);
  3648. return o;
  3649. }
  3650. #if defined(ASE_TESSELLATION)
  3651. struct VertexControl
  3652. {
  3653. float4 vertex : INTERNALTESSPOS;
  3654. float3 normalOS : NORMAL;
  3655. float4 ase_color : COLOR;
  3656. UNITY_VERTEX_INPUT_INSTANCE_ID
  3657. };
  3658. struct TessellationFactors
  3659. {
  3660. float edge[3] : SV_TessFactor;
  3661. float inside : SV_InsideTessFactor;
  3662. };
  3663. VertexControl vert ( VertexInput v )
  3664. {
  3665. VertexControl o;
  3666. UNITY_SETUP_INSTANCE_ID(v);
  3667. UNITY_TRANSFER_INSTANCE_ID(v, o);
  3668. o.vertex = v.positionOS;
  3669. o.normalOS = v.normalOS;
  3670. o.ase_color = v.ase_color;
  3671. return o;
  3672. }
  3673. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  3674. {
  3675. TessellationFactors o;
  3676. float4 tf = 1;
  3677. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  3678. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  3679. #if defined(ASE_FIXED_TESSELLATION)
  3680. tf = FixedTess( tessValue );
  3681. #elif defined(ASE_DISTANCE_TESSELLATION)
  3682. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  3683. #elif defined(ASE_LENGTH_TESSELLATION)
  3684. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  3685. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  3686. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  3687. #endif
  3688. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  3689. return o;
  3690. }
  3691. [domain("tri")]
  3692. [partitioning("fractional_odd")]
  3693. [outputtopology("triangle_cw")]
  3694. [patchconstantfunc("TessellationFunction")]
  3695. [outputcontrolpoints(3)]
  3696. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  3697. {
  3698. return patch[id];
  3699. }
  3700. [domain("tri")]
  3701. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  3702. {
  3703. VertexInput o = (VertexInput) 0;
  3704. o.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  3705. o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  3706. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  3707. #if defined(ASE_PHONG_TESSELLATION)
  3708. float3 pp[3];
  3709. for (int i = 0; i < 3; ++i)
  3710. pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  3711. float phongStrength = _TessPhongStrength;
  3712. o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz;
  3713. #endif
  3714. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  3715. return VertexFunction(o);
  3716. }
  3717. #else
  3718. VertexOutput vert ( VertexInput v )
  3719. {
  3720. return VertexFunction( v );
  3721. }
  3722. #endif
  3723. half4 frag(VertexOutput IN ) : SV_TARGET
  3724. {
  3725. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  3726. float4 screenPos = IN.ase_texcoord;
  3727. float4 ase_screenPosNorm = screenPos / screenPos.w;
  3728. ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
  3729. float clampDepth368 = SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy );
  3730. float temp_output_385_0 = abs( ( _ProjectionParams.z - _ProjectionParams.y ) );
  3731. float eyeDepth = IN.ase_texcoord1.x;
  3732. float cameraDepthFade389 = (( eyeDepth -_ProjectionParams.y - 0.0 ) / temp_output_385_0);
  3733. float temp_output_1_0_g160 = saturate( ( ( ( ( 1.0 - clampDepth368 ) - cameraDepthFade389 ) * temp_output_385_0 ) / _DepthDistance ) );
  3734. float DepthFade43 = saturate( ( ( ( pow( temp_output_1_0_g160 , 5.0 ) * 6.0 ) - ( pow( temp_output_1_0_g160 , 4.0 ) * 15.0 ) ) + ( pow( temp_output_1_0_g160 , 3.0 ) * 10.0 ) ) );
  3735. float4 lerpResult161 = lerp( _BaseColor , IN.ase_color , _VertexColorStrength);
  3736. float4 temp_output_2_0_g155 = lerpResult161;
  3737. float BaseColorAlpha162 = (temp_output_2_0_g155).a;
  3738. surfaceDescription.Alpha = ( DepthFade43 * BaseColorAlpha162 );
  3739. surfaceDescription.AlphaClipThreshold = 0.0;
  3740. #if _ALPHATEST_ON
  3741. float alphaClipThreshold = 0.01f;
  3742. #if ALPHA_CLIP_THRESHOLD
  3743. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  3744. #endif
  3745. clip(surfaceDescription.Alpha - alphaClipThreshold);
  3746. #endif
  3747. half4 outColor = 0;
  3748. #ifdef SCENESELECTIONPASS
  3749. outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  3750. #elif defined(SCENEPICKINGPASS)
  3751. outColor = _SelectionID;
  3752. #endif
  3753. return outColor;
  3754. }
  3755. ENDHLSL
  3756. }
  3757. Pass
  3758. {
  3759. Name "ScenePickingPass"
  3760. Tags { "LightMode"="Picking" }
  3761. AlphaToMask Off
  3762. HLSLPROGRAM
  3763. #define _NORMAL_DROPOFF_TS 1
  3764. #define ASE_FOG 1
  3765. #define ASE_PHONG_TESSELLATION
  3766. #define ASE_DEPTH_WRITE_ON
  3767. #define ASE_TESSELLATION 1
  3768. #pragma require tessellation tessHW
  3769. #pragma hull HullFunction
  3770. #pragma domain DomainFunction
  3771. #define ASE_TRANSLUCENCY 1
  3772. #define ASE_LENGTH_TESSELLATION
  3773. #define _SURFACE_TYPE_TRANSPARENT 1
  3774. #define _EMISSION
  3775. #define _ALPHATEST_ON 1
  3776. #define ASE_SRP_VERSION 140004
  3777. #define REQUIRE_DEPTH_TEXTURE 1
  3778. #pragma multi_compile _ DOTS_INSTANCING_ON
  3779. #pragma vertex vert
  3780. #pragma fragment frag
  3781. #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE)
  3782. #define _SPECULAR_COLOR 1
  3783. #endif
  3784. #define SCENEPICKINGPASS 1
  3785. #define ATTRIBUTES_NEED_NORMAL
  3786. #define ATTRIBUTES_NEED_TANGENT
  3787. #define SHADERPASS SHADERPASS_DEPTHONLY
  3788. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  3789. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  3790. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  3791. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  3792. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  3793. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  3794. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  3795. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  3796. #define ASE_NEEDS_VERT_POSITION
  3797. #define ASE_NEEDS_VERT_NORMAL
  3798. struct VertexInput
  3799. {
  3800. float4 positionOS : POSITION;
  3801. float3 normalOS : NORMAL;
  3802. float4 ase_color : COLOR;
  3803. UNITY_VERTEX_INPUT_INSTANCE_ID
  3804. };
  3805. struct VertexOutput
  3806. {
  3807. float4 positionCS : SV_POSITION;
  3808. float4 ase_texcoord : TEXCOORD0;
  3809. float4 ase_texcoord1 : TEXCOORD1;
  3810. float4 ase_color : COLOR;
  3811. UNITY_VERTEX_INPUT_INSTANCE_ID
  3812. UNITY_VERTEX_OUTPUT_STEREO
  3813. };
  3814. CBUFFER_START(UnityPerMaterial)
  3815. float4 _EmmissiveColor;
  3816. float4 _BaseColor;
  3817. float4 _Mask1;
  3818. float4 _Mask0;
  3819. float3 _NoiseScale3D;
  3820. float3 _WindDirection;
  3821. float3 _AdditionalNoiseDir;
  3822. float3 _AdditionalVoronoiDir;
  3823. float _Scale;
  3824. float _EmmissiveNoiseColor;
  3825. float _VertexColorStrength;
  3826. float _NoiseColorStrength;
  3827. float _NoiseColorMix;
  3828. float _VoronoiStrength;
  3829. float _DepthDistance;
  3830. float _VorSpeed;
  3831. float _VoronoiScale;
  3832. float _NoiseStrength;
  3833. float _NoiseScale;
  3834. float _WindSpeed;
  3835. float _NoiseSpeed;
  3836. float _NoiseDisplacement;
  3837. float _EmmissiveDepthFade;
  3838. #ifdef ASE_TRANSMISSION
  3839. float _TransmissionShadow;
  3840. #endif
  3841. #ifdef ASE_TRANSLUCENCY
  3842. float _TransStrength;
  3843. float _TransNormal;
  3844. float _TransScattering;
  3845. float _TransDirect;
  3846. float _TransAmbient;
  3847. float _TransShadow;
  3848. #endif
  3849. #ifdef ASE_TESSELLATION
  3850. float _TessPhongStrength;
  3851. float _TessValue;
  3852. float _TessMin;
  3853. float _TessMax;
  3854. float _TessEdgeLength;
  3855. float _TessMaxDisp;
  3856. #endif
  3857. CBUFFER_END
  3858. #ifdef SCENEPICKINGPASS
  3859. float4 _SelectionID;
  3860. #endif
  3861. #ifdef SCENESELECTIONPASS
  3862. int _ObjectId;
  3863. int _PassValue;
  3864. #endif
  3865. float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
  3866. float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
  3867. float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
  3868. float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
  3869. float snoise( float3 v )
  3870. {
  3871. const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
  3872. float3 i = floor( v + dot( v, C.yyy ) );
  3873. float3 x0 = v - i + dot( i, C.xxx );
  3874. float3 g = step( x0.yzx, x0.xyz );
  3875. float3 l = 1.0 - g;
  3876. float3 i1 = min( g.xyz, l.zxy );
  3877. float3 i2 = max( g.xyz, l.zxy );
  3878. float3 x1 = x0 - i1 + C.xxx;
  3879. float3 x2 = x0 - i2 + C.yyy;
  3880. float3 x3 = x0 - 0.5;
  3881. i = mod3D289( i);
  3882. float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
  3883. float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
  3884. float4 x_ = floor( j / 7.0 );
  3885. float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
  3886. float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  3887. float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
  3888. float4 h = 1.0 - abs( x ) - abs( y );
  3889. float4 b0 = float4( x.xy, y.xy );
  3890. float4 b1 = float4( x.zw, y.zw );
  3891. float4 s0 = floor( b0 ) * 2.0 + 1.0;
  3892. float4 s1 = floor( b1 ) * 2.0 + 1.0;
  3893. float4 sh = -step( h, 0.0 );
  3894. float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
  3895. float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
  3896. float3 g0 = float3( a0.xy, h.x );
  3897. float3 g1 = float3( a0.zw, h.y );
  3898. float3 g2 = float3( a1.xy, h.z );
  3899. float3 g3 = float3( a1.zw, h.w );
  3900. float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
  3901. g0 *= norm.x;
  3902. g1 *= norm.y;
  3903. g2 *= norm.z;
  3904. g3 *= norm.w;
  3905. float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
  3906. m = m* m;
  3907. m = m* m;
  3908. float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
  3909. return 42.0 * dot( m, px);
  3910. }
  3911. float2 voronoihash97( float2 p )
  3912. {
  3913. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  3914. return frac( sin( p ) *43758.5453);
  3915. }
  3916. float voronoi97( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  3917. {
  3918. float2 n = floor( v );
  3919. float2 f = frac( v );
  3920. float F1 = 8.0;
  3921. float F2 = 8.0; float2 mg = 0;
  3922. for ( int j = -1; j <= 1; j++ )
  3923. {
  3924. for ( int i = -1; i <= 1; i++ )
  3925. {
  3926. float2 g = float2( i, j );
  3927. float2 o = voronoihash97( n + g );
  3928. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  3929. float d = 0.5 * dot( r, r );
  3930. if( d<F1 ) {
  3931. F2 = F1;
  3932. F1 = d; mg = g; mr = r; id = o;
  3933. } else if( d<F2 ) {
  3934. F2 = d;
  3935. }
  3936. }
  3937. }
  3938. return F1;
  3939. }
  3940. float2 voronoihash96( float2 p )
  3941. {
  3942. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  3943. return frac( sin( p ) *43758.5453);
  3944. }
  3945. float voronoi96( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  3946. {
  3947. float2 n = floor( v );
  3948. float2 f = frac( v );
  3949. float F1 = 8.0;
  3950. float F2 = 8.0; float2 mg = 0;
  3951. for ( int j = -1; j <= 1; j++ )
  3952. {
  3953. for ( int i = -1; i <= 1; i++ )
  3954. {
  3955. float2 g = float2( i, j );
  3956. float2 o = voronoihash96( n + g );
  3957. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  3958. float d = 0.5 * dot( r, r );
  3959. if( d<F1 ) {
  3960. F2 = F1;
  3961. F1 = d; mg = g; mr = r; id = o;
  3962. } else if( d<F2 ) {
  3963. F2 = d;
  3964. }
  3965. }
  3966. }
  3967. return F1;
  3968. }
  3969. float2 voronoihash89( float2 p )
  3970. {
  3971. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  3972. return frac( sin( p ) *43758.5453);
  3973. }
  3974. float voronoi89( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  3975. {
  3976. float2 n = floor( v );
  3977. float2 f = frac( v );
  3978. float F1 = 8.0;
  3979. float F2 = 8.0; float2 mg = 0;
  3980. for ( int j = -1; j <= 1; j++ )
  3981. {
  3982. for ( int i = -1; i <= 1; i++ )
  3983. {
  3984. float2 g = float2( i, j );
  3985. float2 o = voronoihash89( n + g );
  3986. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  3987. float d = 0.5 * dot( r, r );
  3988. if( d<F1 ) {
  3989. F2 = F1;
  3990. F1 = d; mg = g; mr = r; id = o;
  3991. } else if( d<F2 ) {
  3992. F2 = d;
  3993. }
  3994. }
  3995. }
  3996. return F1;
  3997. }
  3998. struct SurfaceDescription
  3999. {
  4000. float Alpha;
  4001. float AlphaClipThreshold;
  4002. };
  4003. VertexOutput VertexFunction(VertexInput v )
  4004. {
  4005. VertexOutput o;
  4006. ZERO_INITIALIZE(VertexOutput, o);
  4007. UNITY_SETUP_INSTANCE_ID(v);
  4008. UNITY_TRANSFER_INSTANCE_ID(v, o);
  4009. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  4010. #if ( SHADER_TARGET >= 50 )
  4011. float recip367 = rcp( _Scale );
  4012. #else
  4013. float recip367 = 1.0 / _Scale;
  4014. #endif
  4015. float Scale228 = recip367;
  4016. float4 appendResult329 = (float4(_NoiseScale3D.x , _NoiseScale3D.y , _NoiseScale3D.z , 0.0));
  4017. float3 WindDir317 = ( ( float3( 1, 1, 1 ) * -2 + 1 ) * _WindDirection );
  4018. float3 break332 = WindDir317;
  4019. float temp_output_333_0 = ( abs( break332.x ) + abs( break332.y ) + abs( break332.z ) );
  4020. float4 appendResult340 = (float4(( break332.x / temp_output_333_0 ) , ( break332.y / temp_output_333_0 ) , ( break332.z / temp_output_333_0 ) , 0.0));
  4021. float4 WindDirWeights341 = appendResult340;
  4022. float4 break344 = abs( WindDirWeights341 );
  4023. float4 appendResult330 = (float4(_NoiseScale3D.y , _NoiseScale3D.x , _NoiseScale3D.z , 0.0));
  4024. float4 appendResult331 = (float4(_NoiseScale3D.y , _NoiseScale3D.z , _NoiseScale3D.x , 0.0));
  4025. float4 transform70 = mul(GetObjectToWorldMatrix(),v.positionOS);
  4026. float4 temp_output_71_0 = (transform70).xyzw;
  4027. float simplePerlin3D112 = snoise( ( Scale228 * ( ( ( appendResult329 * break344.x ) + ( appendResult330 * break344.y ) + ( appendResult331 * break344.z ) ) * (temp_output_71_0*1.0 + float4( ( ( WindDir317 + _AdditionalNoiseDir ) * ( _NoiseSpeed * _TimeParameters.x * _WindSpeed ) ) , 0.0 )) ) ).xyz*_NoiseScale );
  4028. simplePerlin3D112 = simplePerlin3D112*0.5 + 0.5;
  4029. float temp_output_118_0 = saturate( (0.0 + (simplePerlin3D112 - 0.0) * (1.0 - 0.0) / (1.0 - 0.0)) );
  4030. float temp_output_198_0 = ( Scale228 * _VoronoiScale );
  4031. float time97 = 0.0;
  4032. float2 voronoiSmoothId97 = 0;
  4033. float4 break84 = (temp_output_71_0*1.0 + float4( ( ( _TimeParameters.x * _VorSpeed * _WindSpeed ) * ( WindDir317 + _AdditionalVoronoiDir ) ) , 0.0 ));
  4034. float2 appendResult85 = (float2(break84.z , break84.y));
  4035. float2 coords97 = appendResult85 * temp_output_198_0;
  4036. float2 id97 = 0;
  4037. float2 uv97 = 0;
  4038. float fade97 = 0.5;
  4039. float voroi97 = 0;
  4040. float rest97 = 0;
  4041. for( int it97 = 0; it97 <3; it97++ ){
  4042. voroi97 += fade97 * voronoi97( coords97, time97, id97, uv97, 0,voronoiSmoothId97 );
  4043. rest97 += fade97;
  4044. coords97 *= 2;
  4045. fade97 *= 0.5;
  4046. }//Voronoi97
  4047. voroi97 /= rest97;
  4048. float3 objToWorldDir91 = mul( GetObjectToWorldMatrix(), float4( v.normalOS, 0 ) ).xyz;
  4049. float3 temp_output_93_0 = pow( abs( objToWorldDir91 ) , 5.0 );
  4050. float dotResult94 = dot( temp_output_93_0 , float3( 1,1,1 ) );
  4051. float3 break104 = ( temp_output_93_0 / dotResult94 );
  4052. float time96 = 217.0;
  4053. float2 voronoiSmoothId96 = 0;
  4054. float2 appendResult86 = (float2(break84.z , break84.x));
  4055. float2 coords96 = appendResult86 * temp_output_198_0;
  4056. float2 id96 = 0;
  4057. float2 uv96 = 0;
  4058. float fade96 = 0.5;
  4059. float voroi96 = 0;
  4060. float rest96 = 0;
  4061. for( int it96 = 0; it96 <3; it96++ ){
  4062. voroi96 += fade96 * voronoi96( coords96, time96, id96, uv96, 0,voronoiSmoothId96 );
  4063. rest96 += fade96;
  4064. coords96 *= 2;
  4065. fade96 *= 0.5;
  4066. }//Voronoi96
  4067. voroi96 /= rest96;
  4068. float time89 = 137.0;
  4069. float2 voronoiSmoothId89 = 0;
  4070. float2 appendResult87 = (float2(break84.x , break84.y));
  4071. float2 coords89 = appendResult87 * temp_output_198_0;
  4072. float2 id89 = 0;
  4073. float2 uv89 = 0;
  4074. float fade89 = 0.5;
  4075. float voroi89 = 0;
  4076. float rest89 = 0;
  4077. for( int it89 = 0; it89 <3; it89++ ){
  4078. voroi89 += fade89 * voronoi89( coords89, time89, id89, uv89, 0,voronoiSmoothId89 );
  4079. rest89 += fade89;
  4080. coords89 *= 2;
  4081. fade89 *= 0.5;
  4082. }//Voronoi89
  4083. voroi89 /= rest89;
  4084. float temp_output_190_0 = saturate( (0.0 + (( 1.0 - ( ( ( voroi97 * break104.x ) + ( voroi96 * break104.y ) ) + ( voroi89 * break104.z ) ) ) - 0.65) * (1.0 - 0.0) / (1.0 - 0.65)) );
  4085. float temp_output_122_0 = saturate( ( ( temp_output_118_0 * _NoiseStrength ) + ( temp_output_190_0 * _VoronoiStrength ) ) );
  4086. float3 ase_objectScale = float3( length( GetObjectToWorldMatrix()[ 0 ].xyz ), length( GetObjectToWorldMatrix()[ 1 ].xyz ), length( GetObjectToWorldMatrix()[ 2 ].xyz ) );
  4087. float3 temp_output_184_0 = ( ( ( temp_output_122_0 - 0.5 ) * v.normalOS * ( _NoiseDisplacement / Scale228 ) ) / ase_objectScale );
  4088. float4 temp_output_2_0_g146 = _Mask0;
  4089. float3 worldToObj306 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g146).xyz, 1 ) ).xyz;
  4090. float3 ase_objectPosition = GetAbsolutePositionWS( UNITY_MATRIX_M._m03_m13_m23 );
  4091. float4 appendResult313 = (float4((temp_output_2_0_g146).w , 0.0 , 0.0 , 0.0));
  4092. float3 worldToObj307 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult313 ).xyz, 1 ) ).xyz;
  4093. float3 temp_output_304_0 = ( temp_output_184_0 + ( min( ( distance( ( temp_output_184_0 + v.positionOS.xyz ) , worldToObj306 ) - length( worldToObj307 ) ) , 0.0 ) * v.normalOS ) );
  4094. float4 temp_output_2_0_g153 = _Mask1;
  4095. float3 worldToObj357 = mul( GetWorldToObjectMatrix(), float4( (temp_output_2_0_g153).xyz, 1 ) ).xyz;
  4096. float4 appendResult354 = (float4((temp_output_2_0_g153).w , 0.0 , 0.0 , 0.0));
  4097. float3 worldToObj358 = mul( GetWorldToObjectMatrix(), float4( ( float4( ase_objectPosition , 0.0 ) + appendResult354 ).xyz, 1 ) ).xyz;
  4098. float3 VertexOffset305 = ( temp_output_304_0 + ( min( ( distance( ( temp_output_304_0 + v.positionOS.xyz ) , worldToObj357 ) - length( worldToObj358 ) ) , 0.0 ) * v.normalOS ) );
  4099. float4 ase_clipPos = TransformObjectToHClip((v.positionOS).xyz);
  4100. float4 screenPos = ComputeScreenPos(ase_clipPos);
  4101. o.ase_texcoord = screenPos;
  4102. float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.positionOS.xyz));
  4103. float eyeDepth = -objectToViewPos.z;
  4104. o.ase_texcoord1.x = eyeDepth;
  4105. o.ase_color = v.ase_color;
  4106. //setting value to unused interpolator channels and avoid initialization warnings
  4107. o.ase_texcoord1.yzw = 0;
  4108. #ifdef ASE_ABSOLUTE_VERTEX_POS
  4109. float3 defaultVertexValue = v.positionOS.xyz;
  4110. #else
  4111. float3 defaultVertexValue = float3(0, 0, 0);
  4112. #endif
  4113. float3 vertexValue = VertexOffset305;
  4114. #ifdef ASE_ABSOLUTE_VERTEX_POS
  4115. v.positionOS.xyz = vertexValue;
  4116. #else
  4117. v.positionOS.xyz += vertexValue;
  4118. #endif
  4119. v.normalOS = v.normalOS;
  4120. float3 positionWS = TransformObjectToWorld( v.positionOS.xyz );
  4121. o.positionCS = TransformWorldToHClip(positionWS);
  4122. return o;
  4123. }
  4124. #if defined(ASE_TESSELLATION)
  4125. struct VertexControl
  4126. {
  4127. float4 vertex : INTERNALTESSPOS;
  4128. float3 normalOS : NORMAL;
  4129. float4 ase_color : COLOR;
  4130. UNITY_VERTEX_INPUT_INSTANCE_ID
  4131. };
  4132. struct TessellationFactors
  4133. {
  4134. float edge[3] : SV_TessFactor;
  4135. float inside : SV_InsideTessFactor;
  4136. };
  4137. VertexControl vert ( VertexInput v )
  4138. {
  4139. VertexControl o;
  4140. UNITY_SETUP_INSTANCE_ID(v);
  4141. UNITY_TRANSFER_INSTANCE_ID(v, o);
  4142. o.vertex = v.positionOS;
  4143. o.normalOS = v.normalOS;
  4144. o.ase_color = v.ase_color;
  4145. return o;
  4146. }
  4147. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  4148. {
  4149. TessellationFactors o;
  4150. float4 tf = 1;
  4151. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  4152. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  4153. #if defined(ASE_FIXED_TESSELLATION)
  4154. tf = FixedTess( tessValue );
  4155. #elif defined(ASE_DISTANCE_TESSELLATION)
  4156. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  4157. #elif defined(ASE_LENGTH_TESSELLATION)
  4158. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  4159. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  4160. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  4161. #endif
  4162. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  4163. return o;
  4164. }
  4165. [domain("tri")]
  4166. [partitioning("fractional_odd")]
  4167. [outputtopology("triangle_cw")]
  4168. [patchconstantfunc("TessellationFunction")]
  4169. [outputcontrolpoints(3)]
  4170. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  4171. {
  4172. return patch[id];
  4173. }
  4174. [domain("tri")]
  4175. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  4176. {
  4177. VertexInput o = (VertexInput) 0;
  4178. o.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  4179. o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  4180. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  4181. #if defined(ASE_PHONG_TESSELLATION)
  4182. float3 pp[3];
  4183. for (int i = 0; i < 3; ++i)
  4184. pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  4185. float phongStrength = _TessPhongStrength;
  4186. o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz;
  4187. #endif
  4188. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  4189. return VertexFunction(o);
  4190. }
  4191. #else
  4192. VertexOutput vert ( VertexInput v )
  4193. {
  4194. return VertexFunction( v );
  4195. }
  4196. #endif
  4197. half4 frag(VertexOutput IN ) : SV_TARGET
  4198. {
  4199. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  4200. float4 screenPos = IN.ase_texcoord;
  4201. float4 ase_screenPosNorm = screenPos / screenPos.w;
  4202. ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
  4203. float clampDepth368 = SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy );
  4204. float temp_output_385_0 = abs( ( _ProjectionParams.z - _ProjectionParams.y ) );
  4205. float eyeDepth = IN.ase_texcoord1.x;
  4206. float cameraDepthFade389 = (( eyeDepth -_ProjectionParams.y - 0.0 ) / temp_output_385_0);
  4207. float temp_output_1_0_g160 = saturate( ( ( ( ( 1.0 - clampDepth368 ) - cameraDepthFade389 ) * temp_output_385_0 ) / _DepthDistance ) );
  4208. float DepthFade43 = saturate( ( ( ( pow( temp_output_1_0_g160 , 5.0 ) * 6.0 ) - ( pow( temp_output_1_0_g160 , 4.0 ) * 15.0 ) ) + ( pow( temp_output_1_0_g160 , 3.0 ) * 10.0 ) ) );
  4209. float4 lerpResult161 = lerp( _BaseColor , IN.ase_color , _VertexColorStrength);
  4210. float4 temp_output_2_0_g155 = lerpResult161;
  4211. float BaseColorAlpha162 = (temp_output_2_0_g155).a;
  4212. surfaceDescription.Alpha = ( DepthFade43 * BaseColorAlpha162 );
  4213. surfaceDescription.AlphaClipThreshold = 0.0;
  4214. #if _ALPHATEST_ON
  4215. float alphaClipThreshold = 0.01f;
  4216. #if ALPHA_CLIP_THRESHOLD
  4217. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  4218. #endif
  4219. clip(surfaceDescription.Alpha - alphaClipThreshold);
  4220. #endif
  4221. half4 outColor = 0;
  4222. #ifdef SCENESELECTIONPASS
  4223. outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  4224. #elif defined(SCENEPICKINGPASS)
  4225. outColor = _SelectionID;
  4226. #endif
  4227. return outColor;
  4228. }
  4229. ENDHLSL
  4230. }
  4231. }
  4232. CustomEditor "UnityEditor.ShaderGraphLitGUI"
  4233. FallBack "Hidden/Shader Graph/FallbackError"
  4234. Fallback Off
  4235. }
  4236. /*ASEBEGIN
  4237. Version=19603
  4238. Node;AmplifyShaderEditor.Vector3Node;316;-1488,1952;Inherit;False;Property;_WindDirection;WindDirection;4;0;Create;True;0;0;0;False;0;False;-1,-0.3,-0.3;-1,-0.3,-0.3;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  4239. Node;AmplifyShaderEditor.FlipNode;328;-1232,1952;Inherit;False;True;True;True;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
  4240. Node;AmplifyShaderEditor.RegisterLocalVarNode;317;-1040,1952;Inherit;False;WindDir;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
  4241. Node;AmplifyShaderEditor.GetLocalVarNode;326;-1968,1600;Inherit;False;317;WindDir;1;0;OBJECT;;False;1;FLOAT3;0
  4242. Node;AmplifyShaderEditor.BreakToComponentsNode;332;-1776,1600;Inherit;False;FLOAT3;1;0;FLOAT3;0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
  4243. Node;AmplifyShaderEditor.AbsOpNode;334;-1616,1568;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4244. Node;AmplifyShaderEditor.AbsOpNode;335;-1616,1648;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4245. Node;AmplifyShaderEditor.AbsOpNode;336;-1616,1728;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4246. Node;AmplifyShaderEditor.CommentaryNode;130;-768,1424;Inherit;False;4809.925;1890.271;;80;342;344;343;348;346;347;330;331;143;114;152;151;128;127;239;238;184;183;123;124;232;181;229;125;122;121;115;120;119;116;118;190;191;117;112;192;196;113;111;195;145;109;110;78;89;108;107;77;96;97;87;322;198;74;85;86;320;76;84;88;197;72;228;79;227;83;71;323;91;80;70;134;325;82;90;81;69;329;345;367;Tri Planar Noise;1,1,1,1;0;0
  4247. Node;AmplifyShaderEditor.SimpleAddOpNode;333;-1472,1616;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  4248. Node;AmplifyShaderEditor.SimpleTimeNode;73;-1008,2240;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
  4249. Node;AmplifyShaderEditor.SimpleDivideOpNode;337;-1344,1568;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4250. Node;AmplifyShaderEditor.SimpleDivideOpNode;338;-1344,1664;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4251. Node;AmplifyShaderEditor.SimpleDivideOpNode;339;-1344,1760;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4252. Node;AmplifyShaderEditor.GetLocalVarNode;325;-624,2656;Inherit;False;317;WindDir;1;0;OBJECT;;False;1;FLOAT3;0
  4253. Node;AmplifyShaderEditor.RangedFloatNode;319;-1008,2144;Inherit;False;Property;_WindSpeed;WindSpeed;5;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  4254. Node;AmplifyShaderEditor.RangedFloatNode;81;-672,2544;Inherit;False;Property;_VorSpeed;Vor Speed;12;0;Create;True;0;0;0;False;0;False;0.05;0.05;0;0;0;1;FLOAT;0
  4255. Node;AmplifyShaderEditor.Vector3Node;82;-656,2736;Inherit;False;Property;_AdditionalVoronoiDir;AdditionalVoronoiDir;14;0;Create;True;0;0;0;False;0;False;0.7,-0.3,-0.3;0.7,-0.3,-0.3;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  4256. Node;AmplifyShaderEditor.NormalVertexDataNode;90;-400,3088;Inherit;False;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4257. Node;AmplifyShaderEditor.PosVertexDataNode;69;-656,2208;Inherit;False;1;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4258. Node;AmplifyShaderEditor.CommentaryNode;134;48,2800;Inherit;False;999.4751;434.6895;Smooth Axis Fade ;5;93;92;104;95;94;;1,1,1,1;0;0
  4259. Node;AmplifyShaderEditor.DynamicAppendNode;340;-1184,1632;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
  4260. Node;AmplifyShaderEditor.ObjectToWorldTransfNode;70;-448,2208;Inherit;False;1;0;FLOAT4;0,0,0,1;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4261. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;80;-448,2448;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  4262. Node;AmplifyShaderEditor.TransformDirectionNode;91;-208,3088;Inherit;False;Object;World;False;Fast;False;1;0;FLOAT3;0,0,0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  4263. Node;AmplifyShaderEditor.SimpleAddOpNode;323;-400,2640;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  4264. Node;AmplifyShaderEditor.RangedFloatNode;227;-464,1632;Inherit;False;Property;_Scale;Scale;3;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  4265. Node;AmplifyShaderEditor.RegisterLocalVarNode;341;-1024,1632;Inherit;False;WindDirWeights;-1;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4266. Node;AmplifyShaderEditor.ComponentMaskNode;71;-192,2208;Inherit;False;True;True;True;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4267. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;83;-224,2448;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  4268. Node;AmplifyShaderEditor.AbsOpNode;92;64,2880;Inherit;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
  4269. Node;AmplifyShaderEditor.ReciprocalOpNode;367;-304,1632;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4270. Node;AmplifyShaderEditor.PowerNode;93;272,2928;Inherit;False;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;5;False;1;FLOAT3;0
  4271. Node;AmplifyShaderEditor.ScaleAndOffsetNode;79;144,2368;Inherit;False;3;0;FLOAT4;0,0,0,0;False;1;FLOAT;1;False;2;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4272. Node;AmplifyShaderEditor.RegisterLocalVarNode;228;-144,1632;Inherit;False;Scale;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
  4273. Node;AmplifyShaderEditor.GetLocalVarNode;342;112,1808;Inherit;False;341;WindDirWeights;1;0;OBJECT;;False;1;FLOAT4;0
  4274. Node;AmplifyShaderEditor.DotProductOpNode;94;448,3008;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;1,1,1;False;1;FLOAT;0
  4275. Node;AmplifyShaderEditor.GetLocalVarNode;197;464,2096;Inherit;False;228;Scale;1;0;OBJECT;;False;1;FLOAT;0
  4276. Node;AmplifyShaderEditor.BreakToComponentsNode;84;400,2368;Inherit;False;FLOAT4;1;0;FLOAT4;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
  4277. Node;AmplifyShaderEditor.GetLocalVarNode;320;-608,1824;Inherit;False;317;WindDir;1;0;OBJECT;;False;1;FLOAT3;0
  4278. Node;AmplifyShaderEditor.AbsOpNode;343;320,1808;Inherit;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4279. Node;AmplifyShaderEditor.RangedFloatNode;72;-656,2064;Inherit;False;Property;_NoiseSpeed;Noise Speed;11;0;Create;True;0;0;0;False;0;False;0.2;0.2;0;0;0;1;FLOAT;0
  4280. Node;AmplifyShaderEditor.Vector3Node;76;-640,1904;Inherit;False;Property;_AdditionalNoiseDir;Additional Noise Dir;13;0;Create;True;0;0;0;False;0;False;0,0,0;0,0,0;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  4281. Node;AmplifyShaderEditor.RangedFloatNode;88;464,2176;Inherit;False;Property;_VoronoiScale;Voronoi Scale;15;0;Create;True;0;0;0;False;0;False;1.4;1.4;0;0;0;1;FLOAT;0
  4282. Node;AmplifyShaderEditor.Vector3Node;143;400,1648;Inherit;False;Property;_NoiseScale3D;Noise Scale 3D;20;0;Create;True;0;0;0;False;0;False;1,0.2,0.6;1,0.2,0.6;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  4283. Node;AmplifyShaderEditor.DynamicAppendNode;86;608,2400;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  4284. Node;AmplifyShaderEditor.DynamicAppendNode;85;608,2304;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  4285. Node;AmplifyShaderEditor.SimpleDivideOpNode;95;608,2928;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0
  4286. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;74;-448,2064;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  4287. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;198;656,2096;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4288. Node;AmplifyShaderEditor.SimpleAddOpNode;322;-368,1936;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  4289. Node;AmplifyShaderEditor.DynamicAppendNode;331;624,1808;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
  4290. Node;AmplifyShaderEditor.DynamicAppendNode;329;624,1504;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
  4291. Node;AmplifyShaderEditor.DynamicAppendNode;330;624,1648;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
  4292. Node;AmplifyShaderEditor.BreakToComponentsNode;344;432,1808;Inherit;False;FLOAT4;1;0;FLOAT4;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
  4293. Node;AmplifyShaderEditor.DynamicAppendNode;87;608,2496;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  4294. Node;AmplifyShaderEditor.BreakToComponentsNode;104;832,2992;Inherit;True;FLOAT3;1;0;FLOAT3;0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
  4295. Node;AmplifyShaderEditor.VoronoiNode;97;912,1968;Inherit;True;0;0;1;0;3;False;1;False;False;False;4;0;FLOAT2;0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;3;FLOAT;0;FLOAT2;1;FLOAT2;2
  4296. Node;AmplifyShaderEditor.VoronoiNode;96;912,2240;Inherit;True;0;0;1;0;3;False;1;False;False;False;4;0;FLOAT2;0,0;False;1;FLOAT;217;False;2;FLOAT;1;False;3;FLOAT;0;False;3;FLOAT;0;FLOAT2;1;FLOAT2;2
  4297. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;77;-224,2000;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0
  4298. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;347;784,1808;Inherit;False;2;2;0;FLOAT4;0,0,0,0;False;1;FLOAT;0;False;1;FLOAT4;0
  4299. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;346;784,1648;Inherit;False;2;2;0;FLOAT4;0,0,0,0;False;1;FLOAT;0;False;1;FLOAT4;0
  4300. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;345;784,1504;Inherit;False;2;2;0;FLOAT4;0,0,0,0;False;1;FLOAT;0;False;1;FLOAT4;0
  4301. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;107;1232,2032;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4302. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;108;1216,2192;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4303. Node;AmplifyShaderEditor.VoronoiNode;89;912,2512;Inherit;True;0;0;1;0;3;False;1;False;False;False;4;0;FLOAT2;0,0;False;1;FLOAT;137;False;2;FLOAT;1;False;3;FLOAT;0;False;3;FLOAT;0;FLOAT2;1;FLOAT2;2
  4304. Node;AmplifyShaderEditor.ScaleAndOffsetNode;78;144,2016;Inherit;False;3;0;FLOAT4;0,0,0,0;False;1;FLOAT;1;False;2;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4305. Node;AmplifyShaderEditor.SimpleAddOpNode;348;976,1616;Inherit;False;3;3;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4306. Node;AmplifyShaderEditor.SimpleAddOpNode;110;1408,2128;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4307. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;109;1184,2448;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4308. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;145;1328,1712;Inherit;False;2;2;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4309. Node;AmplifyShaderEditor.GetLocalVarNode;195;1296,1632;Inherit;False;228;Scale;1;0;OBJECT;;False;1;FLOAT;0
  4310. Node;AmplifyShaderEditor.SimpleAddOpNode;111;1568,2256;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4311. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;196;1536,1680;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4312. Node;AmplifyShaderEditor.RangedFloatNode;113;1536,1840;Inherit;False;Property;_NoiseScale;Noise Scale;16;0;Create;True;0;0;0;False;0;False;20;20;0;0;0;1;FLOAT;0
  4313. Node;AmplifyShaderEditor.NoiseGeneratorNode;112;1760,1712;Inherit;True;Simplex3D;True;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;1;False;1;FLOAT;0
  4314. Node;AmplifyShaderEditor.OneMinusNode;192;1792,2144;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4315. Node;AmplifyShaderEditor.TFHCRemapNode;117;2064,1728;Inherit;True;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;4;FLOAT;1;False;1;FLOAT;0
  4316. Node;AmplifyShaderEditor.TFHCRemapNode;191;1824,2288;Inherit;True;5;0;FLOAT;0;False;1;FLOAT;0.65;False;2;FLOAT;1;False;3;FLOAT;0;False;4;FLOAT;1;False;1;FLOAT;0
  4317. Node;AmplifyShaderEditor.SaturateNode;190;2112,2304;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
  4318. Node;AmplifyShaderEditor.SaturateNode;118;2352,1728;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4319. Node;AmplifyShaderEditor.RangedFloatNode;119;2336,1824;Inherit;False;Property;_NoiseStrength;Noise Strength;18;0;Create;True;0;0;0;False;0;False;0.03;0.04;0;0;0;1;FLOAT;0
  4320. Node;AmplifyShaderEditor.RangedFloatNode;116;2272,2192;Inherit;False;Property;_VoronoiStrength;Voronoi Strength;17;0;Create;True;0;0;0;False;0;False;0.9;0.8;0;0;0;1;FLOAT;0
  4321. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;120;2544,1760;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4322. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;115;2544,2000;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4323. Node;AmplifyShaderEditor.CommentaryNode;293;4112,1984;Inherit;False;1979.398;736.2354;;10;306;296;294;315;304;303;299;301;298;297;Sphere Mask 0;1,1,1,1;0;0
  4324. Node;AmplifyShaderEditor.SimpleAddOpNode;121;2800,1904;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4325. Node;AmplifyShaderEditor.SaturateNode;122;3024,1904;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
  4326. Node;AmplifyShaderEditor.GetLocalVarNode;229;3056,2272;Inherit;False;228;Scale;1;0;OBJECT;;False;1;FLOAT;0
  4327. Node;AmplifyShaderEditor.RangedFloatNode;125;3024,2192;Inherit;False;Property;_NoiseDisplacement;Noise Displacement;19;0;Create;True;0;0;0;False;0;False;0.5;0.5;0;0;0;1;FLOAT;0
  4328. Node;AmplifyShaderEditor.Vector4Node;294;4160,2224;Inherit;False;Property;_Mask0;Mask0;6;0;Create;True;0;0;0;False;0;False;1.985208,0.440832,0.2055923,1.2;-0.07034397,0.4851084,-6.79,0.7;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4329. Node;AmplifyShaderEditor.CommentaryNode;315;4368,2416;Inherit;False;932;266.2;Radius to object space;5;314;307;312;311;313;;1,1,1,1;0;0
  4330. Node;AmplifyShaderEditor.SimpleSubtractOpNode;181;3264,1904;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0.5;False;1;FLOAT;0
  4331. Node;AmplifyShaderEditor.SimpleDivideOpNode;232;3264,2192;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4332. Node;AmplifyShaderEditor.NormalVertexDataNode;124;3232,2016;Inherit;False;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4333. Node;AmplifyShaderEditor.FunctionNode;296;4432,2224;Inherit;False;Alpha Split;-1;;146;07dab7960105b86429ac8eebd729ed6d;0;1;2;FLOAT4;0,0,0,0;False;2;FLOAT3;0;FLOAT;6
  4334. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;123;3456,1920;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0
  4335. Node;AmplifyShaderEditor.ObjectScaleNode;183;3472,2096;Inherit;False;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  4336. Node;AmplifyShaderEditor.DynamicAppendNode;313;4624,2496;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
  4337. Node;AmplifyShaderEditor.ObjectPositionNode;311;4416,2464;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  4338. Node;AmplifyShaderEditor.SimpleDivideOpNode;184;3648,2000;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  4339. Node;AmplifyShaderEditor.PosVertexDataNode;238;3696,2160;Inherit;False;0;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4340. Node;AmplifyShaderEditor.SimpleAddOpNode;312;4784,2464;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4341. Node;AmplifyShaderEditor.SimpleAddOpNode;239;3920,2112;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  4342. Node;AmplifyShaderEditor.TransformPositionNode;306;4656,2224;Inherit;False;World;Object;False;Fast;True;1;0;FLOAT3;0,0,0;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4343. Node;AmplifyShaderEditor.TransformPositionNode;307;4912,2464;Inherit;False;World;Object;False;Fast;True;1;0;FLOAT3;0,0,0;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4344. Node;AmplifyShaderEditor.CommentaryNode;350;6464,2000;Inherit;False;1780.413;726.1177;;10;365;364;363;362;361;359;357;353;352;351;Sphere Mask 1;1,1,1,1;0;0
  4345. Node;AmplifyShaderEditor.DistanceOpNode;297;4880,2128;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0
  4346. Node;AmplifyShaderEditor.LengthOpNode;314;5120,2464;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT;0
  4347. Node;AmplifyShaderEditor.CommentaryNode;394;368,672;Inherit;False;1770.762;380.8553;;13;43;402;399;36;392;401;389;390;371;368;385;387;384;Depth Fade 2D;1,1,1,1;0;0
  4348. Node;AmplifyShaderEditor.SimpleSubtractOpNode;298;5168,2112;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
  4349. Node;AmplifyShaderEditor.Vector4Node;351;6512,2240;Inherit;False;Property;_Mask1;Mask1;7;0;Create;True;0;0;0;False;0;False;1.985208,0.440832,0.2055923,1.2;0.842,-0.28,0.51,0.7;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4350. Node;AmplifyShaderEditor.ProjectionParams;384;400,896;Inherit;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4351. Node;AmplifyShaderEditor.CommentaryNode;352;6720,2432;Inherit;False;932;266.2;Radius to object space;5;360;358;356;355;354;;1,1,1,1;0;0
  4352. Node;AmplifyShaderEditor.SimpleMinOpNode;301;5328,2112;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4353. Node;AmplifyShaderEditor.NormalVertexDataNode;299;5264,2240;Inherit;False;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4354. Node;AmplifyShaderEditor.FunctionNode;353;6784,2240;Inherit;False;Alpha Split;-1;;153;07dab7960105b86429ac8eebd729ed6d;0;1;2;FLOAT4;0,0,0,0;False;2;FLOAT3;0;FLOAT;6
  4355. Node;AmplifyShaderEditor.SimpleSubtractOpNode;387;624,896;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4356. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;303;5456,2112;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT3;-1,0,0;False;1;FLOAT3;0
  4357. Node;AmplifyShaderEditor.DynamicAppendNode;354;6976,2512;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
  4358. Node;AmplifyShaderEditor.ObjectPositionNode;355;6768,2480;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  4359. Node;AmplifyShaderEditor.AbsOpNode;385;768,896;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4360. Node;AmplifyShaderEditor.ScreenDepthNode;368;768,720;Inherit;False;1;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT;0
  4361. Node;AmplifyShaderEditor.SimpleAddOpNode;304;5632,2048;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  4362. Node;AmplifyShaderEditor.PosVertexDataNode;349;6128,2208;Inherit;False;0;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4363. Node;AmplifyShaderEditor.SimpleAddOpNode;356;7136,2480;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0
  4364. Node;AmplifyShaderEditor.OneMinusNode;371;992,720;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4365. Node;AmplifyShaderEditor.CameraDepthFade;389;896,816;Inherit;False;3;2;FLOAT3;0,0,0;False;0;FLOAT;9;False;1;FLOAT;0;False;1;FLOAT;0
  4366. Node;AmplifyShaderEditor.SimpleAddOpNode;366;6336,2144;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  4367. Node;AmplifyShaderEditor.TransformPositionNode;357;7008,2240;Inherit;False;World;Object;False;Fast;True;1;0;FLOAT3;0,0,0;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4368. Node;AmplifyShaderEditor.TransformPositionNode;358;7264,2480;Inherit;False;World;Object;False;Fast;True;1;0;FLOAT3;0,0,0;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4369. Node;AmplifyShaderEditor.SimpleSubtractOpNode;390;1152,752;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4370. Node;AmplifyShaderEditor.DistanceOpNode;359;7232,2144;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0
  4371. Node;AmplifyShaderEditor.LengthOpNode;360;7472,2480;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT;0
  4372. Node;AmplifyShaderEditor.CommentaryNode;31;1388.116,-224;Inherit;False;1507.612;770.0389;;15;1;162;13;16;160;161;20;19;146;147;21;30;28;29;163;Albedo;1,1,1,1;0;0
  4373. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;392;1312,848;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4374. Node;AmplifyShaderEditor.RangedFloatNode;36;1280,944;Inherit;False;Property;_DepthDistance;Depth Distance;8;0;Create;True;0;0;0;False;0;False;0.4;0.4;0;0;0;1;FLOAT;0
  4375. Node;AmplifyShaderEditor.SimpleSubtractOpNode;361;7648,2144;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
  4376. Node;AmplifyShaderEditor.VertexColorNode;16;1664,288;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4377. Node;AmplifyShaderEditor.ColorNode;13;1440,176;Inherit;False;Property;_BaseColor;Base Color;0;0;Create;True;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  4378. Node;AmplifyShaderEditor.RangedFloatNode;160;1872,368;Inherit;False;Property;_VertexColorStrength;Vertex Color Strength;23;0;Create;True;0;0;0;False;0;False;0.7030082;0.7030082;0;1;0;1;FLOAT;0
  4379. Node;AmplifyShaderEditor.SimpleDivideOpNode;401;1456,848;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4380. Node;AmplifyShaderEditor.SimpleMinOpNode;362;7808,2144;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4381. Node;AmplifyShaderEditor.NormalVertexDataNode;363;7744,2272;Inherit;False;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  4382. Node;AmplifyShaderEditor.LerpOp;161;2160,240;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
  4383. Node;AmplifyShaderEditor.SaturateNode;399;1568,848;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4384. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;364;7936,2144;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT3;-1,0,0;False;1;FLOAT3;0
  4385. Node;AmplifyShaderEditor.FunctionNode;163;2325.137,419.9323;Inherit;False;Alpha Split;-1;;155;07dab7960105b86429ac8eebd729ed6d;0;1;2;COLOR;0,0,0,0;False;2;FLOAT3;0;FLOAT;6
  4386. Node;AmplifyShaderEditor.FunctionNode;402;1712,848;Inherit;False;SmootherStep;-1;;160;4a9458489eca43748a1c8f13823257ba;0;1;1;FLOAT;0;False;1;FLOAT;0
  4387. Node;AmplifyShaderEditor.SimpleAddOpNode;365;8112,2080;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  4388. Node;AmplifyShaderEditor.RegisterLocalVarNode;162;2528,448;Inherit;False;BaseColorAlpha;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
  4389. Node;AmplifyShaderEditor.RegisterLocalVarNode;43;1920,848;Inherit;False;DepthFade;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
  4390. Node;AmplifyShaderEditor.RegisterLocalVarNode;305;8336,2080;Inherit;False;VertexOffset;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
  4391. Node;AmplifyShaderEditor.CommentaryNode;68;1392,-1504;Inherit;False;1082.072;560.847;;9;150;140;149;141;60;66;62;61;67;Emmission;1,1,1,1;0;0
  4392. Node;AmplifyShaderEditor.CommentaryNode;59;1744,-704;Inherit;False;1151.964;403.8841;;7;56;58;57;55;54;136;137;Translucency;1,1,1,1;0;0
  4393. Node;AmplifyShaderEditor.GetLocalVarNode;164;2608,-976;Inherit;False;162;BaseColorAlpha;1;0;OBJECT;;False;1;FLOAT;0
  4394. Node;AmplifyShaderEditor.GetLocalVarNode;133;2640,-1056;Inherit;False;43;DepthFade;1;0;OBJECT;;False;1;FLOAT;0
  4395. Node;AmplifyShaderEditor.SaturateNode;29;2496,224;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
  4396. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;28;2336,224;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  4397. Node;AmplifyShaderEditor.FresnelNode;54;1792,-656;Inherit;False;Standard;WorldNormal;ViewDir;False;False;5;0;FLOAT3;0,0,1;False;4;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;5;False;1;FLOAT;0
  4398. Node;AmplifyShaderEditor.SimpleAddOpNode;55;2208,-656;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4399. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;57;2432,-656;Inherit;True;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  4400. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;136;2672,-656;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  4401. Node;AmplifyShaderEditor.GetLocalVarNode;137;2464,-416;Inherit;False;43;DepthFade;1;0;OBJECT;;False;1;FLOAT;0
  4402. Node;AmplifyShaderEditor.RegisterLocalVarNode;30;2672,224;Inherit;False;Albedo;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0
  4403. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;147;2224,80;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  4404. Node;AmplifyShaderEditor.GetLocalVarNode;146;2048,-32;Inherit;False;43;DepthFade;1;0;OBJECT;;False;1;FLOAT;0
  4405. Node;AmplifyShaderEditor.LerpOp;157;2608,944;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  4406. Node;AmplifyShaderEditor.RegisterLocalVarNode;158;2768,944;Inherit;True;NoiseColorMix;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
  4407. Node;AmplifyShaderEditor.GetLocalVarNode;154;2336,720;Inherit;True;151;NoiseColor3D;1;0;OBJECT;;False;1;FLOAT;0
  4408. Node;AmplifyShaderEditor.GetLocalVarNode;155;2304,912;Inherit;True;152;NoiseColorVoronoi;1;0;OBJECT;;False;1;FLOAT;0
  4409. Node;AmplifyShaderEditor.OneMinusNode;127;3232,1776;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  4410. Node;AmplifyShaderEditor.RegisterLocalVarNode;128;3408,1776;Inherit;False;NoiseColor;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
  4411. Node;AmplifyShaderEditor.RegisterLocalVarNode;151;2544,1680;Inherit;False;NoiseColor3D;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
  4412. Node;AmplifyShaderEditor.RegisterLocalVarNode;152;2544,2224;Inherit;False;NoiseColorVoronoi;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
  4413. Node;AmplifyShaderEditor.OneMinusNode;114;2272,1952;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
  4414. Node;AmplifyShaderEditor.GetLocalVarNode;53;2832,-832;Inherit;False;305;VertexOffset;1;0;OBJECT;;False;1;FLOAT3;0
  4415. Node;AmplifyShaderEditor.RangedFloatNode;156;2272,1104;Inherit;False;Property;_NoiseColorMix;NoiseColorMix;22;0;Create;True;0;0;0;False;0;False;0.96;0.947578;0;1;0;1;FLOAT;0
  4416. Node;AmplifyShaderEditor.FunctionNode;67;1904,-1232;Inherit;False;Lerp White To;-1;;157;047d7c189c36a62438973bad9d37b1c2;0;2;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0
  4417. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;61;2112,-1328;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT3;0,0,0;False;1;COLOR;0
  4418. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;141;2304,-1296;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT3;1,1,1;False;1;COLOR;0
  4419. Node;AmplifyShaderEditor.FunctionNode;149;2112,-1216;Inherit;False;Lerp White To;-1;;158;047d7c189c36a62438973bad9d37b1c2;0;2;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0
  4420. Node;AmplifyShaderEditor.GetLocalVarNode;140;1872,-1120;Inherit;False;43;DepthFade;1;0;OBJECT;;False;1;FLOAT;0
  4421. Node;AmplifyShaderEditor.FunctionNode;21;2000,80;Inherit;False;Lerp White To;-1;;159;047d7c189c36a62438973bad9d37b1c2;0;2;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0
  4422. Node;AmplifyShaderEditor.GetLocalVarNode;19;1760,32;Inherit;False;158;NoiseColorMix;1;0;OBJECT;;False;1;FLOAT;0
  4423. Node;AmplifyShaderEditor.RangedFloatNode;20;1696,112;Inherit;False;Property;_NoiseColorStrength;Noise Color Strength;9;0;Create;True;0;0;0;False;0;False;0.5565214;0.7018638;0;1;0;1;FLOAT;0
  4424. Node;AmplifyShaderEditor.RangedFloatNode;56;2032,-576;Inherit;False;Constant;_Float0;Float 0;3;0;Create;True;0;0;0;False;0;False;0.5;0;0;0;0;1;FLOAT;0
  4425. Node;AmplifyShaderEditor.RangedFloatNode;66;1552,-1152;Inherit;False;Property;_EmmissiveNoiseColor;Emmissive Noise Color;10;0;Create;True;0;0;0;False;0;False;0.2000003;0.2000003;0;1;0;1;FLOAT;0
  4426. Node;AmplifyShaderEditor.RangedFloatNode;150;1776,-1040;Inherit;False;Property;_EmmissiveDepthFade;Emmissive Depth Fade;21;0;Create;True;0;0;0;False;0;False;0.2086951;0.2086951;0;1;0;1;FLOAT;0
  4427. Node;AmplifyShaderEditor.ColorNode;60;1872,-1440;Inherit;False;Property;_EmmissiveColor;Emmissive Color;2;0;Create;True;0;0;0;False;0;False;0.5490196,0.627451,0.7294118,0;0.5482876,0.6286016,0.7283019,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  4428. Node;AmplifyShaderEditor.ColorNode;58;2192,-528;Inherit;False;Property;_TranslucencyColor;Translucency Color;1;0;Create;True;0;0;0;False;0;False;1,1,1,0;1,1,1,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  4429. Node;AmplifyShaderEditor.RangedFloatNode;131;2880,-1104;Inherit;False;Constant;_MetalSmoothness;MetalSmoothness;14;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  4430. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;165;2880,-1024;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  4431. Node;AmplifyShaderEditor.GetLocalVarNode;32;2912,-1184;Inherit;False;30;Albedo;1;0;OBJECT;;False;1;COLOR;0
  4432. Node;AmplifyShaderEditor.GetLocalVarNode;62;1616,-1232;Inherit;False;158;NoiseColorMix;1;0;OBJECT;;False;1;FLOAT;0
  4433. Node;AmplifyShaderEditor.RangedFloatNode;132;2880,-912;Inherit;False;Constant;_AlphaClip;Alpha Clip;18;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  4434. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;1472,48;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;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;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;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
  4435. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;3;48,-176;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;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;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0
  4436. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;4;48,-176;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;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;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;True;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
  4437. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;5;48,-176;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;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;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0
  4438. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;6;48,-176;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;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;5;True;12;all;0;False;True;2;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
  4439. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;7;48,-176;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;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;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0
  4440. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;8;48,-176;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;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;5;True;12;all;0;False;True;2;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;10;False;;10;False;;10;False;;6;False;;3;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
  4441. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;9;48,-176;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;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;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0
  4442. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;10;48,-176;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;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;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0
  4443. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;2;3088,-1184;Float;False;True;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;SkyClouds_2D;94348b07e5e8bab40bd6c8a1e3df54cd;True;Forward;0;1;Forward;21;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;5;True;12;all;0;False;True;2;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;True;True;False;10;False;;10;False;;10;False;;6;False;;3;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=UniversalForwardOnly;False;False;0;;0;0;Standard;42;Lighting Model;0;0;Workflow;1;638545903288036264;Surface;1;638661781710501321; Refraction Model;0;0; Blend;0;0;Two Sided;1;0;Fragment Normal Space,InvertActionOnDeselection;0;0;Forward Only;1;0;Transmission;0;0; Transmission Shadow;0.5,False,;0;Translucency;1;638555967056712408; Translucency Strength;1,False,_TransStrength;0; Normal Distortion;0.5,False,_NormalDistortion;0; Scattering;2,False,_Scattering;0; Direct;0.9,False,_Direct;0; Ambient;0.1,False,_Ambient;0; Shadow;0.5,False,_Shadow;0;Cast Shadows;0;638545778176623389; Use Shadow Threshold;0;0;Receive Shadows;1;0;Receive SSAO;0;638545838208863654;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;Tessellation;1;638546589066032097; Phong;1;638545776167988407; Strength;0.5,False,;0; Type;2;638572589216977204; Tess;8,False,_TessellationFactor;638555223982842409; Min;1,False,_TessellationMinDistance;638549165261763217; Max;20,False,_TessellationMaxDistance;638549165187283418; Edge Length;7,False,;638546587549290024; Max Displacement;10,False,;638546587107747633;Write Depth;1;638545930608142192; Early Z;0;638546026961079552;Vertex Position,InvertActionOnDeselection;1;0;Debug Display;0;0;Clear Coat;0;0;0;10;False;True;False;True;True;True;True;False;True;True;False;;False;0
  4444. WireConnection;328;0;316;0
  4445. WireConnection;317;0;328;0
  4446. WireConnection;332;0;326;0
  4447. WireConnection;334;0;332;0
  4448. WireConnection;335;0;332;1
  4449. WireConnection;336;0;332;2
  4450. WireConnection;333;0;334;0
  4451. WireConnection;333;1;335;0
  4452. WireConnection;333;2;336;0
  4453. WireConnection;337;0;332;0
  4454. WireConnection;337;1;333;0
  4455. WireConnection;338;0;332;1
  4456. WireConnection;338;1;333;0
  4457. WireConnection;339;0;332;2
  4458. WireConnection;339;1;333;0
  4459. WireConnection;340;0;337;0
  4460. WireConnection;340;1;338;0
  4461. WireConnection;340;2;339;0
  4462. WireConnection;70;0;69;0
  4463. WireConnection;80;0;73;0
  4464. WireConnection;80;1;81;0
  4465. WireConnection;80;2;319;0
  4466. WireConnection;91;0;90;0
  4467. WireConnection;323;0;325;0
  4468. WireConnection;323;1;82;0
  4469. WireConnection;341;0;340;0
  4470. WireConnection;71;0;70;0
  4471. WireConnection;83;0;80;0
  4472. WireConnection;83;1;323;0
  4473. WireConnection;92;0;91;0
  4474. WireConnection;367;0;227;0
  4475. WireConnection;93;0;92;0
  4476. WireConnection;79;0;71;0
  4477. WireConnection;79;2;83;0
  4478. WireConnection;228;0;367;0
  4479. WireConnection;94;0;93;0
  4480. WireConnection;84;0;79;0
  4481. WireConnection;343;0;342;0
  4482. WireConnection;86;0;84;2
  4483. WireConnection;86;1;84;0
  4484. WireConnection;85;0;84;2
  4485. WireConnection;85;1;84;1
  4486. WireConnection;95;0;93;0
  4487. WireConnection;95;1;94;0
  4488. WireConnection;74;0;72;0
  4489. WireConnection;74;1;73;0
  4490. WireConnection;74;2;319;0
  4491. WireConnection;198;0;197;0
  4492. WireConnection;198;1;88;0
  4493. WireConnection;322;0;320;0
  4494. WireConnection;322;1;76;0
  4495. WireConnection;331;0;143;2
  4496. WireConnection;331;1;143;3
  4497. WireConnection;331;2;143;1
  4498. WireConnection;329;0;143;1
  4499. WireConnection;329;1;143;2
  4500. WireConnection;329;2;143;3
  4501. WireConnection;330;0;143;2
  4502. WireConnection;330;1;143;1
  4503. WireConnection;330;2;143;3
  4504. WireConnection;344;0;343;0
  4505. WireConnection;87;0;84;0
  4506. WireConnection;87;1;84;1
  4507. WireConnection;104;0;95;0
  4508. WireConnection;97;0;85;0
  4509. WireConnection;97;2;198;0
  4510. WireConnection;96;0;86;0
  4511. WireConnection;96;2;198;0
  4512. WireConnection;77;0;322;0
  4513. WireConnection;77;1;74;0
  4514. WireConnection;347;0;331;0
  4515. WireConnection;347;1;344;2
  4516. WireConnection;346;0;330;0
  4517. WireConnection;346;1;344;1
  4518. WireConnection;345;0;329;0
  4519. WireConnection;345;1;344;0
  4520. WireConnection;107;0;97;0
  4521. WireConnection;107;1;104;0
  4522. WireConnection;108;0;96;0
  4523. WireConnection;108;1;104;1
  4524. WireConnection;89;0;87;0
  4525. WireConnection;89;2;198;0
  4526. WireConnection;78;0;71;0
  4527. WireConnection;78;2;77;0
  4528. WireConnection;348;0;345;0
  4529. WireConnection;348;1;346;0
  4530. WireConnection;348;2;347;0
  4531. WireConnection;110;0;107;0
  4532. WireConnection;110;1;108;0
  4533. WireConnection;109;0;89;0
  4534. WireConnection;109;1;104;2
  4535. WireConnection;145;0;348;0
  4536. WireConnection;145;1;78;0
  4537. WireConnection;111;0;110;0
  4538. WireConnection;111;1;109;0
  4539. WireConnection;196;0;195;0
  4540. WireConnection;196;1;145;0
  4541. WireConnection;112;0;196;0
  4542. WireConnection;112;1;113;0
  4543. WireConnection;192;0;111;0
  4544. WireConnection;117;0;112;0
  4545. WireConnection;191;0;192;0
  4546. WireConnection;190;0;191;0
  4547. WireConnection;118;0;117;0
  4548. WireConnection;120;0;118;0
  4549. WireConnection;120;1;119;0
  4550. WireConnection;115;0;190;0
  4551. WireConnection;115;1;116;0
  4552. WireConnection;121;0;120;0
  4553. WireConnection;121;1;115;0
  4554. WireConnection;122;0;121;0
  4555. WireConnection;181;0;122;0
  4556. WireConnection;232;0;125;0
  4557. WireConnection;232;1;229;0
  4558. WireConnection;296;2;294;0
  4559. WireConnection;123;0;181;0
  4560. WireConnection;123;1;124;0
  4561. WireConnection;123;2;232;0
  4562. WireConnection;313;0;296;6
  4563. WireConnection;184;0;123;0
  4564. WireConnection;184;1;183;0
  4565. WireConnection;312;0;311;0
  4566. WireConnection;312;1;313;0
  4567. WireConnection;239;0;184;0
  4568. WireConnection;239;1;238;0
  4569. WireConnection;306;0;296;0
  4570. WireConnection;307;0;312;0
  4571. WireConnection;297;0;239;0
  4572. WireConnection;297;1;306;0
  4573. WireConnection;314;0;307;0
  4574. WireConnection;298;0;297;0
  4575. WireConnection;298;1;314;0
  4576. WireConnection;301;0;298;0
  4577. WireConnection;353;2;351;0
  4578. WireConnection;387;0;384;3
  4579. WireConnection;387;1;384;2
  4580. WireConnection;303;0;301;0
  4581. WireConnection;303;1;299;0
  4582. WireConnection;354;0;353;6
  4583. WireConnection;385;0;387;0
  4584. WireConnection;304;0;184;0
  4585. WireConnection;304;1;303;0
  4586. WireConnection;356;0;355;0
  4587. WireConnection;356;1;354;0
  4588. WireConnection;371;0;368;0
  4589. WireConnection;389;0;385;0
  4590. WireConnection;366;0;304;0
  4591. WireConnection;366;1;349;0
  4592. WireConnection;357;0;353;0
  4593. WireConnection;358;0;356;0
  4594. WireConnection;390;0;371;0
  4595. WireConnection;390;1;389;0
  4596. WireConnection;359;0;366;0
  4597. WireConnection;359;1;357;0
  4598. WireConnection;360;0;358;0
  4599. WireConnection;392;0;390;0
  4600. WireConnection;392;1;385;0
  4601. WireConnection;361;0;359;0
  4602. WireConnection;361;1;360;0
  4603. WireConnection;401;0;392;0
  4604. WireConnection;401;1;36;0
  4605. WireConnection;362;0;361;0
  4606. WireConnection;161;0;13;0
  4607. WireConnection;161;1;16;0
  4608. WireConnection;161;2;160;0
  4609. WireConnection;399;0;401;0
  4610. WireConnection;364;0;362;0
  4611. WireConnection;364;1;363;0
  4612. WireConnection;163;2;161;0
  4613. WireConnection;402;1;399;0
  4614. WireConnection;365;0;304;0
  4615. WireConnection;365;1;364;0
  4616. WireConnection;162;0;163;6
  4617. WireConnection;43;0;402;0
  4618. WireConnection;305;0;365;0
  4619. WireConnection;29;0;28;0
  4620. WireConnection;28;0;21;0
  4621. WireConnection;28;1;161;0
  4622. WireConnection;55;0;54;0
  4623. WireConnection;55;1;56;0
  4624. WireConnection;57;0;55;0
  4625. WireConnection;57;1;58;0
  4626. WireConnection;136;0;57;0
  4627. WireConnection;136;1;137;0
  4628. WireConnection;30;0;29;0
  4629. WireConnection;147;0;146;0
  4630. WireConnection;147;1;21;0
  4631. WireConnection;157;0;154;0
  4632. WireConnection;157;1;155;0
  4633. WireConnection;157;2;156;0
  4634. WireConnection;158;0;157;0
  4635. WireConnection;127;0;122;0
  4636. WireConnection;128;0;127;0
  4637. WireConnection;151;0;118;0
  4638. WireConnection;152;0;190;0
  4639. WireConnection;114;0;190;0
  4640. WireConnection;67;1;62;0
  4641. WireConnection;67;2;66;0
  4642. WireConnection;61;0;60;0
  4643. WireConnection;61;1;67;0
  4644. WireConnection;141;0;61;0
  4645. WireConnection;141;1;149;0
  4646. WireConnection;149;1;140;0
  4647. WireConnection;149;2;150;0
  4648. WireConnection;21;1;19;0
  4649. WireConnection;21;2;20;0
  4650. WireConnection;165;0;133;0
  4651. WireConnection;165;1;164;0
  4652. WireConnection;2;0;32;0
  4653. WireConnection;2;2;141;0
  4654. WireConnection;2;3;131;0
  4655. WireConnection;2;4;131;0
  4656. WireConnection;2;6;165;0
  4657. WireConnection;2;7;132;0
  4658. WireConnection;2;8;53;0
  4659. ASEEND*/
  4660. //CHKSM=BF2AE9B8380A2D0D5EF44F2DDEC95459732D02A6