SkyClouds.shader 224 KB

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