TSL.html 503 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>TSL - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">TSL</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <div class="container-overview">
  18. </div>
  19. <h2 class="subsection-title">Properties</h2>
  20. <div class="member">
  21. <h3 class="name" id="EPSILON" translate="no">.<a href="#EPSILON">EPSILON</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  22. <div class="description">
  23. <p>A small value used to handle floating-point precision errors.</p>
  24. </div>
  25. </div>
  26. <div class="member">
  27. <h3 class="name" id="HALF_PI" translate="no">.<a href="#HALF_PI">HALF_PI</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  28. <div class="description">
  29. <p>Represents PI / 2.</p>
  30. </div>
  31. </div>
  32. <div class="member">
  33. <h3 class="name" id="INFINITY" translate="no">.<a href="#INFINITY">INFINITY</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  34. <div class="description">
  35. <p>Represents infinity.</p>
  36. </div>
  37. </div>
  38. <div class="member">
  39. <h3 class="name" id="PI" translate="no">.<a href="#PI">PI</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  40. <div class="description">
  41. <p>Represents PI.</p>
  42. </div>
  43. </div>
  44. <div class="member">
  45. <h3 class="name" id="PI2" translate="no">.<a href="#PI2">PI2</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  46. <div class="description">
  47. <p>Represents PI * 2. Please use the non-deprecated version <code>TWO_PI</code>.</p>
  48. </div>
  49. <dl class="details">
  50. <dt class="important tag-deprecated"><strong>Deprecated:</strong> Yes</dt>
  51. </dl>
  52. </div>
  53. <div class="member">
  54. <h3 class="name" id="TBNViewMatrix" translate="no">.<a href="#TBNViewMatrix">TBNViewMatrix</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;mat3></span> <span class="type-signature">(constant) </span></h3>
  55. <div class="description">
  56. <p>TSL object that represents the TBN matrix in view space.</p>
  57. </div>
  58. </div>
  59. <div class="member">
  60. <h3 class="name" id="TWO_PI" translate="no">.<a href="#TWO_PI">TWO_PI</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  61. <div class="description">
  62. <p>Represents PI * 2.</p>
  63. </div>
  64. </div>
  65. <div class="member">
  66. <h3 class="name" id="alphaT" translate="no">.<a href="#alphaT">alphaT</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  67. <div class="description">
  68. <p>TSL object that represents the shader variable <code>AlphaT</code>.</p>
  69. </div>
  70. </div>
  71. <div class="member">
  72. <h3 class="name" id="anisotropy" translate="no">.<a href="#anisotropy">anisotropy</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  73. <div class="description">
  74. <p>TSL object that represents the shader variable <code>Anisotropy</code>.</p>
  75. </div>
  76. </div>
  77. <div class="member">
  78. <h3 class="name" id="anisotropyB" translate="no">.<a href="#anisotropyB">anisotropyB</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  79. <div class="description">
  80. <p>TSL object that represents the shader variable <code>AnisotropyB</code>.</p>
  81. </div>
  82. </div>
  83. <div class="member">
  84. <h3 class="name" id="anisotropyT" translate="no">.<a href="#anisotropyT">anisotropyT</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  85. <div class="description">
  86. <p>TSL object that represents the shader variable <code>AnisotropyT</code>.</p>
  87. </div>
  88. </div>
  89. <div class="member">
  90. <h3 class="name" id="attenuationColor" translate="no">.<a href="#attenuationColor">attenuationColor</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;color></span> <span class="type-signature">(constant) </span></h3>
  91. <div class="description">
  92. <p>TSL object that represents the shader variable <code>AttenuationColor</code>.</p>
  93. </div>
  94. </div>
  95. <div class="member">
  96. <h3 class="name" id="attenuationDistance" translate="no">.<a href="#attenuationDistance">attenuationDistance</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  97. <div class="description">
  98. <p>TSL object that represents the shader variable <code>AttenuationDistance</code>.</p>
  99. </div>
  100. </div>
  101. <div class="member">
  102. <h3 class="name" id="backgroundBlurriness" translate="no">.<a href="#backgroundBlurriness">backgroundBlurriness</a><span class="type-signature"> : <a href="SceneNode.html">SceneNode</a></span> <span class="type-signature">(constant) </span></h3>
  103. <div class="description">
  104. <p>TSL object that represents the scene's background blurriness.</p>
  105. </div>
  106. </div>
  107. <div class="member">
  108. <h3 class="name" id="backgroundIntensity" translate="no">.<a href="#backgroundIntensity">backgroundIntensity</a><span class="type-signature"> : <a href="SceneNode.html">SceneNode</a></span> <span class="type-signature">(constant) </span></h3>
  109. <div class="description">
  110. <p>TSL object that represents the scene's background intensity.</p>
  111. </div>
  112. </div>
  113. <div class="member">
  114. <h3 class="name" id="backgroundRotation" translate="no">.<a href="#backgroundRotation">backgroundRotation</a><span class="type-signature"> : <a href="SceneNode.html">SceneNode</a></span> <span class="type-signature">(constant) </span></h3>
  115. <div class="description">
  116. <p>TSL object that represents the scene's background rotation.</p>
  117. </div>
  118. </div>
  119. <div class="member">
  120. <h3 class="name" id="bitangentGeometry" translate="no">.<a href="#bitangentGeometry">bitangentGeometry</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  121. <div class="description">
  122. <p>TSL object that represents the bitangent attribute of the current rendered object.</p>
  123. </div>
  124. </div>
  125. <div class="member">
  126. <h3 class="name" id="bitangentLocal" translate="no">.<a href="#bitangentLocal">bitangentLocal</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  127. <div class="description">
  128. <p>TSL object that represents the vertex bitangent in local space of the current rendered object.</p>
  129. </div>
  130. </div>
  131. <div class="member">
  132. <h3 class="name" id="bitangentView" translate="no">.<a href="#bitangentView">bitangentView</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  133. <div class="description">
  134. <p>TSL object that represents the vertex bitangent in view space of the current rendered object.</p>
  135. </div>
  136. </div>
  137. <div class="member">
  138. <h3 class="name" id="bitangentViewFrame" translate="no">.<a href="#bitangentViewFrame">bitangentViewFrame</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  139. <div class="description">
  140. <p>Bitangent vector in view space, computed dynamically from geometry and UV derivatives.
  141. Complements the tangentViewFrame for constructing the tangent space basis.</p>
  142. <p>Reference: http://www.thetenthplanet.de/archives/1180</p>
  143. </div>
  144. </div>
  145. <div class="member">
  146. <h3 class="name" id="bitangentWorld" translate="no">.<a href="#bitangentWorld">bitangentWorld</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  147. <div class="description">
  148. <p>TSL object that represents the vertex bitangent in world space of the current rendered object.</p>
  149. </div>
  150. </div>
  151. <div class="member">
  152. <h3 class="name" id="cameraFar" translate="no">.<a href="#cameraFar">cameraFar</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  153. <div class="description">
  154. <p>TSL object that represents the <code>far</code> value of the camera used for the current render.</p>
  155. </div>
  156. </div>
  157. <div class="member">
  158. <h3 class="name" id="cameraIndex" translate="no">.<a href="#cameraIndex">cameraIndex</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;uint></span> <span class="type-signature">(constant) </span></h3>
  159. <div class="description">
  160. <p>TSL object that represents the current <code>index</code> value of the camera if used ArrayCamera.</p>
  161. </div>
  162. </div>
  163. <div class="member">
  164. <h3 class="name" id="cameraNear" translate="no">.<a href="#cameraNear">cameraNear</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  165. <div class="description">
  166. <p>TSL object that represents the <code>near</code> value of the camera used for the current render.</p>
  167. </div>
  168. </div>
  169. <div class="member">
  170. <h3 class="name" id="cameraNormalMatrix" translate="no">.<a href="#cameraNormalMatrix">cameraNormalMatrix</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;mat3></span> <span class="type-signature">(constant) </span></h3>
  171. <div class="description">
  172. <p>TSL object that represents the normal matrix of the camera used for the current render.</p>
  173. </div>
  174. </div>
  175. <div class="member">
  176. <h3 class="name" id="cameraPosition" translate="no">.<a href="#cameraPosition">cameraPosition</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  177. <div class="description">
  178. <p>TSL object that represents the position in world space of the camera used for the current render.</p>
  179. </div>
  180. </div>
  181. <div class="member">
  182. <h3 class="name" id="cameraProjectionMatrix" translate="no">.<a href="#cameraProjectionMatrix">cameraProjectionMatrix</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  183. <div class="description">
  184. <p>TSL object that represents the projection matrix of the camera used for the current render.</p>
  185. </div>
  186. </div>
  187. <div class="member">
  188. <h3 class="name" id="cameraProjectionMatrixInverse" translate="no">.<a href="#cameraProjectionMatrixInverse">cameraProjectionMatrixInverse</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  189. <div class="description">
  190. <p>TSL object that represents the inverse projection matrix of the camera used for the current render.</p>
  191. </div>
  192. </div>
  193. <div class="member">
  194. <h3 class="name" id="cameraViewMatrix" translate="no">.<a href="#cameraViewMatrix">cameraViewMatrix</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  195. <div class="description">
  196. <p>TSL object that represents the view matrix of the camera used for the current render.</p>
  197. </div>
  198. </div>
  199. <div class="member">
  200. <h3 class="name" id="cameraViewport" translate="no">.<a href="#cameraViewport">cameraViewport</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;vec4></span> <span class="type-signature">(constant) </span></h3>
  201. <div class="description">
  202. <p>TSL object that represents the viewport of the camera used for the current render.</p>
  203. </div>
  204. </div>
  205. <div class="member">
  206. <h3 class="name" id="cameraWorldMatrix" translate="no">.<a href="#cameraWorldMatrix">cameraWorldMatrix</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  207. <div class="description">
  208. <p>TSL object that represents the world matrix of the camera used for the current render.</p>
  209. </div>
  210. </div>
  211. <div class="member">
  212. <h3 class="name" id="clearcoat" translate="no">.<a href="#clearcoat">clearcoat</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  213. <div class="description">
  214. <p>TSL object that represents the shader variable <code>Clearcoat</code>.</p>
  215. </div>
  216. </div>
  217. <div class="member">
  218. <h3 class="name" id="clearcoatNormalView" translate="no">.<a href="#clearcoatNormalView">clearcoatNormalView</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  219. <div class="description">
  220. <p>TSL object that represents the clearcoat vertex normal of the current rendered object in view space.</p>
  221. </div>
  222. </div>
  223. <div class="member">
  224. <h3 class="name" id="clearcoatRoughness" translate="no">.<a href="#clearcoatRoughness">clearcoatRoughness</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  225. <div class="description">
  226. <p>TSL object that represents the shader variable <code>ClearcoatRoughness</code>.</p>
  227. </div>
  228. </div>
  229. <div class="member">
  230. <h3 class="name" id="clipSpace" translate="no">.<a href="#clipSpace">clipSpace</a><span class="type-signature"> : <a href="VaryingNode.html">VaryingNode</a>.&lt;vec4></span> <span class="type-signature">(constant) </span></h3>
  231. <div class="description">
  232. <p>TSL object that represents the clip space position of the current rendered object.</p>
  233. </div>
  234. </div>
  235. <div class="member">
  236. <h3 class="name" id="dashSize" translate="no">.<a href="#dashSize">dashSize</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  237. <div class="description">
  238. <p>TSL object that represents the shader variable <code>dashSize</code>.</p>
  239. </div>
  240. </div>
  241. <div class="member">
  242. <h3 class="name" id="deltaTime" translate="no">.<a href="#deltaTime">deltaTime</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  243. <div class="description">
  244. <p>Represents the delta time in seconds.</p>
  245. </div>
  246. </div>
  247. <div class="member">
  248. <h3 class="name" id="depth" translate="no">.<a href="#depth">depth</a><span class="type-signature"> : <a href="ViewportDepthNode.html">ViewportDepthNode</a></span> <span class="type-signature">(constant) </span></h3>
  249. <div class="description">
  250. <p>TSL object that represents the depth value for the current fragment.</p>
  251. </div>
  252. </div>
  253. <div class="member">
  254. <h3 class="name" id="diffuseColor" translate="no">.<a href="#diffuseColor">diffuseColor</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;vec4></span> <span class="type-signature">(constant) </span></h3>
  255. <div class="description">
  256. <p>TSL object that represents the shader variable <code>DiffuseColor</code>.</p>
  257. </div>
  258. </div>
  259. <div class="member">
  260. <h3 class="name" id="diffuseContribution" translate="no">.<a href="#diffuseContribution">diffuseContribution</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  261. <div class="description">
  262. <p>TSL object that represents the shader variable <code>DiffuseContribution</code>.</p>
  263. </div>
  264. </div>
  265. <div class="member">
  266. <h3 class="name" id="directionToFaceDirection" translate="no">.<a href="#directionToFaceDirection">directionToFaceDirection</a> <span class="type-signature">(constant) </span></h3>
  267. <div class="description">
  268. <p>Converts a direction vector to a face direction vector based on the material's side.</p>
  269. <p>If the material is set to <code>BackSide</code>, the direction is inverted.
  270. If the material is set to <code>DoubleSide</code>, the direction is multiplied by <code>faceDirection</code>.</p>
  271. </div>
  272. </div>
  273. <div class="member">
  274. <h3 class="name" id="dispersion" translate="no">.<a href="#dispersion">dispersion</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  275. <div class="description">
  276. <p>TSL object that represents the shader variable <code>Dispersion</code>.</p>
  277. </div>
  278. </div>
  279. <div class="member">
  280. <h3 class="name" id="drawIndex" translate="no">.<a href="#drawIndex">drawIndex</a><span class="type-signature"> : <a href="IndexNode.html">IndexNode</a></span> <span class="type-signature">(constant) </span></h3>
  281. <div class="description">
  282. <p>TSL object that represents the index of a draw call.</p>
  283. </div>
  284. </div>
  285. <div class="member">
  286. <h3 class="name" id="emissive" translate="no">.<a href="#emissive">emissive</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  287. <div class="description">
  288. <p>TSL object that represents the shader variable <code>EmissiveColor</code>.</p>
  289. </div>
  290. </div>
  291. <div class="member">
  292. <h3 class="name" id="faceDirection" translate="no">.<a href="#faceDirection">faceDirection</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  293. <div class="description">
  294. <p>TSL object that represents the front facing status as a number instead of a bool.
  295. <code>1</code> means front facing, <code>-1</code> means back facing.</p>
  296. </div>
  297. </div>
  298. <div class="member">
  299. <h3 class="name" id="frameGroup" translate="no">.<a href="#frameGroup">frameGroup</a><span class="type-signature"> : <a href="UniformGroupNode.html">UniformGroupNode</a></span> <span class="type-signature">(constant) </span></h3>
  300. <div class="description">
  301. <p>TSL object that represents a shared uniform group node which is updated once per frame.</p>
  302. </div>
  303. </div>
  304. <div class="member">
  305. <h3 class="name" id="frameId" translate="no">.<a href="#frameId">frameId</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;uint></span> <span class="type-signature">(constant) </span></h3>
  306. <div class="description">
  307. <p>Represents the current frame ID.</p>
  308. </div>
  309. </div>
  310. <div class="member">
  311. <h3 class="name" id="frontFacing" translate="no">.<a href="#frontFacing">frontFacing</a><span class="type-signature"> : <a href="FrontFacingNode.html">FrontFacingNode</a>.&lt;bool></span> <span class="type-signature">(constant) </span></h3>
  312. <div class="description">
  313. <p>TSL object that represents whether a primitive is front or back facing</p>
  314. </div>
  315. </div>
  316. <div class="member">
  317. <h3 class="name" id="gapSize" translate="no">.<a href="#gapSize">gapSize</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  318. <div class="description">
  319. <p>TSL object that represents the shader variable <code>gapSize</code>.</p>
  320. </div>
  321. </div>
  322. <div class="member">
  323. <h3 class="name" id="globalId" translate="no">.<a href="#globalId">globalId</a><span class="type-signature"> : <a href="ComputeBuiltinNode.html">ComputeBuiltinNode</a>.&lt;uvec3></span> <span class="type-signature">(constant) </span></h3>
  324. <div class="description">
  325. <p>A non-linearized 3-dimensional representation of the current invocation's position within a 3D global grid.</p>
  326. </div>
  327. </div>
  328. <div class="member">
  329. <h3 class="name" id="highpModelNormalViewMatrix" translate="no">.<a href="#highpModelNormalViewMatrix">highpModelNormalViewMatrix</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;mat3></span> <span class="type-signature">(constant) </span></h3>
  330. <div class="description">
  331. <p>TSL object that represents the object's model normal view in <code>highp</code> precision
  332. which is achieved by computing the matrix in JS and not in the shader.</p>
  333. </div>
  334. </div>
  335. <div class="member">
  336. <h3 class="name" id="highpModelViewMatrix" translate="no">.<a href="#highpModelViewMatrix">highpModelViewMatrix</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  337. <div class="description">
  338. <p>TSL object that represents the object's model view in <code>highp</code> precision
  339. which is achieved by computing the matrix in JS and not in the shader.</p>
  340. </div>
  341. </div>
  342. <div class="member">
  343. <h3 class="name" id="instanceIndex" translate="no">.<a href="#instanceIndex">instanceIndex</a><span class="type-signature"> : <a href="IndexNode.html">IndexNode</a></span> <span class="type-signature">(constant) </span></h3>
  344. <div class="description">
  345. <p>TSL object that represents the index of either a mesh instance or an invocation of a compute shader.</p>
  346. </div>
  347. </div>
  348. <div class="member">
  349. <h3 class="name" id="invocationLocalIndex" translate="no">.<a href="#invocationLocalIndex">invocationLocalIndex</a><span class="type-signature"> : <a href="IndexNode.html">IndexNode</a></span> <span class="type-signature">(constant) </span></h3>
  350. <div class="description">
  351. <p>TSL object that represents the index of a compute invocation within the scope of a workgroup load.</p>
  352. </div>
  353. </div>
  354. <div class="member">
  355. <h3 class="name" id="invocationSubgroupIndex" translate="no">.<a href="#invocationSubgroupIndex">invocationSubgroupIndex</a><span class="type-signature"> : <a href="IndexNode.html">IndexNode</a></span> <span class="type-signature">(constant) </span></h3>
  356. <div class="description">
  357. <p>TSL object that represents the index of a compute invocation within the scope of a subgroup.</p>
  358. </div>
  359. </div>
  360. <div class="member">
  361. <h3 class="name" id="ior" translate="no">.<a href="#ior">ior</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  362. <div class="description">
  363. <p>TSL object that represents the shader variable <code>IOR</code>.</p>
  364. </div>
  365. </div>
  366. <div class="member">
  367. <h3 class="name" id="iridescence" translate="no">.<a href="#iridescence">iridescence</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  368. <div class="description">
  369. <p>TSL object that represents the shader variable <code>Iridescence</code>.</p>
  370. </div>
  371. </div>
  372. <div class="member">
  373. <h3 class="name" id="iridescenceIOR" translate="no">.<a href="#iridescenceIOR">iridescenceIOR</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  374. <div class="description">
  375. <p>TSL object that represents the shader variable <code>IridescenceIOR</code>.</p>
  376. </div>
  377. </div>
  378. <div class="member">
  379. <h3 class="name" id="iridescenceThickness" translate="no">.<a href="#iridescenceThickness">iridescenceThickness</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  380. <div class="description">
  381. <p>TSL object that represents the shader variable <code>IridescenceThickness</code>.</p>
  382. </div>
  383. </div>
  384. <div class="member">
  385. <h3 class="name" id="localId" translate="no">.<a href="#localId">localId</a><span class="type-signature"> : <a href="ComputeBuiltinNode.html">ComputeBuiltinNode</a>.&lt;uvec3></span> <span class="type-signature">(constant) </span></h3>
  386. <div class="description">
  387. <p>A non-linearized 3-dimensional representation of the current invocation's position within a 3D workgroup grid.</p>
  388. </div>
  389. </div>
  390. <div class="member">
  391. <h3 class="name" id="materialAO" translate="no">.<a href="#materialAO">materialAO</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  392. <div class="description">
  393. <p>TSL object that represents the ambient occlusion map of the current material.
  394. The value is composed via <code>aoMap.r</code> - 1 * <code>aoMapIntensity</code> + 1.</p>
  395. </div>
  396. </div>
  397. <div class="member">
  398. <h3 class="name" id="materialAlphaTest" translate="no">.<a href="#materialAlphaTest">materialAlphaTest</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  399. <div class="description">
  400. <p>TSL object that represents alpha test of the current material.</p>
  401. </div>
  402. </div>
  403. <div class="member">
  404. <h3 class="name" id="materialAnisotropy" translate="no">.<a href="#materialAnisotropy">materialAnisotropy</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> <span class="type-signature">(constant) </span></h3>
  405. <div class="description">
  406. <p>TSL object that represents the anisotropy of the current material.</p>
  407. </div>
  408. </div>
  409. <div class="member">
  410. <h3 class="name" id="materialAnisotropyVector" translate="no">.<a href="#materialAnisotropyVector">materialAnisotropyVector</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> <span class="type-signature">(constant) </span></h3>
  411. <div class="description">
  412. <p>TSL object that represents the anisotropy vector of the current material.</p>
  413. </div>
  414. </div>
  415. <div class="member">
  416. <h3 class="name" id="materialAttenuationColor" translate="no">.<a href="#materialAttenuationColor">materialAttenuationColor</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  417. <div class="description">
  418. <p>TSL object that represents the attenuation color of the current material.</p>
  419. </div>
  420. </div>
  421. <div class="member">
  422. <h3 class="name" id="materialAttenuationDistance" translate="no">.<a href="#materialAttenuationDistance">materialAttenuationDistance</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  423. <div class="description">
  424. <p>TSL object that represents the attenuation distance of the current material.</p>
  425. </div>
  426. </div>
  427. <div class="member">
  428. <h3 class="name" id="materialClearcoat" translate="no">.<a href="#materialClearcoat">materialClearcoat</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  429. <div class="description">
  430. <p>TSL object that represents the clearcoat of the current material.
  431. The value is composed via <code>clearcoat</code> * <code>clearcoatMap.r</code></p>
  432. </div>
  433. </div>
  434. <div class="member">
  435. <h3 class="name" id="materialClearcoatNormal" translate="no">.<a href="#materialClearcoatNormal">materialClearcoatNormal</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  436. <div class="description">
  437. <p>TSL object that represents the clearcoat normal of the current material.
  438. The value will be either <code>clearcoatNormalMap</code> or <code>normalView</code>.</p>
  439. </div>
  440. </div>
  441. <div class="member">
  442. <h3 class="name" id="materialClearcoatRoughness" translate="no">.<a href="#materialClearcoatRoughness">materialClearcoatRoughness</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  443. <div class="description">
  444. <p>TSL object that represents the clearcoat roughness of the current material.
  445. The value is composed via <code>clearcoatRoughness</code> * <code>clearcoatRoughnessMap.r</code>.</p>
  446. </div>
  447. </div>
  448. <div class="member">
  449. <h3 class="name" id="materialColor" translate="no">.<a href="#materialColor">materialColor</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  450. <div class="description">
  451. <p>TSL object that represents the diffuse color of the current material.
  452. The value is composed via <code>color</code> * <code>map</code>.</p>
  453. </div>
  454. </div>
  455. <div class="member">
  456. <h3 class="name" id="materialDispersion" translate="no">.<a href="#materialDispersion">materialDispersion</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  457. <div class="description">
  458. <p>TSL object that represents the dispersion of the current material.</p>
  459. </div>
  460. </div>
  461. <div class="member">
  462. <h3 class="name" id="materialEmissive" translate="no">.<a href="#materialEmissive">materialEmissive</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  463. <div class="description">
  464. <p>TSL object that represents the emissive color of the current material.
  465. The value is composed via <code>emissive</code> * <code>emissiveIntensity</code> * <code>emissiveMap</code>.</p>
  466. </div>
  467. </div>
  468. <div class="member">
  469. <h3 class="name" id="materialEnvIntensity" translate="no">.<a href="#materialEnvIntensity">materialEnvIntensity</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  470. <div class="description">
  471. <p>TSL object that represents the intensity of environment maps of PBR materials.
  472. When <code>material.envMap</code> is set, the value is <code>material.envMapIntensity</code> otherwise <code>scene.environmentIntensity</code>.</p>
  473. </div>
  474. </div>
  475. <div class="member">
  476. <h3 class="name" id="materialEnvRotation" translate="no">.<a href="#materialEnvRotation">materialEnvRotation</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  477. <div class="description">
  478. <p>TSL object that represents the rotation of environment maps.
  479. When <code>material.envMap</code> is set, the value is <code>material.envMapRotation</code>. <code>scene.environmentRotation</code> controls the
  480. rotation of <code>scene.environment</code> instead.</p>
  481. </div>
  482. </div>
  483. <div class="member">
  484. <h3 class="name" id="materialIOR" translate="no">.<a href="#materialIOR">materialIOR</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  485. <div class="description">
  486. <p>TSL object that represents the IOR of the current material.</p>
  487. </div>
  488. </div>
  489. <div class="member">
  490. <h3 class="name" id="materialIridescence" translate="no">.<a href="#materialIridescence">materialIridescence</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  491. <div class="description">
  492. <p>TSL object that represents the iridescence of the current material.</p>
  493. </div>
  494. </div>
  495. <div class="member">
  496. <h3 class="name" id="materialIridescenceIOR" translate="no">.<a href="#materialIridescenceIOR">materialIridescenceIOR</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  497. <div class="description">
  498. <p>TSL object that represents the iridescence IOR of the current material.</p>
  499. </div>
  500. </div>
  501. <div class="member">
  502. <h3 class="name" id="materialIridescenceThickness" translate="no">.<a href="#materialIridescenceThickness">materialIridescenceThickness</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  503. <div class="description">
  504. <p>TSL object that represents the iridescence thickness of the current material.</p>
  505. </div>
  506. </div>
  507. <div class="member">
  508. <h3 class="name" id="materialLightMap" translate="no">.<a href="#materialLightMap">materialLightMap</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  509. <div class="description">
  510. <p>TSL object that represents the light map of the current material.
  511. The value is composed via <code>lightMapIntensity</code> * <code>lightMap.rgb</code>.</p>
  512. </div>
  513. </div>
  514. <div class="member">
  515. <h3 class="name" id="materialLineDashOffset" translate="no">.<a href="#materialLineDashOffset">materialLineDashOffset</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  516. <div class="description">
  517. <p>TSL object that represents the dash offset of the current line material.</p>
  518. </div>
  519. </div>
  520. <div class="member">
  521. <h3 class="name" id="materialLineDashSize" translate="no">.<a href="#materialLineDashSize">materialLineDashSize</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  522. <div class="description">
  523. <p>TSL object that represents the dash size of the current dashed line material.</p>
  524. </div>
  525. </div>
  526. <div class="member">
  527. <h3 class="name" id="materialLineGapSize" translate="no">.<a href="#materialLineGapSize">materialLineGapSize</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  528. <div class="description">
  529. <p>TSL object that represents the gap size of the current dashed line material.</p>
  530. </div>
  531. </div>
  532. <div class="member">
  533. <h3 class="name" id="materialLineScale" translate="no">.<a href="#materialLineScale">materialLineScale</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  534. <div class="description">
  535. <p>TSL object that represents the scale of the current dashed line material.</p>
  536. </div>
  537. </div>
  538. <div class="member">
  539. <h3 class="name" id="materialLineWidth" translate="no">.<a href="#materialLineWidth">materialLineWidth</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  540. <div class="description">
  541. <p>TSL object that represents the line width of the current line material.</p>
  542. </div>
  543. </div>
  544. <div class="member">
  545. <h3 class="name" id="materialMetalness" translate="no">.<a href="#materialMetalness">materialMetalness</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  546. <div class="description">
  547. <p>TSL object that represents the metalness of the current material.
  548. The value is composed via <code>metalness</code> * <code>metalnessMap.b</code>.</p>
  549. </div>
  550. </div>
  551. <div class="member">
  552. <h3 class="name" id="materialNormal" translate="no">.<a href="#materialNormal">materialNormal</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  553. <div class="description">
  554. <p>TSL object that represents the normal of the current material.
  555. The value will be either <code>normalMap</code> * <code>normalScale</code>, <code>bumpMap</code> * <code>bumpScale</code> or <code>normalView</code>.</p>
  556. </div>
  557. </div>
  558. <div class="member">
  559. <h3 class="name" id="materialOpacity" translate="no">.<a href="#materialOpacity">materialOpacity</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  560. <div class="description">
  561. <p>TSL object that represents the opacity of the current material.
  562. The value is composed via <code>opacity</code> * <code>alphaMap</code>.</p>
  563. </div>
  564. </div>
  565. <div class="member">
  566. <h3 class="name" id="materialPointSize" translate="no">.<a href="#materialPointSize">materialPointSize</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  567. <div class="description">
  568. <p>TSL object that represents the point size of the current points material.</p>
  569. </div>
  570. </div>
  571. <div class="member">
  572. <h3 class="name" id="materialReflectivity" translate="no">.<a href="#materialReflectivity">materialReflectivity</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  573. <div class="description">
  574. <p>TSL object that represents the reflectivity of the current material.</p>
  575. </div>
  576. </div>
  577. <div class="member">
  578. <h3 class="name" id="materialRefractionRatio" translate="no">.<a href="#materialRefractionRatio">materialRefractionRatio</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  579. <div class="description">
  580. <p>TSL object that represents the refraction ratio of the material used for rendering the current object.</p>
  581. </div>
  582. </div>
  583. <div class="member">
  584. <h3 class="name" id="materialRotation" translate="no">.<a href="#materialRotation">materialRotation</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  585. <div class="description">
  586. <p>TSL object that represents the rotation of the current sprite material.</p>
  587. </div>
  588. </div>
  589. <div class="member">
  590. <h3 class="name" id="materialRoughness" translate="no">.<a href="#materialRoughness">materialRoughness</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  591. <div class="description">
  592. <p>TSL object that represents the roughness of the current material.
  593. The value is composed via <code>roughness</code> * <code>roughnessMap.g</code>.</p>
  594. </div>
  595. </div>
  596. <div class="member">
  597. <h3 class="name" id="materialSheen" translate="no">.<a href="#materialSheen">materialSheen</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  598. <div class="description">
  599. <p>TSL object that represents the sheen color of the current material.
  600. The value is composed via <code>sheen</code> * <code>sheenColor</code> * <code>sheenColorMap</code>.</p>
  601. </div>
  602. </div>
  603. <div class="member">
  604. <h3 class="name" id="materialSheenRoughness" translate="no">.<a href="#materialSheenRoughness">materialSheenRoughness</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  605. <div class="description">
  606. <p>TSL object that represents the sheen roughness of the current material.
  607. The value is composed via <code>sheenRoughness</code> * <code>sheenRoughnessMap.a</code>.</p>
  608. </div>
  609. </div>
  610. <div class="member">
  611. <h3 class="name" id="materialShininess" translate="no">.<a href="#materialShininess">materialShininess</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  612. <div class="description">
  613. <p>TSL object that represents the shininess of the current material.</p>
  614. </div>
  615. </div>
  616. <div class="member">
  617. <h3 class="name" id="materialSpecular" translate="no">.<a href="#materialSpecular">materialSpecular</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  618. <div class="description">
  619. <p>TSL object that represents the specular of the current material.</p>
  620. </div>
  621. </div>
  622. <div class="member">
  623. <h3 class="name" id="materialSpecularColor" translate="no">.<a href="#materialSpecularColor">materialSpecularColor</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  624. <div class="description">
  625. <p>TSL object that represents the specular color of the current material.
  626. The value is composed via <code>specularColor</code> * <code>specularMap.rgb</code>.</p>
  627. </div>
  628. </div>
  629. <div class="member">
  630. <h3 class="name" id="materialSpecularIntensity" translate="no">.<a href="#materialSpecularIntensity">materialSpecularIntensity</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  631. <div class="description">
  632. <p>TSL object that represents the specular intensity of the current material.
  633. The value is composed via <code>specularIntensity</code> * <code>specularMap.a</code>.</p>
  634. </div>
  635. </div>
  636. <div class="member">
  637. <h3 class="name" id="materialSpecularStrength" translate="no">.<a href="#materialSpecularStrength">materialSpecularStrength</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  638. <div class="description">
  639. <p>TSL object that represents the specular strength of the current material.
  640. The value is composed via <code>specularMap.r</code>.</p>
  641. </div>
  642. </div>
  643. <div class="member">
  644. <h3 class="name" id="materialThickness" translate="no">.<a href="#materialThickness">materialThickness</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  645. <div class="description">
  646. <p>TSL object that represents the thickness of the current material.
  647. The value is composed via <code>thickness</code> * <code>thicknessMap.g</code>.</p>
  648. </div>
  649. </div>
  650. <div class="member">
  651. <h3 class="name" id="materialTransmission" translate="no">.<a href="#materialTransmission">materialTransmission</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  652. <div class="description">
  653. <p>TSL object that represents the transmission of the current material.
  654. The value is composed via <code>transmission</code> * <code>transmissionMap.r</code>.</p>
  655. </div>
  656. </div>
  657. <div class="member">
  658. <h3 class="name" id="mediumpModelViewMatrix" translate="no">.<a href="#mediumpModelViewMatrix">mediumpModelViewMatrix</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  659. <div class="description">
  660. <p>TSL object that represents the object's model view in <code>mediump</code> precision.</p>
  661. </div>
  662. </div>
  663. <div class="member">
  664. <h3 class="name" id="metalness" translate="no">.<a href="#metalness">metalness</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  665. <div class="description">
  666. <p>TSL object that represents the shader variable <code>Metalness</code>.</p>
  667. </div>
  668. </div>
  669. <div class="member">
  670. <h3 class="name" id="modelDirection" translate="no">.<a href="#modelDirection">modelDirection</a><span class="type-signature"> : <a href="ModelNode.html">ModelNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  671. <div class="description">
  672. <p>TSL object that represents the object's direction in world space.</p>
  673. </div>
  674. </div>
  675. <div class="member">
  676. <h3 class="name" id="modelNormalMatrix" translate="no">.<a href="#modelNormalMatrix">modelNormalMatrix</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;mat3></span> <span class="type-signature">(constant) </span></h3>
  677. <div class="description">
  678. <p>TSL object that represents the object's normal matrix.</p>
  679. </div>
  680. </div>
  681. <div class="member">
  682. <h3 class="name" id="modelPosition" translate="no">.<a href="#modelPosition">modelPosition</a><span class="type-signature"> : <a href="ModelNode.html">ModelNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  683. <div class="description">
  684. <p>TSL object that represents the object's position in world space.</p>
  685. </div>
  686. </div>
  687. <div class="member">
  688. <h3 class="name" id="modelRadius" translate="no">.<a href="#modelRadius">modelRadius</a><span class="type-signature"> : <a href="ModelNode.html">ModelNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  689. <div class="description">
  690. <p>TSL object that represents the object's radius.</p>
  691. </div>
  692. </div>
  693. <div class="member">
  694. <h3 class="name" id="modelScale" translate="no">.<a href="#modelScale">modelScale</a><span class="type-signature"> : <a href="ModelNode.html">ModelNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  695. <div class="description">
  696. <p>TSL object that represents the object's scale in world space.</p>
  697. </div>
  698. </div>
  699. <div class="member">
  700. <h3 class="name" id="modelViewMatrix" translate="no">.<a href="#modelViewMatrix">modelViewMatrix</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  701. <div class="description">
  702. <p>TSL object that represents the object's model view matrix.</p>
  703. </div>
  704. </div>
  705. <div class="member">
  706. <h3 class="name" id="modelViewPosition" translate="no">.<a href="#modelViewPosition">modelViewPosition</a><span class="type-signature"> : <a href="ModelNode.html">ModelNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  707. <div class="description">
  708. <p>TSL object that represents the object's position in view/camera space.</p>
  709. </div>
  710. </div>
  711. <div class="member">
  712. <h3 class="name" id="modelViewProjection" translate="no">.<a href="#modelViewProjection">modelViewProjection</a><span class="type-signature"> : <a href="VaryingNode.html">VaryingNode</a>.&lt;vec4></span> <span class="type-signature">(constant) </span></h3>
  713. <div class="description">
  714. <p>TSL object that represents the position in clip space after the model-view-projection transform of the current rendered object.</p>
  715. </div>
  716. </div>
  717. <div class="member">
  718. <h3 class="name" id="modelWorldMatrix" translate="no">.<a href="#modelWorldMatrix">modelWorldMatrix</a><span class="type-signature"> : <a href="ModelNode.html">ModelNode</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  719. <div class="description">
  720. <p>TSL object that represents the object's world matrix.</p>
  721. </div>
  722. </div>
  723. <div class="member">
  724. <h3 class="name" id="modelWorldMatrixInverse" translate="no">.<a href="#modelWorldMatrixInverse">modelWorldMatrixInverse</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;mat4></span> <span class="type-signature">(constant) </span></h3>
  725. <div class="description">
  726. <p>TSL object that represents the object's inverse world matrix.</p>
  727. </div>
  728. </div>
  729. <div class="member">
  730. <h3 class="name" id="normalFlat" translate="no">.<a href="#normalFlat">normalFlat</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  731. <div class="description">
  732. <p>TSL object that represents the flat vertex normal of the current rendered object in view space.</p>
  733. </div>
  734. </div>
  735. <div class="member">
  736. <h3 class="name" id="normalGeometry" translate="no">.<a href="#normalGeometry">normalGeometry</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  737. <div class="description">
  738. <p>TSL object that represents the normal attribute of the current rendered object in local space.</p>
  739. </div>
  740. </div>
  741. <div class="member">
  742. <h3 class="name" id="normalLocal" translate="no">.<a href="#normalLocal">normalLocal</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  743. <div class="description">
  744. <p>TSL object that represents the vertex normal of the current rendered object in local space.</p>
  745. </div>
  746. </div>
  747. <div class="member">
  748. <h3 class="name" id="normalView" translate="no">.<a href="#normalView">normalView</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  749. <div class="description">
  750. <p>TSL object that represents the vertex normal of the current rendered object in view space.</p>
  751. </div>
  752. </div>
  753. <div class="member">
  754. <h3 class="name" id="normalViewGeometry" translate="no">.<a href="#normalViewGeometry">normalViewGeometry</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  755. <div class="description">
  756. <p>TSL object that represents the vertex normal of the current rendered object in view space.</p>
  757. </div>
  758. </div>
  759. <div class="member">
  760. <h3 class="name" id="normalWorld" translate="no">.<a href="#normalWorld">normalWorld</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  761. <div class="description">
  762. <p>TSL object that represents the vertex normal of the current rendered object in world space.</p>
  763. </div>
  764. </div>
  765. <div class="member">
  766. <h3 class="name" id="normalWorldGeometry" translate="no">.<a href="#normalWorldGeometry">normalWorldGeometry</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  767. <div class="description">
  768. <p>TSL object that represents the vertex normal of the current rendered object in world space.</p>
  769. </div>
  770. </div>
  771. <div class="member">
  772. <h3 class="name" id="numWorkgroups" translate="no">.<a href="#numWorkgroups">numWorkgroups</a><span class="type-signature"> : <a href="ComputeBuiltinNode.html">ComputeBuiltinNode</a>.&lt;uvec3></span> <span class="type-signature">(constant) </span></h3>
  773. <div class="description">
  774. <p>Represents the number of workgroups dispatched by the compute shader.</p>
  775. <pre><code class="language-js">// Run 512 invocations/threads with a workgroup size of 128.
  776. const computeFn = Fn(() => {
  777. // numWorkgroups.x = 4
  778. storageBuffer.element(0).assign(numWorkgroups.x)
  779. })().compute(512, [128]);
  780. // Run 512 invocations/threads with the default workgroup size of 64.
  781. const computeFn = Fn(() => {
  782. // numWorkgroups.x = 8
  783. storageBuffer.element(0).assign(numWorkgroups.x)
  784. })().compute(512);
  785. </code></pre>
  786. </div>
  787. </div>
  788. <div class="member">
  789. <h3 class="name" id="objectGroup" translate="no">.<a href="#objectGroup">objectGroup</a><span class="type-signature"> : <a href="UniformGroupNode.html">UniformGroupNode</a></span> <span class="type-signature">(constant) </span></h3>
  790. <div class="description">
  791. <p>TSL object that represents a uniform group node which is updated once per object.</p>
  792. </div>
  793. </div>
  794. <div class="member">
  795. <h3 class="name" id="output" translate="no">.<a href="#output">output</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;vec4></span> <span class="type-signature">(constant) </span></h3>
  796. <div class="description">
  797. <p>TSL object that represents the shader variable <code>Output</code>.</p>
  798. </div>
  799. </div>
  800. <div class="member">
  801. <h3 class="name" id="parallaxDirection" translate="no">.<a href="#parallaxDirection">parallaxDirection</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;mat3></span> <span class="type-signature">(constant) </span></h3>
  802. <div class="description">
  803. <p>TSL object that represents the parallax direction.</p>
  804. </div>
  805. </div>
  806. <div class="member">
  807. <h3 class="name" id="pointUV" translate="no">.<a href="#pointUV">pointUV</a><span class="type-signature"> : <a href="PointUVNode.html">PointUVNode</a></span> <span class="type-signature">(constant) </span></h3>
  808. <div class="description">
  809. <p>TSL object that represents the uv coordinates of points.</p>
  810. </div>
  811. </div>
  812. <div class="member">
  813. <h3 class="name" id="pointWidth" translate="no">.<a href="#pointWidth">pointWidth</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  814. <div class="description">
  815. <p>TSL object that represents the shader variable <code>pointWidth</code>.</p>
  816. </div>
  817. </div>
  818. <div class="member">
  819. <h3 class="name" id="positionGeometry" translate="no">.<a href="#positionGeometry">positionGeometry</a><span class="type-signature"> : <a href="AttributeNode.html">AttributeNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  820. <div class="description">
  821. <p>TSL object that represents the position attribute of the current rendered object.</p>
  822. </div>
  823. </div>
  824. <div class="member">
  825. <h3 class="name" id="positionLocal" translate="no">.<a href="#positionLocal">positionLocal</a><span class="type-signature"> : <a href="AttributeNode.html">AttributeNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  826. <div class="description">
  827. <p>TSL object that represents the vertex position in local space of the current rendered object.</p>
  828. </div>
  829. </div>
  830. <div class="member">
  831. <h3 class="name" id="positionPrevious" translate="no">.<a href="#positionPrevious">positionPrevious</a><span class="type-signature"> : <a href="AttributeNode.html">AttributeNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  832. <div class="description">
  833. <p>TSL object that represents the previous vertex position in local space of the current rendered object.
  834. Used in context of <a href="VelocityNode.html">VelocityNode</a> for rendering motion vectors.</p>
  835. </div>
  836. </div>
  837. <div class="member">
  838. <h3 class="name" id="positionView" translate="no">.<a href="#positionView">positionView</a><span class="type-signature"> : <a href="VaryingNode.html">VaryingNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  839. <div class="description">
  840. <p>TSL object that represents the vertex position in view space of the current rendered object.</p>
  841. </div>
  842. </div>
  843. <div class="member">
  844. <h3 class="name" id="positionViewDirection" translate="no">.<a href="#positionViewDirection">positionViewDirection</a><span class="type-signature"> : <a href="VaryingNode.html">VaryingNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  845. <div class="description">
  846. <p>TSL object that represents the position view direction of the current rendered object.</p>
  847. </div>
  848. </div>
  849. <div class="member">
  850. <h3 class="name" id="positionWorld" translate="no">.<a href="#positionWorld">positionWorld</a><span class="type-signature"> : <a href="VaryingNode.html">VaryingNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  851. <div class="description">
  852. <p>TSL object that represents the vertex position in world space of the current rendered object.</p>
  853. </div>
  854. </div>
  855. <div class="member">
  856. <h3 class="name" id="positionWorldDirection" translate="no">.<a href="#positionWorldDirection">positionWorldDirection</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  857. <div class="description">
  858. <p>TSL object that represents the position world direction of the current rendered object.</p>
  859. </div>
  860. </div>
  861. <div class="member">
  862. <h3 class="name" id="reflectVector" translate="no">.<a href="#reflectVector">reflectVector</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  863. <div class="description">
  864. <p>Used for sampling cube maps when using cube reflection mapping.</p>
  865. </div>
  866. </div>
  867. <div class="member">
  868. <h3 class="name" id="reflectView" translate="no">.<a href="#reflectView">reflectView</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  869. <div class="description">
  870. <p>The reflect vector in view space.</p>
  871. </div>
  872. </div>
  873. <div class="member">
  874. <h3 class="name" id="refractVector" translate="no">.<a href="#refractVector">refractVector</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  875. <div class="description">
  876. <p>Used for sampling cube maps when using cube refraction mapping.</p>
  877. </div>
  878. </div>
  879. <div class="member">
  880. <h3 class="name" id="refractView" translate="no">.<a href="#refractView">refractView</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  881. <div class="description">
  882. <p>The refract vector in view space.</p>
  883. </div>
  884. </div>
  885. <div class="member">
  886. <h3 class="name" id="renderGroup" translate="no">.<a href="#renderGroup">renderGroup</a><span class="type-signature"> : <a href="UniformGroupNode.html">UniformGroupNode</a></span> <span class="type-signature">(constant) </span></h3>
  887. <div class="description">
  888. <p>TSL object that represents a shared uniform group node which is updated once per render.</p>
  889. </div>
  890. </div>
  891. <div class="member">
  892. <h3 class="name" id="roughness" translate="no">.<a href="#roughness">roughness</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  893. <div class="description">
  894. <p>TSL object that represents the shader variable <code>Roughness</code>.</p>
  895. </div>
  896. </div>
  897. <div class="member">
  898. <h3 class="name" id="screenCoordinate" translate="no">.<a href="#screenCoordinate">screenCoordinate</a><span class="type-signature"> : <a href="ScreenNode.html">ScreenNode</a>.&lt;vec2></span> <span class="type-signature">(constant) </span></h3>
  899. <div class="description">
  900. <p>TSL object that represents the current <code>x</code>/<code>y</code> pixel position on the screen in physical pixel units.</p>
  901. </div>
  902. </div>
  903. <div class="member">
  904. <h3 class="name" id="screenDPR" translate="no">.<a href="#screenDPR">screenDPR</a><span class="type-signature"> : <a href="ScreenNode.html">ScreenNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  905. <div class="description">
  906. <p>TSL object that represents the current DPR.</p>
  907. </div>
  908. </div>
  909. <div class="member">
  910. <h3 class="name" id="screenSize" translate="no">.<a href="#screenSize">screenSize</a><span class="type-signature"> : <a href="ScreenNode.html">ScreenNode</a>.&lt;vec2></span> <span class="type-signature">(constant) </span></h3>
  911. <div class="description">
  912. <p>TSL object that represents the screen resolution in physical pixel units.</p>
  913. </div>
  914. </div>
  915. <div class="member">
  916. <h3 class="name" id="screenUV" translate="no">.<a href="#screenUV">screenUV</a><span class="type-signature"> : <a href="ScreenNode.html">ScreenNode</a>.&lt;vec2></span> <span class="type-signature">(constant) </span></h3>
  917. <div class="description">
  918. <p>TSL object that represents normalized screen coordinates, unitless in <code>[0, 1]</code>.</p>
  919. </div>
  920. </div>
  921. <div class="member">
  922. <h3 class="name" id="shadowPositionWorld" translate="no">.<a href="#shadowPositionWorld">shadowPositionWorld</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  923. <div class="description">
  924. <p>TSL object that represents the vertex position in world space during the shadow pass.</p>
  925. </div>
  926. </div>
  927. <div class="member">
  928. <h3 class="name" id="sheen" translate="no">.<a href="#sheen">sheen</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  929. <div class="description">
  930. <p>TSL object that represents the shader variable <code>Sheen</code>.</p>
  931. </div>
  932. </div>
  933. <div class="member">
  934. <h3 class="name" id="sheenRoughness" translate="no">.<a href="#sheenRoughness">sheenRoughness</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  935. <div class="description">
  936. <p>TSL object that represents the shader variable <code>SheenRoughness</code>.</p>
  937. </div>
  938. </div>
  939. <div class="member">
  940. <h3 class="name" id="shininess" translate="no">.<a href="#shininess">shininess</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  941. <div class="description">
  942. <p>TSL object that represents the shader variable <code>Shininess</code>.</p>
  943. </div>
  944. </div>
  945. <div class="member">
  946. <h3 class="name" id="specularColor" translate="no">.<a href="#specularColor">specularColor</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;color></span> <span class="type-signature">(constant) </span></h3>
  947. <div class="description">
  948. <p>TSL object that represents the shader variable <code>SpecularColor</code>.</p>
  949. </div>
  950. </div>
  951. <div class="member">
  952. <h3 class="name" id="specularColorBlended" translate="no">.<a href="#specularColorBlended">specularColorBlended</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;color></span> <span class="type-signature">(constant) </span></h3>
  953. <div class="description">
  954. <p>TSL object that represents the shader variable <code>SpecularColorBlended</code>.</p>
  955. </div>
  956. </div>
  957. <div class="member">
  958. <h3 class="name" id="specularF90" translate="no">.<a href="#specularF90">specularF90</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  959. <div class="description">
  960. <p>TSL object that represents the shader variable <code>SpecularF90</code>.</p>
  961. </div>
  962. </div>
  963. <div class="member">
  964. <h3 class="name" id="subgroupIndex" translate="no">.<a href="#subgroupIndex">subgroupIndex</a><span class="type-signature"> : <a href="IndexNode.html">IndexNode</a></span> <span class="type-signature">(constant) </span></h3>
  965. <div class="description">
  966. <p>TSL object that represents the index of the subgroup the current compute invocation belongs to.</p>
  967. </div>
  968. </div>
  969. <div class="member">
  970. <h3 class="name" id="subgroupSize" translate="no">.<a href="#subgroupSize">subgroupSize</a><span class="type-signature"> : <a href="ComputeBuiltinNode.html">ComputeBuiltinNode</a>.&lt;uint></span> <span class="type-signature">(constant) </span></h3>
  971. <div class="description">
  972. <p>A device dependent variable that exposes the size of the current invocation's subgroup.</p>
  973. </div>
  974. </div>
  975. <div class="member">
  976. <h3 class="name" id="tangentGeometry" translate="no">.<a href="#tangentGeometry">tangentGeometry</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> <span class="type-signature">(constant) </span></h3>
  977. <div class="description">
  978. <p>TSL object that represents the tangent attribute of the current rendered object.</p>
  979. </div>
  980. </div>
  981. <div class="member">
  982. <h3 class="name" id="tangentLocal" translate="no">.<a href="#tangentLocal">tangentLocal</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  983. <div class="description">
  984. <p>TSL object that represents the vertex tangent in local space of the current rendered object.</p>
  985. </div>
  986. </div>
  987. <div class="member">
  988. <h3 class="name" id="tangentView" translate="no">.<a href="#tangentView">tangentView</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  989. <div class="description">
  990. <p>TSL object that represents the vertex tangent in view space of the current rendered object.</p>
  991. </div>
  992. </div>
  993. <div class="member">
  994. <h3 class="name" id="tangentViewFrame" translate="no">.<a href="#tangentViewFrame">tangentViewFrame</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  995. <div class="description">
  996. <p>Tangent vector in view space, computed dynamically from geometry and UV derivatives.
  997. Useful for normal mapping without precomputed tangents.</p>
  998. <p>Reference: http://www.thetenthplanet.de/archives/1180</p>
  999. </div>
  1000. </div>
  1001. <div class="member">
  1002. <h3 class="name" id="tangentWorld" translate="no">.<a href="#tangentWorld">tangentWorld</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  1003. <div class="description">
  1004. <p>TSL object that represents the vertex tangent in world space of the current rendered object.</p>
  1005. </div>
  1006. </div>
  1007. <div class="member">
  1008. <h3 class="name" id="thickness" translate="no">.<a href="#thickness">thickness</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  1009. <div class="description">
  1010. <p>TSL object that represents the shader variable <code>Thickness</code>.</p>
  1011. </div>
  1012. </div>
  1013. <div class="member">
  1014. <h3 class="name" id="time" translate="no">.<a href="#time">time</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  1015. <div class="description">
  1016. <p>Represents the elapsed time in seconds.</p>
  1017. </div>
  1018. </div>
  1019. <div class="member">
  1020. <h3 class="name" id="toneMappingExposure" translate="no">.<a href="#toneMappingExposure">toneMappingExposure</a><span class="type-signature"> : <a href="RendererReferenceNode.html">RendererReferenceNode</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  1021. <div class="description">
  1022. <p>TSL object that represents the global tone mapping exposure of the renderer.</p>
  1023. </div>
  1024. </div>
  1025. <div class="member">
  1026. <h3 class="name" id="transformedClearcoatNormalView" translate="no">.<a href="#transformedClearcoatNormalView">transformedClearcoatNormalView</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  1027. <div class="description">
  1028. <p>TSL object that represents the transformed clearcoat vertex normal of the current rendered object in view space.</p>
  1029. </div>
  1030. <dl class="details">
  1031. <dt class="important tag-deprecated"><strong>Deprecated:</strong> since r178. Use `clearcoatNormalView` instead.</dt>
  1032. </dl>
  1033. </div>
  1034. <div class="member">
  1035. <h3 class="name" id="transformedNormalView" translate="no">.<a href="#transformedNormalView">transformedNormalView</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  1036. <div class="description">
  1037. <p>TSL object that represents the transformed vertex normal of the current rendered object in view space.</p>
  1038. </div>
  1039. <dl class="details">
  1040. <dt class="important tag-deprecated"><strong>Deprecated:</strong> since r178. Use `normalView` instead.</dt>
  1041. </dl>
  1042. </div>
  1043. <div class="member">
  1044. <h3 class="name" id="transformedNormalWorld" translate="no">.<a href="#transformedNormalWorld">transformedNormalWorld</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> <span class="type-signature">(constant) </span></h3>
  1045. <div class="description">
  1046. <p>TSL object that represents the transformed vertex normal of the current rendered object in world space.</p>
  1047. </div>
  1048. <dl class="details">
  1049. <dt class="important tag-deprecated"><strong>Deprecated:</strong> since r178. Use `normalWorld` instead.</dt>
  1050. </dl>
  1051. </div>
  1052. <div class="member">
  1053. <h3 class="name" id="transmission" translate="no">.<a href="#transmission">transmission</a><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a>.&lt;float></span> <span class="type-signature">(constant) </span></h3>
  1054. <div class="description">
  1055. <p>TSL object that represents the shader variable <code>Transmission</code>.</p>
  1056. </div>
  1057. </div>
  1058. <div class="member">
  1059. <h3 class="name" id="velocity" translate="no">.<a href="#velocity">velocity</a><span class="type-signature"> : <a href="VelocityNode.html">VelocityNode</a></span> <span class="type-signature">(constant) </span></h3>
  1060. <div class="description">
  1061. <p>TSL object that represents the velocity of a render pass.</p>
  1062. </div>
  1063. </div>
  1064. <div class="member">
  1065. <h3 class="name" id="vertexIndex" translate="no">.<a href="#vertexIndex">vertexIndex</a><span class="type-signature"> : <a href="IndexNode.html">IndexNode</a></span> <span class="type-signature">(constant) </span></h3>
  1066. <div class="description">
  1067. <p>TSL object that represents the index of a vertex within a mesh.</p>
  1068. </div>
  1069. </div>
  1070. <div class="member">
  1071. <h3 class="name" id="viewport" translate="no">.<a href="#viewport">viewport</a><span class="type-signature"> : <a href="ScreenNode.html">ScreenNode</a>.&lt;vec4></span> <span class="type-signature">(constant) </span></h3>
  1072. <div class="description">
  1073. <p>TSL object that represents the viewport rectangle as <code>x</code>, <code>y</code>, <code>width</code> and <code>height</code> in physical pixel units.</p>
  1074. </div>
  1075. </div>
  1076. <div class="member">
  1077. <h3 class="name" id="viewportCoordinate" translate="no">.<a href="#viewportCoordinate">viewportCoordinate</a><span class="type-signature"> : <a href="ScreenNode.html">ScreenNode</a>.&lt;vec2></span> <span class="type-signature">(constant) </span></h3>
  1078. <div class="description">
  1079. <p>TSL object that represents the current <code>x</code>/<code>y</code> pixel position on the viewport in physical pixel units.</p>
  1080. </div>
  1081. </div>
  1082. <div class="member">
  1083. <h3 class="name" id="viewportLinearDepth" translate="no">.<a href="#viewportLinearDepth">viewportLinearDepth</a><span class="type-signature"> : <a href="ViewportDepthNode.html">ViewportDepthNode</a></span> <span class="type-signature">(constant) </span></h3>
  1084. <div class="description">
  1085. <p>TSL object that represents the linear (orthographic) depth value of the current fragment</p>
  1086. </div>
  1087. </div>
  1088. <div class="member">
  1089. <h3 class="name" id="viewportSize" translate="no">.<a href="#viewportSize">viewportSize</a><span class="type-signature"> : <a href="ScreenNode.html">ScreenNode</a>.&lt;vec2></span> <span class="type-signature">(constant) </span></h3>
  1090. <div class="description">
  1091. <p>TSL object that represents the viewport resolution in physical pixel units.</p>
  1092. </div>
  1093. </div>
  1094. <div class="member">
  1095. <h3 class="name" id="viewportUV" translate="no">.<a href="#viewportUV">viewportUV</a><span class="type-signature"> : <a href="ScreenNode.html">ScreenNode</a>.&lt;vec2></span> <span class="type-signature">(constant) </span></h3>
  1096. <div class="description">
  1097. <p>TSL object that represents normalized viewport coordinates, unitless in <code>[0, 1]</code>.</p>
  1098. </div>
  1099. </div>
  1100. <div class="member">
  1101. <h3 class="name" id="workgroupId" translate="no">.<a href="#workgroupId">workgroupId</a><span class="type-signature"> : <a href="ComputeBuiltinNode.html">ComputeBuiltinNode</a>.&lt;uvec3></span> <span class="type-signature">(constant) </span></h3>
  1102. <div class="description">
  1103. <p>Represents the 3-dimensional index of the workgroup the current compute invocation belongs to.</p>
  1104. <pre><code class="language-js">// Execute 12 compute threads with a workgroup size of 3.
  1105. const computeFn = Fn( () => {
  1106. If( workgroupId.x.mod( 2 ).equal( 0 ), () => {
  1107. storageBuffer.element( instanceIndex ).assign( instanceIndex );
  1108. } ).Else( () => {
  1109. storageBuffer.element( instanceIndex ).assign( 0 );
  1110. } );
  1111. } )().compute( 12, [ 3 ] );
  1112. // workgroupId.x = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3];
  1113. // Buffer Output = [0, 1, 2, 0, 0, 0, 6, 7, 8, 0, 0, 0];
  1114. </code></pre>
  1115. </div>
  1116. </div>
  1117. <h2 class="subsection-title">Methods</h2>
  1118. <h3 class="name name-method" id="Break" translate="no">.<a href="#Break">Break</a><span class="signature">()</span><span class="type-signature"> : <a href="ExpressionNode.html">ExpressionNode</a></span> </h3>
  1119. <div class="method">
  1120. <div class="description">
  1121. <p>TSL function for creating a <code>Break()</code> expression.</p>
  1122. </div>
  1123. </div>
  1124. <h3 class="name name-method" id="Const" translate="no">.<a href="#Const">Const</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="VarNode.html">VarNode</a></span> </h3>
  1125. <div class="method">
  1126. <div class="description">
  1127. <p>TSL function for creating a const node.</p>
  1128. </div>
  1129. <table class="params">
  1130. <tbody>
  1131. <tr>
  1132. <td class="name">
  1133. <strong>node</strong>
  1134. </td>
  1135. <td class="description last">
  1136. <p>The node for which a constant should be created.</p>
  1137. </td>
  1138. </tr>
  1139. <tr>
  1140. <td class="name">
  1141. <strong>name</strong>
  1142. </td>
  1143. <td class="description last">
  1144. <p>The name of the constant in the shader.</p>
  1145. </td>
  1146. </tr>
  1147. </tbody>
  1148. </table>
  1149. </div>
  1150. <h3 class="name name-method" id="Continue" translate="no">.<a href="#Continue">Continue</a><span class="signature">()</span><span class="type-signature"> : <a href="ExpressionNode.html">ExpressionNode</a></span> </h3>
  1151. <div class="method">
  1152. <div class="description">
  1153. <p>TSL function for creating a <code>Continue()</code> expression.</p>
  1154. </div>
  1155. </div>
  1156. <h3 class="name name-method" id="Discard" translate="no">.<a href="#Discard">Discard</a><span class="signature">( conditional : <span class="param-type"><a href="ConditionalNode.html">ConditionalNode</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  1157. <div class="method">
  1158. <div class="description">
  1159. <p>Represents a <code>discard</code> shader operation in TSL.</p>
  1160. </div>
  1161. <table class="params">
  1162. <tbody>
  1163. <tr>
  1164. <td class="name">
  1165. <strong>conditional</strong>
  1166. </td>
  1167. <td class="description last">
  1168. <p>An optional conditional node. It allows to decide whether the discard should be executed or not.</p>
  1169. </td>
  1170. </tr>
  1171. </tbody>
  1172. </table>
  1173. <dl class="details">
  1174. <dt class="tag-returns"><strong>Returns:</strong> The <code>discard</code> expression.</dt>
  1175. </dl>
  1176. </div>
  1177. <h3 class="name name-method" id="If" translate="no">.<a href="#If">If</a><span class="signature">( &hellip;params : <span class="param-type"><a href="global.html#any">any</a></span> )</span><span class="type-signature"> : <a href="StackNode.html">StackNode</a></span> </h3>
  1178. <div class="method">
  1179. <div class="description">
  1180. <p>Represent a conditional node using if/else statements.</p>
  1181. <pre><code class="language-js">If( condition, function )
  1182. .ElseIf( condition, function )
  1183. .Else( function )
  1184. </code></pre>
  1185. </div>
  1186. <table class="params">
  1187. <tbody>
  1188. <tr>
  1189. <td class="name">
  1190. <strong>params</strong>
  1191. </td>
  1192. <td class="description last">
  1193. <p>The parameters for the conditional node.</p>
  1194. </td>
  1195. </tr>
  1196. </tbody>
  1197. </table>
  1198. <dl class="details">
  1199. <dt class="tag-returns"><strong>Returns:</strong> The conditional node.</dt>
  1200. </dl>
  1201. </div>
  1202. <h3 class="name name-method" id="Loop" translate="no">.<a href="#Loop">Loop</a><span class="signature">( &hellip;params : <span class="param-type"><a href="global.html#any">any</a></span> )</span><span class="type-signature"> : <a href="LoopNode.html">LoopNode</a></span> </h3>
  1203. <div class="method">
  1204. <div class="description">
  1205. <p>TSL function for creating a loop node.</p>
  1206. </div>
  1207. <table class="params">
  1208. <tbody>
  1209. <tr>
  1210. <td class="name">
  1211. <strong>params</strong>
  1212. </td>
  1213. <td class="description last">
  1214. <p>A list of parameters.</p>
  1215. </td>
  1216. </tr>
  1217. </tbody>
  1218. </table>
  1219. </div>
  1220. <h3 class="name name-method" id="Return" translate="no">.<a href="#Return">Return</a><span class="signature">()</span><span class="type-signature"> : <a href="ExpressionNode.html">ExpressionNode</a></span> </h3>
  1221. <div class="method">
  1222. <div class="description">
  1223. <p>Represents a <code>return</code> shader operation in TSL.</p>
  1224. </div>
  1225. <dl class="details">
  1226. <dt class="tag-returns"><strong>Returns:</strong> The <code>return</code> expression.</dt>
  1227. </dl>
  1228. </div>
  1229. <h3 class="name name-method" id="Switch" translate="no">.<a href="#Switch">Switch</a><span class="signature">( &hellip;params : <span class="param-type"><a href="global.html#any">any</a></span> )</span><span class="type-signature"> : <a href="StackNode.html">StackNode</a></span> </h3>
  1230. <div class="method">
  1231. <div class="description">
  1232. <p>Represent a conditional node using switch/case statements.</p>
  1233. <pre><code class="language-js">Switch( value )
  1234. .Case( 1, function )
  1235. .Case( 2, 3, 4, function )
  1236. .Default( function )
  1237. </code></pre>
  1238. </div>
  1239. <table class="params">
  1240. <tbody>
  1241. <tr>
  1242. <td class="name">
  1243. <strong>params</strong>
  1244. </td>
  1245. <td class="description last">
  1246. <p>The parameters for the conditional node.</p>
  1247. </td>
  1248. </tr>
  1249. </tbody>
  1250. </table>
  1251. <dl class="details">
  1252. <dt class="tag-returns"><strong>Returns:</strong> The conditional node.</dt>
  1253. </dl>
  1254. </div>
  1255. <h3 class="name name-method" id="Var" translate="no">.<a href="#Var">Var</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="VarNode.html">VarNode</a></span> </h3>
  1256. <div class="method">
  1257. <div class="description">
  1258. <p>TSL function for creating a var node.</p>
  1259. </div>
  1260. <table class="params">
  1261. <tbody>
  1262. <tr>
  1263. <td class="name">
  1264. <strong>node</strong>
  1265. </td>
  1266. <td class="description last">
  1267. <p>The node for which a variable should be created.</p>
  1268. </td>
  1269. </tr>
  1270. <tr>
  1271. <td class="name">
  1272. <strong>name</strong>
  1273. </td>
  1274. <td class="description last">
  1275. <p>The name of the variable in the shader.</p>
  1276. </td>
  1277. </tr>
  1278. </tbody>
  1279. </table>
  1280. </div>
  1281. <h3 class="name name-method" id="VarIntent" translate="no">.<a href="#VarIntent">VarIntent</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="VarNode.html">VarNode</a></span> </h3>
  1282. <div class="method">
  1283. <div class="description">
  1284. <p>TSL function for creating a var intent node.</p>
  1285. </div>
  1286. <table class="params">
  1287. <tbody>
  1288. <tr>
  1289. <td class="name">
  1290. <strong>node</strong>
  1291. </td>
  1292. <td class="description last">
  1293. <p>The node for which a variable should be created.</p>
  1294. </td>
  1295. </tr>
  1296. <tr>
  1297. <td class="name">
  1298. <strong>name</strong>
  1299. </td>
  1300. <td class="description last">
  1301. <p>The name of the variable in the shader.</p>
  1302. </td>
  1303. </tr>
  1304. </tbody>
  1305. </table>
  1306. </div>
  1307. <h3 class="name name-method" id="abs" translate="no">.<a href="#abs">abs</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  1308. <div class="method">
  1309. <div class="description">
  1310. <p>Returns the absolute value of the parameter.</p>
  1311. </div>
  1312. <table class="params">
  1313. <tbody>
  1314. <tr>
  1315. <td class="name">
  1316. <strong>x</strong>
  1317. </td>
  1318. <td class="description last">
  1319. <p>The parameter.</p>
  1320. </td>
  1321. </tr>
  1322. </tbody>
  1323. </table>
  1324. </div>
  1325. <h3 class="name name-method" id="acesFilmicToneMapping" translate="no">.<a href="#acesFilmicToneMapping">acesFilmicToneMapping</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, exposure : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  1326. <div class="method">
  1327. <div class="description">
  1328. <p>ACESFilmic tone mapping.</p>
  1329. <p>Reference: <a href="https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs" target="_blank" rel="noopener">https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs</a></p>
  1330. </div>
  1331. <table class="params">
  1332. <tbody>
  1333. <tr>
  1334. <td class="name">
  1335. <strong>color</strong>
  1336. </td>
  1337. <td class="description last">
  1338. <p>The color that should be tone mapped.</p>
  1339. </td>
  1340. </tr>
  1341. <tr>
  1342. <td class="name">
  1343. <strong>exposure</strong>
  1344. </td>
  1345. <td class="description last">
  1346. <p>The exposure.</p>
  1347. </td>
  1348. </tr>
  1349. </tbody>
  1350. </table>
  1351. <dl class="details">
  1352. <dt class="tag-returns"><strong>Returns:</strong> The tone mapped color.</dt>
  1353. </dl>
  1354. </div>
  1355. <h3 class="name name-method" id="acos" translate="no">.<a href="#acos">acos</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  1356. <div class="method">
  1357. <div class="description">
  1358. <p>Returns the arccosine of the parameter.</p>
  1359. </div>
  1360. <table class="params">
  1361. <tbody>
  1362. <tr>
  1363. <td class="name">
  1364. <strong>x</strong>
  1365. </td>
  1366. <td class="description last">
  1367. <p>The parameter.</p>
  1368. </td>
  1369. </tr>
  1370. </tbody>
  1371. </table>
  1372. </div>
  1373. <h3 class="name name-method" id="add" translate="no">.<a href="#add">add</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span>, &hellip;params : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  1374. <div class="method">
  1375. <div class="description">
  1376. <p>Returns the addition of two or more value.</p>
  1377. </div>
  1378. <table class="params">
  1379. <tbody>
  1380. <tr>
  1381. <td class="name">
  1382. <strong>a</strong>
  1383. </td>
  1384. <td class="description last">
  1385. <p>The first input.</p>
  1386. </td>
  1387. </tr>
  1388. <tr>
  1389. <td class="name">
  1390. <strong>b</strong>
  1391. </td>
  1392. <td class="description last">
  1393. <p>The second input.</p>
  1394. </td>
  1395. </tr>
  1396. <tr>
  1397. <td class="name">
  1398. <strong>params</strong>
  1399. </td>
  1400. <td class="description last">
  1401. <p>Additional input parameters.</p>
  1402. </td>
  1403. </tr>
  1404. </tbody>
  1405. </table>
  1406. </div>
  1407. <h3 class="name name-method" id="afterImage" translate="no">.<a href="#afterImage">afterImage</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, damp : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span> )</span><span class="type-signature"> : <a href="AfterImageNode.html">AfterImageNode</a></span> </h3>
  1408. <div class="method">
  1409. <div class="description">
  1410. <p>TSL function for creating an after image node for post processing.</p>
  1411. </div>
  1412. <table class="params">
  1413. <tbody>
  1414. <tr>
  1415. <td class="name">
  1416. <strong>node</strong>
  1417. </td>
  1418. <td class="description last">
  1419. <p>The node that represents the input of the effect.</p>
  1420. </td>
  1421. </tr>
  1422. <tr>
  1423. <td class="name">
  1424. <strong>damp</strong>
  1425. </td>
  1426. <td class="description last">
  1427. <p>The damping intensity. A higher value means a stronger after image effect.</p>
  1428. <p>Default is <code>0.96</code>.</p>
  1429. </td>
  1430. </tr>
  1431. </tbody>
  1432. </table>
  1433. </div>
  1434. <h3 class="name name-method" id="agxToneMapping" translate="no">.<a href="#agxToneMapping">agxToneMapping</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, exposure : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  1435. <div class="method">
  1436. <div class="description">
  1437. <p>AgX tone mapping.</p>
  1438. </div>
  1439. <table class="params">
  1440. <tbody>
  1441. <tr>
  1442. <td class="name">
  1443. <strong>color</strong>
  1444. </td>
  1445. <td class="description last">
  1446. <p>The color that should be tone mapped.</p>
  1447. </td>
  1448. </tr>
  1449. <tr>
  1450. <td class="name">
  1451. <strong>exposure</strong>
  1452. </td>
  1453. <td class="description last">
  1454. <p>The exposure.</p>
  1455. </td>
  1456. </tr>
  1457. </tbody>
  1458. </table>
  1459. <dl class="details">
  1460. <dt class="tag-returns"><strong>Returns:</strong> The tone mapped color.</dt>
  1461. </dl>
  1462. </div>
  1463. <h3 class="name name-method" id="all" translate="no">.<a href="#all">all</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;bool></span> </h3>
  1464. <div class="method">
  1465. <div class="description">
  1466. <p>Returns <code>true</code> if all components of <code>x</code> are <code>true</code>.</p>
  1467. </div>
  1468. <table class="params">
  1469. <tbody>
  1470. <tr>
  1471. <td class="name">
  1472. <strong>x</strong>
  1473. </td>
  1474. <td class="description last">
  1475. <p>The parameter.</p>
  1476. </td>
  1477. </tr>
  1478. </tbody>
  1479. </table>
  1480. </div>
  1481. <h3 class="name name-method" id="anaglyphPass" translate="no">.<a href="#anaglyphPass">anaglyphPass</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span><span class="type-signature"> : <a href="AnaglyphPassNode.html">AnaglyphPassNode</a></span> </h3>
  1482. <div class="method">
  1483. <div class="description">
  1484. <p>TSL function for creating an anaglyph pass node.</p>
  1485. </div>
  1486. <table class="params">
  1487. <tbody>
  1488. <tr>
  1489. <td class="name">
  1490. <strong>scene</strong>
  1491. </td>
  1492. <td class="description last">
  1493. <p>The scene to render.</p>
  1494. </td>
  1495. </tr>
  1496. <tr>
  1497. <td class="name">
  1498. <strong>camera</strong>
  1499. </td>
  1500. <td class="description last">
  1501. <p>The camera to render the scene with.</p>
  1502. </td>
  1503. </tr>
  1504. </tbody>
  1505. </table>
  1506. </div>
  1507. <h3 class="name name-method" id="anamorphic" translate="no">.<a href="#anamorphic">anamorphic</a><span class="signature">( node : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, threshold : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span>, scale : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span>, samples : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnamorphicNode.html">AnamorphicNode</a></span> </h3>
  1508. <div class="method">
  1509. <div class="description">
  1510. <p>TSL function for creating an anamorphic flare effect.</p>
  1511. </div>
  1512. <table class="params">
  1513. <tbody>
  1514. <tr>
  1515. <td class="name">
  1516. <strong>node</strong>
  1517. </td>
  1518. <td class="description last">
  1519. <p>The node that represents the input of the effect.</p>
  1520. </td>
  1521. </tr>
  1522. <tr>
  1523. <td class="name">
  1524. <strong>threshold</strong>
  1525. </td>
  1526. <td class="description last">
  1527. <p>The threshold is one option to control the intensity and size of the effect.</p>
  1528. <p>Default is <code>0.9</code>.</p>
  1529. </td>
  1530. </tr>
  1531. <tr>
  1532. <td class="name">
  1533. <strong>scale</strong>
  1534. </td>
  1535. <td class="description last">
  1536. <p>Defines the vertical scale of the flares.</p>
  1537. <p>Default is <code>3</code>.</p>
  1538. </td>
  1539. </tr>
  1540. <tr>
  1541. <td class="name">
  1542. <strong>samples</strong>
  1543. </td>
  1544. <td class="description last">
  1545. <p>More samples result in larger flares and a more expensive runtime behavior.</p>
  1546. <p>Default is <code>32</code>.</p>
  1547. </td>
  1548. </tr>
  1549. </tbody>
  1550. </table>
  1551. </div>
  1552. <h3 class="name name-method" id="and" translate="no">.<a href="#and">and</a><span class="signature">( &hellip;nodes : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  1553. <div class="method">
  1554. <div class="description">
  1555. <p>Performs a logical AND operation on multiple nodes.</p>
  1556. </div>
  1557. <table class="params">
  1558. <tbody>
  1559. <tr>
  1560. <td class="name">
  1561. <strong>nodes</strong>
  1562. </td>
  1563. <td class="description last">
  1564. <p>The input nodes to be combined using AND.</p>
  1565. </td>
  1566. </tr>
  1567. </tbody>
  1568. </table>
  1569. </div>
  1570. <h3 class="name name-method" id="any" translate="no">.<a href="#any">any</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;bool></span> </h3>
  1571. <div class="method">
  1572. <div class="description">
  1573. <p>Returns <code>true</code> if any components of <code>x</code> are <code>true</code>.</p>
  1574. </div>
  1575. <table class="params">
  1576. <tbody>
  1577. <tr>
  1578. <td class="name">
  1579. <strong>x</strong>
  1580. </td>
  1581. <td class="description last">
  1582. <p>The parameter.</p>
  1583. </td>
  1584. </tr>
  1585. </tbody>
  1586. </table>
  1587. </div>
  1588. <h3 class="name name-method" id="ao" translate="no">.<a href="#ao">ao</a><span class="signature">( depthNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, normalNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span><span class="type-signature"> : <a href="GTAONode.html">GTAONode</a></span> </h3>
  1589. <div class="method">
  1590. <div class="description">
  1591. <p>TSL function for creating a Ground Truth Ambient Occlusion (GTAO) effect.</p>
  1592. </div>
  1593. <table class="params">
  1594. <tbody>
  1595. <tr>
  1596. <td class="name">
  1597. <strong>depthNode</strong>
  1598. </td>
  1599. <td class="description last">
  1600. <p>A node that represents the scene's depth.</p>
  1601. </td>
  1602. </tr>
  1603. <tr>
  1604. <td class="name">
  1605. <strong>normalNode</strong>
  1606. </td>
  1607. <td class="description last">
  1608. <p>A node that represents the scene's normals.</p>
  1609. </td>
  1610. </tr>
  1611. <tr>
  1612. <td class="name">
  1613. <strong>camera</strong>
  1614. </td>
  1615. <td class="description last">
  1616. <p>The camera the scene is rendered with.</p>
  1617. </td>
  1618. </tr>
  1619. </tbody>
  1620. </table>
  1621. </div>
  1622. <h3 class="name name-method" id="append" translate="no">.<a href="#append">append</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : function</span> </h3>
  1623. <div class="method">
  1624. <table class="params">
  1625. <tbody>
  1626. <tr>
  1627. <td class="name">
  1628. <strong>node</strong>
  1629. </td>
  1630. <td class="description last">
  1631. <p>The node to add.</p>
  1632. </td>
  1633. </tr>
  1634. </tbody>
  1635. </table>
  1636. <dl class="details">
  1637. <dt class="important tag-deprecated"><strong>Deprecated:</strong> since r176. Use <a href="global.html#Stack">Stack</a> instead.</dt>
  1638. </dl>
  1639. </div>
  1640. <h3 class="name name-method" id="array" translate="no">.<a href="#array">array</a><span class="signature">( nodeTypeOrValues : <span class="param-type">string | Array.&lt;<a href="Node.html">Node</a>></span>, count : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="ArrayNode.html">ArrayNode</a></span> </h3>
  1641. <div class="method">
  1642. <div class="description">
  1643. <p>TSL function for creating an array node.</p>
  1644. </div>
  1645. <table class="params">
  1646. <tbody>
  1647. <tr>
  1648. <td class="name">
  1649. <strong>nodeTypeOrValues</strong>
  1650. </td>
  1651. <td class="description last">
  1652. <p>A string representing the element type (e.g., 'vec3')
  1653. or an array containing the default values (e.g., [ vec3() ]).</p>
  1654. </td>
  1655. </tr>
  1656. <tr>
  1657. <td class="name">
  1658. <strong>count</strong>
  1659. </td>
  1660. <td class="description last">
  1661. <p>Size of the array.</p>
  1662. </td>
  1663. </tr>
  1664. </tbody>
  1665. </table>
  1666. </div>
  1667. <h3 class="name name-method" id="asin" translate="no">.<a href="#asin">asin</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  1668. <div class="method">
  1669. <div class="description">
  1670. <p>Returns the arcsine of the parameter.</p>
  1671. </div>
  1672. <table class="params">
  1673. <tbody>
  1674. <tr>
  1675. <td class="name">
  1676. <strong>x</strong>
  1677. </td>
  1678. <td class="description last">
  1679. <p>The parameter.</p>
  1680. </td>
  1681. </tr>
  1682. </tbody>
  1683. </table>
  1684. </div>
  1685. <h3 class="name name-method" id="assign" translate="no">.<a href="#assign">assign</a><span class="signature">( targetNode : <span class="param-type"><a href="Node.html">Node</a></span>, sourceNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AssignNode.html">AssignNode</a></span> </h3>
  1686. <div class="method">
  1687. <div class="description">
  1688. <p>TSL function for creating an assign node.</p>
  1689. </div>
  1690. <table class="params">
  1691. <tbody>
  1692. <tr>
  1693. <td class="name">
  1694. <strong>targetNode</strong>
  1695. </td>
  1696. <td class="description last">
  1697. <p>The target node.</p>
  1698. </td>
  1699. </tr>
  1700. <tr>
  1701. <td class="name">
  1702. <strong>sourceNode</strong>
  1703. </td>
  1704. <td class="description last">
  1705. <p>The source type.</p>
  1706. </td>
  1707. </tr>
  1708. </tbody>
  1709. </table>
  1710. </div>
  1711. <h3 class="name name-method" id="atan" translate="no">.<a href="#atan">atan</a><span class="signature">( y : <span class="param-type"><a href="Node.html">Node</a> | number</span>, x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  1712. <div class="method">
  1713. <div class="description">
  1714. <p>Returns the arc-tangent of the parameter.
  1715. If two parameters are provided, the result is <code>atan2(y/x)</code>.</p>
  1716. </div>
  1717. <table class="params">
  1718. <tbody>
  1719. <tr>
  1720. <td class="name">
  1721. <strong>y</strong>
  1722. </td>
  1723. <td class="description last">
  1724. <p>The y parameter.</p>
  1725. </td>
  1726. </tr>
  1727. <tr>
  1728. <td class="name">
  1729. <strong>x</strong>
  1730. </td>
  1731. <td class="description last">
  1732. <p>The x parameter.</p>
  1733. </td>
  1734. </tr>
  1735. </tbody>
  1736. </table>
  1737. </div>
  1738. <h3 class="name name-method" id="atomicAdd" translate="no">.<a href="#atomicAdd">atomicAdd</a><span class="signature">( pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1739. <div class="method">
  1740. <div class="description">
  1741. <p>Increments the value stored in the atomic variable.</p>
  1742. </div>
  1743. <table class="params">
  1744. <tbody>
  1745. <tr>
  1746. <td class="name">
  1747. <strong>pointerNode</strong>
  1748. </td>
  1749. <td class="description last">
  1750. <p>An atomic variable or element of an atomic buffer.</p>
  1751. </td>
  1752. </tr>
  1753. <tr>
  1754. <td class="name">
  1755. <strong>valueNode</strong>
  1756. </td>
  1757. <td class="description last">
  1758. <p>The value that mutates the atomic variable.</p>
  1759. </td>
  1760. </tr>
  1761. </tbody>
  1762. </table>
  1763. </div>
  1764. <h3 class="name name-method" id="atomicAnd" translate="no">.<a href="#atomicAnd">atomicAnd</a><span class="signature">( pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1765. <div class="method">
  1766. <div class="description">
  1767. <p>Stores in an atomic variable the bitwise AND of its value with a parameter.</p>
  1768. </div>
  1769. <table class="params">
  1770. <tbody>
  1771. <tr>
  1772. <td class="name">
  1773. <strong>pointerNode</strong>
  1774. </td>
  1775. <td class="description last">
  1776. <p>An atomic variable or element of an atomic buffer.</p>
  1777. </td>
  1778. </tr>
  1779. <tr>
  1780. <td class="name">
  1781. <strong>valueNode</strong>
  1782. </td>
  1783. <td class="description last">
  1784. <p>The value that mutates the atomic variable.</p>
  1785. </td>
  1786. </tr>
  1787. </tbody>
  1788. </table>
  1789. </div>
  1790. <h3 class="name name-method" id="atomicFunc" translate="no">.<a href="#atomicFunc">atomicFunc</a><span class="signature">( method : <span class="param-type">string</span>, pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1791. <div class="method">
  1792. <div class="description">
  1793. <p>TSL function for appending an atomic function call into the programmatic flow of a compute shader.</p>
  1794. </div>
  1795. <table class="params">
  1796. <tbody>
  1797. <tr>
  1798. <td class="name">
  1799. <strong>method</strong>
  1800. </td>
  1801. <td class="description last">
  1802. <p>The signature of the atomic function to construct.</p>
  1803. </td>
  1804. </tr>
  1805. <tr>
  1806. <td class="name">
  1807. <strong>pointerNode</strong>
  1808. </td>
  1809. <td class="description last">
  1810. <p>An atomic variable or element of an atomic buffer.</p>
  1811. </td>
  1812. </tr>
  1813. <tr>
  1814. <td class="name">
  1815. <strong>valueNode</strong>
  1816. </td>
  1817. <td class="description last">
  1818. <p>The value that mutates the atomic variable.</p>
  1819. </td>
  1820. </tr>
  1821. </tbody>
  1822. </table>
  1823. </div>
  1824. <h3 class="name name-method" id="atomicLoad" translate="no">.<a href="#atomicLoad">atomicLoad</a><span class="signature">( pointerNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1825. <div class="method">
  1826. <div class="description">
  1827. <p>Loads the value stored in the atomic variable.</p>
  1828. </div>
  1829. <table class="params">
  1830. <tbody>
  1831. <tr>
  1832. <td class="name">
  1833. <strong>pointerNode</strong>
  1834. </td>
  1835. <td class="description last">
  1836. <p>An atomic variable or element of an atomic buffer.</p>
  1837. </td>
  1838. </tr>
  1839. </tbody>
  1840. </table>
  1841. </div>
  1842. <h3 class="name name-method" id="atomicMax" translate="no">.<a href="#atomicMax">atomicMax</a><span class="signature">( pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1843. <div class="method">
  1844. <div class="description">
  1845. <p>Stores in an atomic variable the maximum between its current value and a parameter.</p>
  1846. </div>
  1847. <table class="params">
  1848. <tbody>
  1849. <tr>
  1850. <td class="name">
  1851. <strong>pointerNode</strong>
  1852. </td>
  1853. <td class="description last">
  1854. <p>An atomic variable or element of an atomic buffer.</p>
  1855. </td>
  1856. </tr>
  1857. <tr>
  1858. <td class="name">
  1859. <strong>valueNode</strong>
  1860. </td>
  1861. <td class="description last">
  1862. <p>The value that mutates the atomic variable.</p>
  1863. </td>
  1864. </tr>
  1865. </tbody>
  1866. </table>
  1867. </div>
  1868. <h3 class="name name-method" id="atomicMin" translate="no">.<a href="#atomicMin">atomicMin</a><span class="signature">( pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1869. <div class="method">
  1870. <div class="description">
  1871. <p>Stores in an atomic variable the minimum between its current value and a parameter.</p>
  1872. </div>
  1873. <table class="params">
  1874. <tbody>
  1875. <tr>
  1876. <td class="name">
  1877. <strong>pointerNode</strong>
  1878. </td>
  1879. <td class="description last">
  1880. <p>An atomic variable or element of an atomic buffer.</p>
  1881. </td>
  1882. </tr>
  1883. <tr>
  1884. <td class="name">
  1885. <strong>valueNode</strong>
  1886. </td>
  1887. <td class="description last">
  1888. <p>The value that mutates the atomic variable.</p>
  1889. </td>
  1890. </tr>
  1891. </tbody>
  1892. </table>
  1893. </div>
  1894. <h3 class="name name-method" id="atomicNode" translate="no">.<a href="#atomicNode">atomicNode</a><span class="signature">( method : <span class="param-type">string</span>, pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1895. <div class="method">
  1896. <div class="description">
  1897. <p>TSL function for creating an atomic function node.</p>
  1898. </div>
  1899. <table class="params">
  1900. <tbody>
  1901. <tr>
  1902. <td class="name">
  1903. <strong>method</strong>
  1904. </td>
  1905. <td class="description last">
  1906. <p>The signature of the atomic function to construct.</p>
  1907. </td>
  1908. </tr>
  1909. <tr>
  1910. <td class="name">
  1911. <strong>pointerNode</strong>
  1912. </td>
  1913. <td class="description last">
  1914. <p>An atomic variable or element of an atomic buffer.</p>
  1915. </td>
  1916. </tr>
  1917. <tr>
  1918. <td class="name">
  1919. <strong>valueNode</strong>
  1920. </td>
  1921. <td class="description last">
  1922. <p>The value that mutates the atomic variable.</p>
  1923. </td>
  1924. </tr>
  1925. </tbody>
  1926. </table>
  1927. </div>
  1928. <h3 class="name name-method" id="atomicOr" translate="no">.<a href="#atomicOr">atomicOr</a><span class="signature">( pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1929. <div class="method">
  1930. <div class="description">
  1931. <p>Stores in an atomic variable the bitwise OR of its value with a parameter.</p>
  1932. </div>
  1933. <table class="params">
  1934. <tbody>
  1935. <tr>
  1936. <td class="name">
  1937. <strong>pointerNode</strong>
  1938. </td>
  1939. <td class="description last">
  1940. <p>An atomic variable or element of an atomic buffer.</p>
  1941. </td>
  1942. </tr>
  1943. <tr>
  1944. <td class="name">
  1945. <strong>valueNode</strong>
  1946. </td>
  1947. <td class="description last">
  1948. <p>The value that mutates the atomic variable.</p>
  1949. </td>
  1950. </tr>
  1951. </tbody>
  1952. </table>
  1953. </div>
  1954. <h3 class="name name-method" id="atomicStore" translate="no">.<a href="#atomicStore">atomicStore</a><span class="signature">( pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1955. <div class="method">
  1956. <div class="description">
  1957. <p>Stores a value in the atomic variable.</p>
  1958. </div>
  1959. <table class="params">
  1960. <tbody>
  1961. <tr>
  1962. <td class="name">
  1963. <strong>pointerNode</strong>
  1964. </td>
  1965. <td class="description last">
  1966. <p>An atomic variable or element of an atomic buffer.</p>
  1967. </td>
  1968. </tr>
  1969. <tr>
  1970. <td class="name">
  1971. <strong>valueNode</strong>
  1972. </td>
  1973. <td class="description last">
  1974. <p>The value that mutates the atomic variable.</p>
  1975. </td>
  1976. </tr>
  1977. </tbody>
  1978. </table>
  1979. </div>
  1980. <h3 class="name name-method" id="atomicSub" translate="no">.<a href="#atomicSub">atomicSub</a><span class="signature">( pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  1981. <div class="method">
  1982. <div class="description">
  1983. <p>Decrements the value stored in the atomic variable.</p>
  1984. </div>
  1985. <table class="params">
  1986. <tbody>
  1987. <tr>
  1988. <td class="name">
  1989. <strong>pointerNode</strong>
  1990. </td>
  1991. <td class="description last">
  1992. <p>An atomic variable or element of an atomic buffer.</p>
  1993. </td>
  1994. </tr>
  1995. <tr>
  1996. <td class="name">
  1997. <strong>valueNode</strong>
  1998. </td>
  1999. <td class="description last">
  2000. <p>The value that mutates the atomic variable.</p>
  2001. </td>
  2002. </tr>
  2003. </tbody>
  2004. </table>
  2005. </div>
  2006. <h3 class="name name-method" id="atomicXor" translate="no">.<a href="#atomicXor">atomicXor</a><span class="signature">( pointerNode : <span class="param-type"><a href="Node.html">Node</a></span>, valueNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  2007. <div class="method">
  2008. <div class="description">
  2009. <p>Stores in an atomic variable the bitwise XOR of its value with a parameter.</p>
  2010. </div>
  2011. <table class="params">
  2012. <tbody>
  2013. <tr>
  2014. <td class="name">
  2015. <strong>pointerNode</strong>
  2016. </td>
  2017. <td class="description last">
  2018. <p>An atomic variable or element of an atomic buffer.</p>
  2019. </td>
  2020. </tr>
  2021. <tr>
  2022. <td class="name">
  2023. <strong>valueNode</strong>
  2024. </td>
  2025. <td class="description last">
  2026. <p>The value that mutates the atomic variable.</p>
  2027. </td>
  2028. </tr>
  2029. </tbody>
  2030. </table>
  2031. </div>
  2032. <h3 class="name name-method" id="attribute" translate="no">.<a href="#attribute">attribute</a><span class="signature">( name : <span class="param-type">string</span>, nodeType : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="AttributeNode.html">AttributeNode</a></span> </h3>
  2033. <div class="method">
  2034. <div class="description">
  2035. <p>TSL function for creating an attribute node.</p>
  2036. </div>
  2037. <table class="params">
  2038. <tbody>
  2039. <tr>
  2040. <td class="name">
  2041. <strong>name</strong>
  2042. </td>
  2043. <td class="description last">
  2044. <p>The name of the attribute.</p>
  2045. </td>
  2046. </tr>
  2047. <tr>
  2048. <td class="name">
  2049. <strong>nodeType</strong>
  2050. </td>
  2051. <td class="description last">
  2052. <p>The node type.</p>
  2053. <p>Default is <code>null</code>.</p>
  2054. </td>
  2055. </tr>
  2056. </tbody>
  2057. </table>
  2058. </div>
  2059. <h3 class="name name-method" id="attributeArray" translate="no">.<a href="#attributeArray">attributeArray</a><span class="signature">( count : <span class="param-type">number | TypedArray</span>, type : <span class="param-type">string | Struct</span> )</span><span class="type-signature"> : <a href="StorageBufferNode.html">StorageBufferNode</a></span> </h3>
  2060. <div class="method">
  2061. <div class="description">
  2062. <p>TSL function for creating a storage buffer node with a configured <code>StorageBufferAttribute</code>.</p>
  2063. </div>
  2064. <table class="params">
  2065. <tbody>
  2066. <tr>
  2067. <td class="name">
  2068. <strong>count</strong>
  2069. </td>
  2070. <td class="description last">
  2071. <p>The data count. It is also valid to pass a typed array as an argument.</p>
  2072. </td>
  2073. </tr>
  2074. <tr>
  2075. <td class="name">
  2076. <strong>type</strong>
  2077. </td>
  2078. <td class="description last">
  2079. <p>The data type.</p>
  2080. <p>Default is <code>'float'</code>.</p>
  2081. </td>
  2082. </tr>
  2083. </tbody>
  2084. </table>
  2085. </div>
  2086. <h3 class="name name-method" id="barrier" translate="no">.<a href="#barrier">barrier</a><span class="signature">( scope : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="BarrierNode.html">BarrierNode</a></span> </h3>
  2087. <div class="method">
  2088. <div class="description">
  2089. <p>TSL function for creating a barrier node.</p>
  2090. </div>
  2091. <table class="params">
  2092. <tbody>
  2093. <tr>
  2094. <td class="name">
  2095. <strong>scope</strong>
  2096. </td>
  2097. <td class="description last">
  2098. <p>The scope defines the behavior of the node..</p>
  2099. </td>
  2100. </tr>
  2101. </tbody>
  2102. </table>
  2103. </div>
  2104. <h3 class="name name-method" id="batch" translate="no">.<a href="#batch">batch</a><span class="signature">( batchMesh : <span class="param-type"><a href="BatchedMesh.html">BatchedMesh</a></span> )</span><span class="type-signature"> : <a href="BatchNode.html">BatchNode</a></span> </h3>
  2105. <div class="method">
  2106. <div class="description">
  2107. <p>TSL function for creating a batch node.</p>
  2108. </div>
  2109. <table class="params">
  2110. <tbody>
  2111. <tr>
  2112. <td class="name">
  2113. <strong>batchMesh</strong>
  2114. </td>
  2115. <td class="description last">
  2116. <p>A reference to batched mesh.</p>
  2117. </td>
  2118. </tr>
  2119. </tbody>
  2120. </table>
  2121. </div>
  2122. <h3 class="name name-method" id="bentNormalView" translate="no">.<a href="#bentNormalView">bentNormalView</a><span class="signature">()</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  2123. <div class="method">
  2124. <div class="description">
  2125. <p>TSL function for computing bent normals.</p>
  2126. </div>
  2127. <dl class="details">
  2128. <dt class="tag-returns"><strong>Returns:</strong> Bent normals.</dt>
  2129. </dl>
  2130. </div>
  2131. <h3 class="name name-method" id="billboarding" translate="no">.<a href="#billboarding">billboarding</a><span class="signature">( config : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  2132. <div class="method">
  2133. <div class="description">
  2134. <p>This can be used to achieve a billboarding behavior for flat meshes. That means they are
  2135. oriented always towards the camera.</p>
  2136. <pre><code class="language-js">material.vertexNode = billboarding();
  2137. </code></pre>
  2138. </div>
  2139. <table class="params">
  2140. <tbody>
  2141. <tr>
  2142. <td class="name">
  2143. <strong>config</strong>
  2144. </td>
  2145. <td class="description last">
  2146. <p>The configuration object.</p>
  2147. <table class="params">
  2148. <tbody>
  2149. <tr>
  2150. <td class="name">
  2151. <strong>position</strong>
  2152. </td>
  2153. <td class="description last">
  2154. <p>Can be used to define the vertex positions in world space.</p>
  2155. <p>Default is <code>null</code>.</p>
  2156. </td>
  2157. </tr>
  2158. <tr>
  2159. <td class="name">
  2160. <strong>horizontal</strong>
  2161. </td>
  2162. <td class="description last">
  2163. <p>Whether to follow the camera rotation horizontally or not.</p>
  2164. <p>Default is <code>true</code>.</p>
  2165. </td>
  2166. </tr>
  2167. <tr>
  2168. <td class="name">
  2169. <strong>vertical</strong>
  2170. </td>
  2171. <td class="description last">
  2172. <p>Whether to follow the camera rotation vertically or not.</p>
  2173. <p>Default is <code>false</code>.</p>
  2174. </td>
  2175. </tr>
  2176. </tbody>
  2177. </table>
  2178. </td>
  2179. </tr>
  2180. </tbody>
  2181. </table>
  2182. <dl class="details">
  2183. <dt class="tag-returns"><strong>Returns:</strong> The updated vertex position in clip space.</dt>
  2184. </dl>
  2185. </div>
  2186. <h3 class="name name-method" id="bitAnd" translate="no">.<a href="#bitAnd">bitAnd</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  2187. <div class="method">
  2188. <div class="description">
  2189. <p>Performs bitwise AND on two nodes.</p>
  2190. </div>
  2191. <table class="params">
  2192. <tbody>
  2193. <tr>
  2194. <td class="name">
  2195. <strong>a</strong>
  2196. </td>
  2197. <td class="description last">
  2198. <p>The first input.</p>
  2199. </td>
  2200. </tr>
  2201. <tr>
  2202. <td class="name">
  2203. <strong>b</strong>
  2204. </td>
  2205. <td class="description last">
  2206. <p>The second input.</p>
  2207. </td>
  2208. </tr>
  2209. </tbody>
  2210. </table>
  2211. </div>
  2212. <h3 class="name name-method" id="bitNot" translate="no">.<a href="#bitNot">bitNot</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  2213. <div class="method">
  2214. <div class="description">
  2215. <p>Performs bitwise NOT on a node.</p>
  2216. </div>
  2217. <table class="params">
  2218. <tbody>
  2219. <tr>
  2220. <td class="name">
  2221. <strong>a</strong>
  2222. </td>
  2223. <td class="description last">
  2224. <p>The first input.</p>
  2225. </td>
  2226. </tr>
  2227. <tr>
  2228. <td class="name">
  2229. <strong>b</strong>
  2230. </td>
  2231. <td class="description last">
  2232. <p>The second input.</p>
  2233. </td>
  2234. </tr>
  2235. </tbody>
  2236. </table>
  2237. </div>
  2238. <h3 class="name name-method" id="bitOr" translate="no">.<a href="#bitOr">bitOr</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  2239. <div class="method">
  2240. <div class="description">
  2241. <p>Performs bitwise OR on two nodes.</p>
  2242. </div>
  2243. <table class="params">
  2244. <tbody>
  2245. <tr>
  2246. <td class="name">
  2247. <strong>a</strong>
  2248. </td>
  2249. <td class="description last">
  2250. <p>The first input.</p>
  2251. </td>
  2252. </tr>
  2253. <tr>
  2254. <td class="name">
  2255. <strong>b</strong>
  2256. </td>
  2257. <td class="description last">
  2258. <p>The second input.</p>
  2259. </td>
  2260. </tr>
  2261. </tbody>
  2262. </table>
  2263. </div>
  2264. <h3 class="name name-method" id="bitXor" translate="no">.<a href="#bitXor">bitXor</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  2265. <div class="method">
  2266. <div class="description">
  2267. <p>Performs bitwise XOR on two nodes.</p>
  2268. </div>
  2269. <table class="params">
  2270. <tbody>
  2271. <tr>
  2272. <td class="name">
  2273. <strong>a</strong>
  2274. </td>
  2275. <td class="description last">
  2276. <p>The first input.</p>
  2277. </td>
  2278. </tr>
  2279. <tr>
  2280. <td class="name">
  2281. <strong>b</strong>
  2282. </td>
  2283. <td class="description last">
  2284. <p>The second input.</p>
  2285. </td>
  2286. </tr>
  2287. </tbody>
  2288. </table>
  2289. </div>
  2290. <h3 class="name name-method" id="bitcast" translate="no">.<a href="#bitcast">bitcast</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span>, y : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  2291. <div class="method">
  2292. <div class="description">
  2293. <p>Reinterpret the bit representation of a value in one type as a value in another type.</p>
  2294. </div>
  2295. <table class="params">
  2296. <tbody>
  2297. <tr>
  2298. <td class="name">
  2299. <strong>x</strong>
  2300. </td>
  2301. <td class="description last">
  2302. <p>The parameter.</p>
  2303. </td>
  2304. </tr>
  2305. <tr>
  2306. <td class="name">
  2307. <strong>y</strong>
  2308. </td>
  2309. <td class="description last">
  2310. <p>The new type.</p>
  2311. </td>
  2312. </tr>
  2313. </tbody>
  2314. </table>
  2315. </div>
  2316. <h3 class="name name-method" id="bleach" translate="no">.<a href="#bleach">bleach</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, opacity : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  2317. <div class="method">
  2318. <div class="description">
  2319. <p>Applies a bleach bypass effect to the given color node.</p>
  2320. </div>
  2321. <table class="params">
  2322. <tbody>
  2323. <tr>
  2324. <td class="name">
  2325. <strong>color</strong>
  2326. </td>
  2327. <td class="description last">
  2328. <p>The color node to apply the sepia for.</p>
  2329. </td>
  2330. </tr>
  2331. <tr>
  2332. <td class="name">
  2333. <strong>opacity</strong>
  2334. </td>
  2335. <td class="description last">
  2336. <p>Influences how strong the effect is blended with the original color.</p>
  2337. <p>Default is <code>1</code>.</p>
  2338. </td>
  2339. </tr>
  2340. </tbody>
  2341. </table>
  2342. <dl class="details">
  2343. <dt class="tag-returns"><strong>Returns:</strong> The updated color node.</dt>
  2344. </dl>
  2345. </div>
  2346. <h3 class="name name-method" id="blendBurn" translate="no">.<a href="#blendBurn">blendBurn</a><span class="signature">( base : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, blend : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  2347. <div class="method">
  2348. <div class="description">
  2349. <p>Represents a &quot;Color Burn&quot; blend mode.</p>
  2350. <p>It's designed to darken the base layer's colors based on the color of the blend layer.
  2351. It significantly increases the contrast of the base layer, making the colors more vibrant and saturated.
  2352. The darker the color in the blend layer, the stronger the darkening and contrast effect on the base layer.</p>
  2353. </div>
  2354. <table class="params">
  2355. <tbody>
  2356. <tr>
  2357. <td class="name">
  2358. <strong>base</strong>
  2359. </td>
  2360. <td class="description last">
  2361. <p>The base color.</p>
  2362. </td>
  2363. </tr>
  2364. <tr>
  2365. <td class="name">
  2366. <strong>blend</strong>
  2367. </td>
  2368. <td class="description last">
  2369. <p>The blend color. A white (#ffffff) blend color does not alter the base color.</p>
  2370. </td>
  2371. </tr>
  2372. </tbody>
  2373. </table>
  2374. <dl class="details">
  2375. <dt class="tag-returns"><strong>Returns:</strong> The result.</dt>
  2376. </dl>
  2377. </div>
  2378. <h3 class="name name-method" id="blendColor" translate="no">.<a href="#blendColor">blendColor</a><span class="signature">( base : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, blend : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  2379. <div class="method">
  2380. <div class="description">
  2381. <p>This function blends two color based on their alpha values by replicating the behavior of <code>THREE.NormalBlending</code>.
  2382. It assumes both input colors have non-premultiplied alpha.</p>
  2383. </div>
  2384. <table class="params">
  2385. <tbody>
  2386. <tr>
  2387. <td class="name">
  2388. <strong>base</strong>
  2389. </td>
  2390. <td class="description last">
  2391. <p>The base color.</p>
  2392. </td>
  2393. </tr>
  2394. <tr>
  2395. <td class="name">
  2396. <strong>blend</strong>
  2397. </td>
  2398. <td class="description last">
  2399. <p>The blend color</p>
  2400. </td>
  2401. </tr>
  2402. </tbody>
  2403. </table>
  2404. <dl class="details">
  2405. <dt class="tag-returns"><strong>Returns:</strong> The result.</dt>
  2406. </dl>
  2407. </div>
  2408. <h3 class="name name-method" id="blendDodge" translate="no">.<a href="#blendDodge">blendDodge</a><span class="signature">( base : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, blend : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  2409. <div class="method">
  2410. <div class="description">
  2411. <p>Represents a &quot;Color Dodge&quot; blend mode.</p>
  2412. <p>It's designed to lighten the base layer's colors based on the color of the blend layer.
  2413. It significantly increases the brightness of the base layer, making the colors lighter and more vibrant.
  2414. The brighter the color in the blend layer, the stronger the lightening and contrast effect on the base layer.</p>
  2415. </div>
  2416. <table class="params">
  2417. <tbody>
  2418. <tr>
  2419. <td class="name">
  2420. <strong>base</strong>
  2421. </td>
  2422. <td class="description last">
  2423. <p>The base color.</p>
  2424. </td>
  2425. </tr>
  2426. <tr>
  2427. <td class="name">
  2428. <strong>blend</strong>
  2429. </td>
  2430. <td class="description last">
  2431. <p>The blend color. A black (#000000) blend color does not alter the base color.</p>
  2432. </td>
  2433. </tr>
  2434. </tbody>
  2435. </table>
  2436. <dl class="details">
  2437. <dt class="tag-returns"><strong>Returns:</strong> The result.</dt>
  2438. </dl>
  2439. </div>
  2440. <h3 class="name name-method" id="blendOverlay" translate="no">.<a href="#blendOverlay">blendOverlay</a><span class="signature">( base : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, blend : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  2441. <div class="method">
  2442. <div class="description">
  2443. <p>Represents a &quot;Overlay&quot; blend mode.</p>
  2444. <p>It's designed to increase the contrast of the base layer based on the color of the blend layer.
  2445. It amplifies the existing colors and contrast in the base layer, making lighter areas lighter and darker areas darker.
  2446. The color of the blend layer significantly influences the resulting contrast and color shift in the base layer.</p>
  2447. </div>
  2448. <table class="params">
  2449. <tbody>
  2450. <tr>
  2451. <td class="name">
  2452. <strong>base</strong>
  2453. </td>
  2454. <td class="description last">
  2455. <p>The base color.</p>
  2456. </td>
  2457. </tr>
  2458. <tr>
  2459. <td class="name">
  2460. <strong>blend</strong>
  2461. </td>
  2462. <td class="description last">
  2463. <p>The blend color</p>
  2464. </td>
  2465. </tr>
  2466. </tbody>
  2467. </table>
  2468. <dl class="details">
  2469. <dt class="tag-returns"><strong>Returns:</strong> The result.</dt>
  2470. </dl>
  2471. </div>
  2472. <h3 class="name name-method" id="blendScreen" translate="no">.<a href="#blendScreen">blendScreen</a><span class="signature">( base : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, blend : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  2473. <div class="method">
  2474. <div class="description">
  2475. <p>Represents a &quot;Screen&quot; blend mode.</p>
  2476. <p>Similar to <code>blendDodge()</code>, this mode also lightens the base layer's colors based on the color of the blend layer.
  2477. The &quot;Screen&quot; blend mode is better for general brightening whereas the &quot;Dodge&quot; results in more subtle and nuanced
  2478. effects.</p>
  2479. </div>
  2480. <table class="params">
  2481. <tbody>
  2482. <tr>
  2483. <td class="name">
  2484. <strong>base</strong>
  2485. </td>
  2486. <td class="description last">
  2487. <p>The base color.</p>
  2488. </td>
  2489. </tr>
  2490. <tr>
  2491. <td class="name">
  2492. <strong>blend</strong>
  2493. </td>
  2494. <td class="description last">
  2495. <p>The blend color. A black (#000000) blend color does not alter the base color.</p>
  2496. </td>
  2497. </tr>
  2498. </tbody>
  2499. </table>
  2500. <dl class="details">
  2501. <dt class="tag-returns"><strong>Returns:</strong> The result.</dt>
  2502. </dl>
  2503. </div>
  2504. <h3 class="name name-method" id="bloom" translate="no">.<a href="#bloom">bloom</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, strength : <span class="param-type">number</span>, radius : <span class="param-type">number</span>, threshold : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="BloomNode.html">BloomNode</a></span> </h3>
  2505. <div class="method">
  2506. <div class="description">
  2507. <p>TSL function for creating a bloom effect.</p>
  2508. </div>
  2509. <table class="params">
  2510. <tbody>
  2511. <tr>
  2512. <td class="name">
  2513. <strong>node</strong>
  2514. </td>
  2515. <td class="description last">
  2516. <p>The node that represents the input of the effect.</p>
  2517. </td>
  2518. </tr>
  2519. <tr>
  2520. <td class="name">
  2521. <strong>strength</strong>
  2522. </td>
  2523. <td class="description last">
  2524. <p>The strength of the bloom.</p>
  2525. <p>Default is <code>1</code>.</p>
  2526. </td>
  2527. </tr>
  2528. <tr>
  2529. <td class="name">
  2530. <strong>radius</strong>
  2531. </td>
  2532. <td class="description last">
  2533. <p>The radius of the bloom.</p>
  2534. <p>Default is <code>0</code>.</p>
  2535. </td>
  2536. </tr>
  2537. <tr>
  2538. <td class="name">
  2539. <strong>threshold</strong>
  2540. </td>
  2541. <td class="description last">
  2542. <p>The luminance threshold limits which bright areas contribute to the bloom effect.</p>
  2543. <p>Default is <code>0</code>.</p>
  2544. </td>
  2545. </tr>
  2546. </tbody>
  2547. </table>
  2548. </div>
  2549. <h3 class="name name-method" id="boxBlur" translate="no">.<a href="#boxBlur">boxBlur</a><span class="signature">( textureNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, options : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  2550. <div class="method">
  2551. <div class="description">
  2552. <p>Applies a box blur effect to the given texture node.</p>
  2553. <p>Compared to Gaussian blur, box blur produces a more blocky result but with better performance when correctly
  2554. configured. It is intended for mobile devices or performance restricted use cases where Gaussian is too heavy.</p>
  2555. <p>The (kernel) <code>size</code> parameter should be small (1, 2 or 3) since it determines the number of samples based on (size * 2 + 1)^2.
  2556. This implementation uses a single pass approach so the kernel is not applied as a separable filter. That means larger
  2557. kernels won't perform well. Use Gaussian instead if you need a more high-quality blur.</p>
  2558. <p>To produce wider blurs, increase the <code>separation</code> parameter instead which has no influence on the performance.</p>
  2559. <p>Reference: <a href="https://github.com/lettier/3d-game-shaders-for-beginners/blob/master/demonstration/shaders/fragment/box-blur.frag" target="_blank" rel="noopener">https://github.com/lettier/3d-game-shaders-for-beginners/blob/master/demonstration/shaders/fragment/box-blur.frag</a>.</p>
  2560. </div>
  2561. <table class="params">
  2562. <tbody>
  2563. <tr>
  2564. <td class="name">
  2565. <strong>textureNode</strong>
  2566. </td>
  2567. <td class="description last">
  2568. <p>The texture node that should be blurred.</p>
  2569. </td>
  2570. </tr>
  2571. <tr>
  2572. <td class="name">
  2573. <strong>options</strong>
  2574. </td>
  2575. <td class="description last">
  2576. <p>Additional options for the hash blur effect.</p>
  2577. <p>Default is <code>{}</code>.</p>
  2578. <table class="params">
  2579. <tbody>
  2580. <tr>
  2581. <td class="name">
  2582. <strong>size</strong>
  2583. </td>
  2584. <td class="description last">
  2585. <p>Controls the blur's kernel. For performant results, the range should within [1, 3].</p>
  2586. <p>Default is <code>int(1)</code>.</p>
  2587. </td>
  2588. </tr>
  2589. <tr>
  2590. <td class="name">
  2591. <strong>separation</strong>
  2592. </td>
  2593. <td class="description last">
  2594. <p>Spreads out the blur without having to sample additional fragments. Ranges from [1, Infinity].</p>
  2595. <p>Default is <code>int(1)</code>.</p>
  2596. </td>
  2597. </tr>
  2598. <tr>
  2599. <td class="name">
  2600. <strong>premultipliedAlpha</strong>
  2601. </td>
  2602. <td class="description last">
  2603. <p>Whether to use premultiplied alpha for the blur effect.</p>
  2604. <p>Default is <code>false</code>.</p>
  2605. </td>
  2606. </tr>
  2607. </tbody>
  2608. </table>
  2609. </td>
  2610. </tr>
  2611. </tbody>
  2612. </table>
  2613. <dl class="details">
  2614. <dt class="tag-returns"><strong>Returns:</strong> The blurred texture node.</dt>
  2615. </dl>
  2616. </div>
  2617. <h3 class="name name-method" id="buffer" translate="no">.<a href="#buffer">buffer</a><span class="signature">( value : <span class="param-type">Array.&lt;number></span>, type : <span class="param-type">string</span>, count : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="BufferNode.html">BufferNode</a></span> </h3>
  2618. <div class="method">
  2619. <div class="description">
  2620. <p>TSL function for creating a buffer node.</p>
  2621. </div>
  2622. <table class="params">
  2623. <tbody>
  2624. <tr>
  2625. <td class="name">
  2626. <strong>value</strong>
  2627. </td>
  2628. <td class="description last">
  2629. <p>Array-like buffer data.</p>
  2630. </td>
  2631. </tr>
  2632. <tr>
  2633. <td class="name">
  2634. <strong>type</strong>
  2635. </td>
  2636. <td class="description last">
  2637. <p>The data type of a buffer element.</p>
  2638. </td>
  2639. </tr>
  2640. <tr>
  2641. <td class="name">
  2642. <strong>count</strong>
  2643. </td>
  2644. <td class="description last">
  2645. <p>The count of buffer elements.</p>
  2646. </td>
  2647. </tr>
  2648. </tbody>
  2649. </table>
  2650. </div>
  2651. <h3 class="name name-method" id="bufferAttribute" translate="no">.<a href="#bufferAttribute">bufferAttribute</a><span class="signature">( array : <span class="param-type"><a href="BufferAttribute.html">BufferAttribute</a> | <a href="InterleavedBuffer.html">InterleavedBuffer</a> | TypedArray</span>, type : <span class="param-type">string</span>, stride : <span class="param-type">number</span>, offset : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="BufferAttributeNode.html">BufferAttributeNode</a> | <a href="Node.html">Node</a></span> </h3>
  2652. <div class="method">
  2653. <div class="description">
  2654. <p>TSL function for creating a buffer attribute node.</p>
  2655. </div>
  2656. <table class="params">
  2657. <tbody>
  2658. <tr>
  2659. <td class="name">
  2660. <strong>array</strong>
  2661. </td>
  2662. <td class="description last">
  2663. <p>The attribute data.</p>
  2664. </td>
  2665. </tr>
  2666. <tr>
  2667. <td class="name">
  2668. <strong>type</strong>
  2669. </td>
  2670. <td class="description last">
  2671. <p>The buffer type (e.g. <code>'vec3'</code>).</p>
  2672. <p>Default is <code>null</code>.</p>
  2673. </td>
  2674. </tr>
  2675. <tr>
  2676. <td class="name">
  2677. <strong>stride</strong>
  2678. </td>
  2679. <td class="description last">
  2680. <p>The buffer stride.</p>
  2681. <p>Default is <code>0</code>.</p>
  2682. </td>
  2683. </tr>
  2684. <tr>
  2685. <td class="name">
  2686. <strong>offset</strong>
  2687. </td>
  2688. <td class="description last">
  2689. <p>The buffer offset.</p>
  2690. <p>Default is <code>0</code>.</p>
  2691. </td>
  2692. </tr>
  2693. </tbody>
  2694. </table>
  2695. </div>
  2696. <h3 class="name name-method" id="builtin" translate="no">.<a href="#builtin">builtin</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="BuiltinNode.html">BuiltinNode</a></span> </h3>
  2697. <div class="method">
  2698. <div class="description">
  2699. <p>TSL function for creating a builtin node.</p>
  2700. </div>
  2701. <table class="params">
  2702. <tbody>
  2703. <tr>
  2704. <td class="name">
  2705. <strong>name</strong>
  2706. </td>
  2707. <td class="description last">
  2708. <p>The name of the built-in shader variable.</p>
  2709. </td>
  2710. </tr>
  2711. </tbody>
  2712. </table>
  2713. </div>
  2714. <h3 class="name name-method" id="builtinAOContext" translate="no">.<a href="#builtinAOContext">builtinAOContext</a><span class="signature">( aoNode : <span class="param-type"><a href="Node.html">Node</a></span>, node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="ContextNode.html">ContextNode</a></span> </h3>
  2715. <div class="method">
  2716. <div class="description">
  2717. <p>TSL function for defining a built-in ambient occlusion context for a given node.</p>
  2718. </div>
  2719. <table class="params">
  2720. <tbody>
  2721. <tr>
  2722. <td class="name">
  2723. <strong>aoNode</strong>
  2724. </td>
  2725. <td class="description last">
  2726. <p>The ambient occlusion value node to apply.</p>
  2727. </td>
  2728. </tr>
  2729. <tr>
  2730. <td class="name">
  2731. <strong>node</strong>
  2732. </td>
  2733. <td class="description last">
  2734. <p>The node whose context should be modified.</p>
  2735. <p>Default is <code>null</code>.</p>
  2736. </td>
  2737. </tr>
  2738. </tbody>
  2739. </table>
  2740. </div>
  2741. <h3 class="name name-method" id="builtinShadowContext" translate="no">.<a href="#builtinShadowContext">builtinShadowContext</a><span class="signature">( shadowNode : <span class="param-type"><a href="ShadowNode.html">ShadowNode</a></span>, light : <span class="param-type"><a href="Light.html">Light</a></span>, node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="ContextNode.html">ContextNode</a></span> </h3>
  2742. <div class="method">
  2743. <div class="description">
  2744. <p>TSL function for defining a built-in shadow context for a given node.</p>
  2745. </div>
  2746. <table class="params">
  2747. <tbody>
  2748. <tr>
  2749. <td class="name">
  2750. <strong>shadowNode</strong>
  2751. </td>
  2752. <td class="description last">
  2753. <p>The shadow node representing the light's shadow.</p>
  2754. </td>
  2755. </tr>
  2756. <tr>
  2757. <td class="name">
  2758. <strong>light</strong>
  2759. </td>
  2760. <td class="description last">
  2761. <p>The light associated with the shadow.</p>
  2762. </td>
  2763. </tr>
  2764. <tr>
  2765. <td class="name">
  2766. <strong>node</strong>
  2767. </td>
  2768. <td class="description last">
  2769. <p>The node whose context should be modified.</p>
  2770. <p>Default is <code>null</code>.</p>
  2771. </td>
  2772. </tr>
  2773. </tbody>
  2774. </table>
  2775. </div>
  2776. <h3 class="name name-method" id="bumpMap" translate="no">.<a href="#bumpMap">bumpMap</a><span class="signature">( textureNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, scaleNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="BumpMapNode.html">BumpMapNode</a></span> </h3>
  2777. <div class="method">
  2778. <div class="description">
  2779. <p>TSL function for creating a bump map node.</p>
  2780. </div>
  2781. <table class="params">
  2782. <tbody>
  2783. <tr>
  2784. <td class="name">
  2785. <strong>textureNode</strong>
  2786. </td>
  2787. <td class="description last">
  2788. <p>Represents the bump map data.</p>
  2789. </td>
  2790. </tr>
  2791. <tr>
  2792. <td class="name">
  2793. <strong>scaleNode</strong>
  2794. </td>
  2795. <td class="description last">
  2796. <p>Controls the intensity of the bump effect.</p>
  2797. <p>Default is <code>null</code>.</p>
  2798. </td>
  2799. </tr>
  2800. </tbody>
  2801. </table>
  2802. </div>
  2803. <h3 class="name name-method" id="bypass" translate="no">.<a href="#bypass">bypass</a><span class="signature">( outputNode : <span class="param-type"><a href="Node.html">Node</a></span>, callNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="BypassNode.html">BypassNode</a></span> </h3>
  2804. <div class="method">
  2805. <div class="description">
  2806. <p>TSL function for creating a bypass node.</p>
  2807. </div>
  2808. <table class="params">
  2809. <tbody>
  2810. <tr>
  2811. <td class="name">
  2812. <strong>outputNode</strong>
  2813. </td>
  2814. <td class="description last">
  2815. <p>The output node.</p>
  2816. </td>
  2817. </tr>
  2818. <tr>
  2819. <td class="name">
  2820. <strong>callNode</strong>
  2821. </td>
  2822. <td class="description last">
  2823. <p>The call node.</p>
  2824. </td>
  2825. </tr>
  2826. </tbody>
  2827. </table>
  2828. </div>
  2829. <h3 class="name name-method" id="cache" translate="no">.<a href="#cache">cache</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, parent : <span class="param-type">boolean</span> )</span><span class="type-signature"> : <a href="IsolateNode.html">IsolateNode</a></span> </h3>
  2830. <div class="method">
  2831. <div class="description">
  2832. <p>TSL function for creating a cache node.</p>
  2833. </div>
  2834. <table class="params">
  2835. <tbody>
  2836. <tr>
  2837. <td class="name">
  2838. <strong>node</strong>
  2839. </td>
  2840. <td class="description last">
  2841. <p>The node that should be cached.</p>
  2842. </td>
  2843. </tr>
  2844. <tr>
  2845. <td class="name">
  2846. <strong>parent</strong>
  2847. </td>
  2848. <td class="description last">
  2849. <p>Whether this node refers to a shared parent cache or not.</p>
  2850. <p>Default is <code>true</code>.</p>
  2851. </td>
  2852. </tr>
  2853. </tbody>
  2854. </table>
  2855. <dl class="details">
  2856. <dt class="important tag-deprecated"><strong>Deprecated:</strong> Yes</dt>
  2857. </dl>
  2858. </div>
  2859. <h3 class="name name-method" id="cbrt" translate="no">.<a href="#cbrt">cbrt</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  2860. <div class="method">
  2861. <div class="description">
  2862. <p>Returns the cube root of a number.</p>
  2863. </div>
  2864. <table class="params">
  2865. <tbody>
  2866. <tr>
  2867. <td class="name">
  2868. <strong>a</strong>
  2869. </td>
  2870. <td class="description last">
  2871. <p>The first parameter.</p>
  2872. </td>
  2873. </tr>
  2874. </tbody>
  2875. </table>
  2876. </div>
  2877. <h3 class="name name-method" id="cdl" translate="no">.<a href="#cdl">cdl</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, slope : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, offset : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, power : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, saturation : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, luminanceCoefficients : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  2878. <div class="method">
  2879. <div class="description">
  2880. <p>Color Decision List (CDL) v1.2</p>
  2881. <p>Compact representation of color grading information, defined by slope, offset, power, and
  2882. saturation. The CDL should be typically be given input in a log space (such as LogC, ACEScc,
  2883. or AgX Log), and will return output in the same space. Output may require clamping &gt;=0.</p>
  2884. </div>
  2885. <table class="params">
  2886. <tbody>
  2887. <tr>
  2888. <td class="name">
  2889. <strong>color</strong>
  2890. </td>
  2891. <td class="description last">
  2892. <p>Input (-Infinity &lt; input &lt; +Infinity)</p>
  2893. </td>
  2894. </tr>
  2895. <tr>
  2896. <td class="name">
  2897. <strong>slope</strong>
  2898. </td>
  2899. <td class="description last">
  2900. <p>Slope (0 ≤ slope &lt; +Infinity)</p>
  2901. </td>
  2902. </tr>
  2903. <tr>
  2904. <td class="name">
  2905. <strong>offset</strong>
  2906. </td>
  2907. <td class="description last">
  2908. <p>Offset (-Infinity &lt; offset &lt; +Infinity; typically -1 &lt; offset &lt; 1)</p>
  2909. </td>
  2910. </tr>
  2911. <tr>
  2912. <td class="name">
  2913. <strong>power</strong>
  2914. </td>
  2915. <td class="description last">
  2916. <p>Power (0 &lt; power &lt; +Infinity)</p>
  2917. </td>
  2918. </tr>
  2919. <tr>
  2920. <td class="name">
  2921. <strong>saturation</strong>
  2922. </td>
  2923. <td class="description last">
  2924. <p>Saturation (0 ≤ saturation &lt; +Infinity; typically 0 ≤ saturation &lt; 4)</p>
  2925. </td>
  2926. </tr>
  2927. <tr>
  2928. <td class="name">
  2929. <strong>luminanceCoefficients</strong>
  2930. </td>
  2931. <td class="description last">
  2932. <p>Luminance coefficients for saturation term, typically Rec. 709</p>
  2933. </td>
  2934. </tr>
  2935. </tbody>
  2936. </table>
  2937. <dl class="details">
  2938. <dt class="tag-returns"><strong>Returns:</strong> <p>Output, -Infinity &lt; output &lt; +Infinity</p>
  2939. <p>References:</p>
  2940. <ul>
  2941. <li>ASC CDL v1.2</li>
  2942. <li><a href="https://blender.stackexchange.com/a/55239/43930" target="_blank" rel="noopener">https://blender.stackexchange.com/a/55239/43930</a></li>
  2943. <li><a href="https://docs.acescentral.com/specifications/acescc/" target="_blank" rel="noopener">https://docs.acescentral.com/specifications/acescc/</a></li>
  2944. </ul></dt>
  2945. </dl>
  2946. </div>
  2947. <h3 class="name name-method" id="ceil" translate="no">.<a href="#ceil">ceil</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  2948. <div class="method">
  2949. <div class="description">
  2950. <p>Finds the nearest integer that is greater than or equal to the parameter.</p>
  2951. </div>
  2952. <table class="params">
  2953. <tbody>
  2954. <tr>
  2955. <td class="name">
  2956. <strong>x</strong>
  2957. </td>
  2958. <td class="description last">
  2959. <p>The parameter.</p>
  2960. </td>
  2961. </tr>
  2962. </tbody>
  2963. </table>
  2964. </div>
  2965. <h3 class="name name-method" id="checker" translate="no">.<a href="#checker">checker</a><span class="signature">( coord : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  2966. <div class="method">
  2967. <div class="description">
  2968. <p>Creates a 2x2 checkerboard pattern that can be used as procedural texture data.</p>
  2969. </div>
  2970. <table class="params">
  2971. <tbody>
  2972. <tr>
  2973. <td class="name">
  2974. <strong>coord</strong>
  2975. </td>
  2976. <td class="description last">
  2977. <p>The uv coordinates.</p>
  2978. </td>
  2979. </tr>
  2980. </tbody>
  2981. </table>
  2982. <dl class="details">
  2983. <dt class="tag-returns"><strong>Returns:</strong> The result data.</dt>
  2984. </dl>
  2985. </div>
  2986. <h3 class="name name-method" id="chromaticAberration" translate="no">.<a href="#chromaticAberration">chromaticAberration</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, strength : <span class="param-type"><a href="Node.html">Node</a> | number</span>, center : <span class="param-type"><a href="Node.html">Node</a> | <a href="Vector2.html">Vector2</a></span>, scale : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="ChromaticAberrationNode.html">ChromaticAberrationNode</a></span> </h3>
  2987. <div class="method">
  2988. <div class="description">
  2989. <p>TSL function for creating a chromatic aberration node for post processing.</p>
  2990. </div>
  2991. <table class="params">
  2992. <tbody>
  2993. <tr>
  2994. <td class="name">
  2995. <strong>node</strong>
  2996. </td>
  2997. <td class="description last">
  2998. <p>The node that represents the input of the effect.</p>
  2999. </td>
  3000. </tr>
  3001. <tr>
  3002. <td class="name">
  3003. <strong>strength</strong>
  3004. </td>
  3005. <td class="description last">
  3006. <p>The strength of the chromatic aberration effect as a node or value.</p>
  3007. <p>Default is <code>1.0</code>.</p>
  3008. </td>
  3009. </tr>
  3010. <tr>
  3011. <td class="name">
  3012. <strong>center</strong>
  3013. </td>
  3014. <td class="description last">
  3015. <p>The center point of the effect as a node or value. If null, uses screen center (0.5, 0.5).</p>
  3016. <p>Default is <code>null</code>.</p>
  3017. </td>
  3018. </tr>
  3019. <tr>
  3020. <td class="name">
  3021. <strong>scale</strong>
  3022. </td>
  3023. <td class="description last">
  3024. <p>The scale factor for stepped scaling from center as a node or value.</p>
  3025. <p>Default is <code>1.1</code>.</p>
  3026. </td>
  3027. </tr>
  3028. </tbody>
  3029. </table>
  3030. </div>
  3031. <h3 class="name name-method" id="cineonToneMapping" translate="no">.<a href="#cineonToneMapping">cineonToneMapping</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, exposure : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  3032. <div class="method">
  3033. <div class="description">
  3034. <p>Cineon tone mapping.</p>
  3035. <p>Reference: <a href="http://filmicworlds.com/blog/filmic-tonemapping-operators/" target="_blank" rel="noopener">http://filmicworlds.com/blog/filmic-tonemapping-operators/</a></p>
  3036. </div>
  3037. <table class="params">
  3038. <tbody>
  3039. <tr>
  3040. <td class="name">
  3041. <strong>color</strong>
  3042. </td>
  3043. <td class="description last">
  3044. <p>The color that should be tone mapped.</p>
  3045. </td>
  3046. </tr>
  3047. <tr>
  3048. <td class="name">
  3049. <strong>exposure</strong>
  3050. </td>
  3051. <td class="description last">
  3052. <p>The exposure.</p>
  3053. </td>
  3054. </tr>
  3055. </tbody>
  3056. </table>
  3057. <dl class="details">
  3058. <dt class="tag-returns"><strong>Returns:</strong> The tone mapped color.</dt>
  3059. </dl>
  3060. </div>
  3061. <h3 class="name name-method" id="circleIntersectsAABB" translate="no">.<a href="#circleIntersectsAABB">circleIntersectsAABB</a><span class="signature">( circleCenter : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, radius : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, minBounds : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, maxBounds : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;bool></span> </h3>
  3062. <div class="method">
  3063. <div class="description">
  3064. <p>TSL function that checks if a circle intersects with an axis-aligned bounding box (AABB).</p>
  3065. </div>
  3066. <table class="params">
  3067. <tbody>
  3068. <tr>
  3069. <td class="name">
  3070. <strong>circleCenter</strong>
  3071. </td>
  3072. <td class="description last">
  3073. <p>The center of the circle.</p>
  3074. </td>
  3075. </tr>
  3076. <tr>
  3077. <td class="name">
  3078. <strong>radius</strong>
  3079. </td>
  3080. <td class="description last">
  3081. <p>The radius of the circle.</p>
  3082. </td>
  3083. </tr>
  3084. <tr>
  3085. <td class="name">
  3086. <strong>minBounds</strong>
  3087. </td>
  3088. <td class="description last">
  3089. <p>The minimum bounds of the AABB.</p>
  3090. </td>
  3091. </tr>
  3092. <tr>
  3093. <td class="name">
  3094. <strong>maxBounds</strong>
  3095. </td>
  3096. <td class="description last">
  3097. <p>The maximum bounds of the AABB.</p>
  3098. </td>
  3099. </tr>
  3100. </tbody>
  3101. </table>
  3102. <dl class="details">
  3103. <dt class="tag-returns"><strong>Returns:</strong> True if the circle intersects the AABB.</dt>
  3104. </dl>
  3105. </div>
  3106. <h3 class="name name-method" id="clamp" translate="no">.<a href="#clamp">clamp</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a> | number</span>, low : <span class="param-type"><a href="Node.html">Node</a> | number</span>, high : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  3107. <div class="method">
  3108. <div class="description">
  3109. <p>Constrains a value to lie between two further values.</p>
  3110. </div>
  3111. <table class="params">
  3112. <tbody>
  3113. <tr>
  3114. <td class="name">
  3115. <strong>value</strong>
  3116. </td>
  3117. <td class="description last">
  3118. <p>The value to constrain.</p>
  3119. </td>
  3120. </tr>
  3121. <tr>
  3122. <td class="name">
  3123. <strong>low</strong>
  3124. </td>
  3125. <td class="description last">
  3126. <p>The lower bound.</p>
  3127. <p>Default is <code>0</code>.</p>
  3128. </td>
  3129. </tr>
  3130. <tr>
  3131. <td class="name">
  3132. <strong>high</strong>
  3133. </td>
  3134. <td class="description last">
  3135. <p>The upper bound.</p>
  3136. <p>Default is <code>1</code>.</p>
  3137. </td>
  3138. </tr>
  3139. </tbody>
  3140. </table>
  3141. </div>
  3142. <h3 class="name name-method" id="clipping" translate="no">.<a href="#clipping">clipping</a><span class="signature">()</span><span class="type-signature"> : <a href="ClippingNode.html">ClippingNode</a></span> </h3>
  3143. <div class="method">
  3144. <div class="description">
  3145. <p>TSL function for setting up the default clipping logic.</p>
  3146. </div>
  3147. </div>
  3148. <h3 class="name name-method" id="clippingAlpha" translate="no">.<a href="#clippingAlpha">clippingAlpha</a><span class="signature">()</span><span class="type-signature"> : <a href="ClippingNode.html">ClippingNode</a></span> </h3>
  3149. <div class="method">
  3150. <div class="description">
  3151. <p>TSL function for setting up alpha to coverage.</p>
  3152. </div>
  3153. </div>
  3154. <h3 class="name name-method" id="code" translate="no">.<a href="#code">code</a><span class="signature">( code : <span class="param-type">string</span>, includes : <span class="param-type">Array.&lt;<a href="Node.html">Node</a>></span>, language : <span class="param-type">'js' | 'wgsl' | 'glsl'</span> )</span><span class="type-signature"> : <a href="CodeNode.html">CodeNode</a></span> </h3>
  3155. <div class="method">
  3156. <div class="description">
  3157. <p>TSL function for creating a code node.</p>
  3158. </div>
  3159. <table class="params">
  3160. <tbody>
  3161. <tr>
  3162. <td class="name">
  3163. <strong>code</strong>
  3164. </td>
  3165. <td class="description last">
  3166. <p>The native code.</p>
  3167. </td>
  3168. </tr>
  3169. <tr>
  3170. <td class="name">
  3171. <strong>includes</strong>
  3172. </td>
  3173. <td class="description last">
  3174. <p>An array of includes.</p>
  3175. <p>Default is <code>[]</code>.</p>
  3176. </td>
  3177. </tr>
  3178. <tr>
  3179. <td class="name">
  3180. <strong>language</strong>
  3181. </td>
  3182. <td class="description last">
  3183. <p>The used language.</p>
  3184. <p>Default is <code>''</code>.</p>
  3185. </td>
  3186. </tr>
  3187. </tbody>
  3188. </table>
  3189. </div>
  3190. <h3 class="name name-method" id="colorSpaceToWorking" translate="no">.<a href="#colorSpaceToWorking">colorSpaceToWorking</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, sourceColorSpace : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="ColorSpaceNode.html">ColorSpaceNode</a></span> </h3>
  3191. <div class="method">
  3192. <div class="description">
  3193. <p>TSL function for converting a given color node from the given color space to the current working color space.</p>
  3194. </div>
  3195. <table class="params">
  3196. <tbody>
  3197. <tr>
  3198. <td class="name">
  3199. <strong>node</strong>
  3200. </td>
  3201. <td class="description last">
  3202. <p>Represents the node to convert.</p>
  3203. </td>
  3204. </tr>
  3205. <tr>
  3206. <td class="name">
  3207. <strong>sourceColorSpace</strong>
  3208. </td>
  3209. <td class="description last">
  3210. <p>The source color space.</p>
  3211. </td>
  3212. </tr>
  3213. </tbody>
  3214. </table>
  3215. </div>
  3216. <h3 class="name name-method" id="colorToDirection" translate="no">.<a href="#colorToDirection">colorToDirection</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  3217. <div class="method">
  3218. <div class="description">
  3219. <p>Unpacks a color value into a direction vector.</p>
  3220. </div>
  3221. <table class="params">
  3222. <tbody>
  3223. <tr>
  3224. <td class="name">
  3225. <strong>node</strong>
  3226. </td>
  3227. <td class="description last">
  3228. <p>The color to unpack.</p>
  3229. </td>
  3230. </tr>
  3231. </tbody>
  3232. </table>
  3233. <dl class="details">
  3234. <dt class="tag-returns"><strong>Returns:</strong> The direction.</dt>
  3235. </dl>
  3236. </div>
  3237. <h3 class="name name-method" id="compute" translate="no">.<a href="#compute">compute</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, count : <span class="param-type">number | Array.&lt;number></span>, workgroupSize : <span class="param-type">Array.&lt;number></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  3238. <div class="method">
  3239. <div class="description">
  3240. <p>TSL function for creating a compute node.</p>
  3241. </div>
  3242. <table class="params">
  3243. <tbody>
  3244. <tr>
  3245. <td class="name">
  3246. <strong>node</strong>
  3247. </td>
  3248. <td class="description last">
  3249. <p>TODO</p>
  3250. </td>
  3251. </tr>
  3252. <tr>
  3253. <td class="name">
  3254. <strong>count</strong>
  3255. </td>
  3256. <td class="description last">
  3257. <p>TODO.</p>
  3258. </td>
  3259. </tr>
  3260. <tr>
  3261. <td class="name">
  3262. <strong>workgroupSize</strong>
  3263. </td>
  3264. <td class="description last">
  3265. <p>TODO.</p>
  3266. <p>Default is <code>[64]</code>.</p>
  3267. </td>
  3268. </tr>
  3269. </tbody>
  3270. </table>
  3271. </div>
  3272. <h3 class="name name-method" id="computeBuiltin" translate="no">.<a href="#computeBuiltin">computeBuiltin</a><span class="signature">( name : <span class="param-type">string</span>, nodeType : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="ComputeBuiltinNode.html">ComputeBuiltinNode</a></span> </h3>
  3273. <div class="method">
  3274. <div class="description">
  3275. <p>TSL function for creating a compute builtin node.</p>
  3276. </div>
  3277. <table class="params">
  3278. <tbody>
  3279. <tr>
  3280. <td class="name">
  3281. <strong>name</strong>
  3282. </td>
  3283. <td class="description last">
  3284. <p>The built-in name.</p>
  3285. </td>
  3286. </tr>
  3287. <tr>
  3288. <td class="name">
  3289. <strong>nodeType</strong>
  3290. </td>
  3291. <td class="description last">
  3292. <p>The node type.</p>
  3293. </td>
  3294. </tr>
  3295. </tbody>
  3296. </table>
  3297. </div>
  3298. <h3 class="name name-method" id="computeKernel" translate="no">.<a href="#computeKernel">computeKernel</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, workgroupSize : <span class="param-type">Array.&lt;number></span> )</span><span class="type-signature"> : <a href="AtomicFunctionNode.html">AtomicFunctionNode</a></span> </h3>
  3299. <div class="method">
  3300. <div class="description">
  3301. <p>TSL function for creating a compute kernel node.</p>
  3302. </div>
  3303. <table class="params">
  3304. <tbody>
  3305. <tr>
  3306. <td class="name">
  3307. <strong>node</strong>
  3308. </td>
  3309. <td class="description last">
  3310. <p>TODO</p>
  3311. </td>
  3312. </tr>
  3313. <tr>
  3314. <td class="name">
  3315. <strong>workgroupSize</strong>
  3316. </td>
  3317. <td class="description last">
  3318. <p>TODO.</p>
  3319. <p>Default is <code>[64]</code>.</p>
  3320. </td>
  3321. </tr>
  3322. </tbody>
  3323. </table>
  3324. </div>
  3325. <h3 class="name name-method" id="computeSkinning" translate="no">.<a href="#computeSkinning">computeSkinning</a><span class="signature">( skinnedMesh : <span class="param-type"><a href="SkinnedMesh.html">SkinnedMesh</a></span>, toPosition : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="SkinningNode.html">SkinningNode</a></span> </h3>
  3326. <div class="method">
  3327. <div class="description">
  3328. <p>TSL function for computing skinning.</p>
  3329. </div>
  3330. <table class="params">
  3331. <tbody>
  3332. <tr>
  3333. <td class="name">
  3334. <strong>skinnedMesh</strong>
  3335. </td>
  3336. <td class="description last">
  3337. <p>The skinned mesh.</p>
  3338. </td>
  3339. </tr>
  3340. <tr>
  3341. <td class="name">
  3342. <strong>toPosition</strong>
  3343. </td>
  3344. <td class="description last">
  3345. <p>The target position.</p>
  3346. <p>Default is <code>null</code>.</p>
  3347. </td>
  3348. </tr>
  3349. </tbody>
  3350. </table>
  3351. </div>
  3352. <h3 class="name name-method" id="context" translate="no">.<a href="#context">context</a><span class="signature">( nodeOrValue : <span class="param-type"><a href="Node.html">Node</a> | Object</span>, value : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="ContextNode.html">ContextNode</a></span> </h3>
  3353. <div class="method">
  3354. <div class="description">
  3355. <p>TSL function for creating a context node.</p>
  3356. </div>
  3357. <table class="params">
  3358. <tbody>
  3359. <tr>
  3360. <td class="name">
  3361. <strong>nodeOrValue</strong>
  3362. </td>
  3363. <td class="description last">
  3364. <p>The node whose context should be modified or the modified context data.</p>
  3365. <p>Default is <code>{}</code>.</p>
  3366. </td>
  3367. </tr>
  3368. <tr>
  3369. <td class="name">
  3370. <strong>value</strong>
  3371. </td>
  3372. <td class="description last">
  3373. <p>The modified context data.</p>
  3374. <p>Default is <code>{}</code>.</p>
  3375. </td>
  3376. </tr>
  3377. </tbody>
  3378. </table>
  3379. </div>
  3380. <h3 class="name name-method" id="convertColorSpace" translate="no">.<a href="#convertColorSpace">convertColorSpace</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, sourceColorSpace : <span class="param-type">string</span>, targetColorSpace : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="ColorSpaceNode.html">ColorSpaceNode</a></span> </h3>
  3381. <div class="method">
  3382. <div class="description">
  3383. <p>TSL function for converting a given color node from one color space to another one.</p>
  3384. </div>
  3385. <table class="params">
  3386. <tbody>
  3387. <tr>
  3388. <td class="name">
  3389. <strong>node</strong>
  3390. </td>
  3391. <td class="description last">
  3392. <p>Represents the node to convert.</p>
  3393. </td>
  3394. </tr>
  3395. <tr>
  3396. <td class="name">
  3397. <strong>sourceColorSpace</strong>
  3398. </td>
  3399. <td class="description last">
  3400. <p>The source color space.</p>
  3401. </td>
  3402. </tr>
  3403. <tr>
  3404. <td class="name">
  3405. <strong>targetColorSpace</strong>
  3406. </td>
  3407. <td class="description last">
  3408. <p>The target color space.</p>
  3409. </td>
  3410. </tr>
  3411. </tbody>
  3412. </table>
  3413. </div>
  3414. <h3 class="name name-method" id="convertToTexture" translate="no">.<a href="#convertToTexture">convertToTexture</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, options : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="RTTNode.html">RTTNode</a></span> </h3>
  3415. <div class="method">
  3416. <div class="description">
  3417. <p>TSL function for converting nodes to textures nodes.</p>
  3418. </div>
  3419. <table class="params">
  3420. <tbody>
  3421. <tr>
  3422. <td class="name">
  3423. <strong>node</strong>
  3424. </td>
  3425. <td class="description last">
  3426. <p>The node to render a texture with.</p>
  3427. </td>
  3428. </tr>
  3429. <tr>
  3430. <td class="name">
  3431. <strong>width</strong>
  3432. </td>
  3433. <td class="description last">
  3434. <p>The width of the internal render target. If not width is applied, the render target is automatically resized.</p>
  3435. <p>Default is <code>null</code>.</p>
  3436. </td>
  3437. </tr>
  3438. <tr>
  3439. <td class="name">
  3440. <strong>height</strong>
  3441. </td>
  3442. <td class="description last">
  3443. <p>The height of the internal render target.</p>
  3444. <p>Default is <code>null</code>.</p>
  3445. </td>
  3446. </tr>
  3447. <tr>
  3448. <td class="name">
  3449. <strong>options</strong>
  3450. </td>
  3451. <td class="description last">
  3452. <p>The options for the internal render target.</p>
  3453. <p>Default is <code>{type:HalfFloatType}</code>.</p>
  3454. </td>
  3455. </tr>
  3456. </tbody>
  3457. </table>
  3458. </div>
  3459. <h3 class="name name-method" id="cos" translate="no">.<a href="#cos">cos</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  3460. <div class="method">
  3461. <div class="description">
  3462. <p>Returns the cosine of the parameter.</p>
  3463. </div>
  3464. <table class="params">
  3465. <tbody>
  3466. <tr>
  3467. <td class="name">
  3468. <strong>x</strong>
  3469. </td>
  3470. <td class="description last">
  3471. <p>The parameter.</p>
  3472. </td>
  3473. </tr>
  3474. </tbody>
  3475. </table>
  3476. </div>
  3477. <h3 class="name name-method" id="countLeadingZeros" translate="no">.<a href="#countLeadingZeros">countLeadingZeros</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  3478. <div class="method">
  3479. <div class="description">
  3480. <p>Finds the number of consecutive 0 bits starting from the most significant bit of the input value.</p>
  3481. <p>Can only be used with <a href="WebGPURenderer.html">WebGPURenderer</a> and a WebGPU backend.</p>
  3482. </div>
  3483. <table class="params">
  3484. <tbody>
  3485. <tr>
  3486. <td class="name">
  3487. <strong>x</strong>
  3488. </td>
  3489. <td class="description last">
  3490. <p>The input value.</p>
  3491. </td>
  3492. </tr>
  3493. </tbody>
  3494. </table>
  3495. </div>
  3496. <h3 class="name name-method" id="countOneBits" translate="no">.<a href="#countOneBits">countOneBits</a><span class="signature">()</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  3497. <div class="method">
  3498. <div class="description">
  3499. <p>Finds the number of '1' bits set in the input value</p>
  3500. <p>Can only be used with <a href="WebGPURenderer.html">WebGPURenderer</a> and a WebGPU backend.</p>
  3501. </div>
  3502. </div>
  3503. <h3 class="name name-method" id="countTrailingZeros" translate="no">.<a href="#countTrailingZeros">countTrailingZeros</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  3504. <div class="method">
  3505. <div class="description">
  3506. <p>Finds the number of consecutive 0 bits from the least significant bit of the input value,
  3507. which is also the index of the least significant bit of the input value.</p>
  3508. <p>Can only be used with <a href="WebGPURenderer.html">WebGPURenderer</a> and a WebGPU backend.</p>
  3509. </div>
  3510. <table class="params">
  3511. <tbody>
  3512. <tr>
  3513. <td class="name">
  3514. <strong>x</strong>
  3515. </td>
  3516. <td class="description last">
  3517. <p>The input value.</p>
  3518. </td>
  3519. </tr>
  3520. </tbody>
  3521. </table>
  3522. </div>
  3523. <h3 class="name name-method" id="createVar" translate="no">.<a href="#createVar">createVar</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="VarNode.html">VarNode</a></span> </h3>
  3524. <div class="method">
  3525. <div class="description">
  3526. <p>TSL function for creating a var node.</p>
  3527. </div>
  3528. <table class="params">
  3529. <tbody>
  3530. <tr>
  3531. <td class="name">
  3532. <strong>node</strong>
  3533. </td>
  3534. <td class="description last">
  3535. <p>The node for which a variable should be created.</p>
  3536. </td>
  3537. </tr>
  3538. <tr>
  3539. <td class="name">
  3540. <strong>name</strong>
  3541. </td>
  3542. <td class="description last">
  3543. <p>The name of the variable in the shader.</p>
  3544. </td>
  3545. </tr>
  3546. </tbody>
  3547. </table>
  3548. </div>
  3549. <h3 class="name name-method" id="cross" translate="no">.<a href="#cross">cross</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3)></span>, y : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;(float|vec3)></span> </h3>
  3550. <div class="method">
  3551. <div class="description">
  3552. <p>Calculates the cross product of two vectors.</p>
  3553. </div>
  3554. <table class="params">
  3555. <tbody>
  3556. <tr>
  3557. <td class="name">
  3558. <strong>x</strong>
  3559. </td>
  3560. <td class="description last">
  3561. <p>The first vector.</p>
  3562. </td>
  3563. </tr>
  3564. <tr>
  3565. <td class="name">
  3566. <strong>y</strong>
  3567. </td>
  3568. <td class="description last">
  3569. <p>The second vector.</p>
  3570. </td>
  3571. </tr>
  3572. </tbody>
  3573. </table>
  3574. </div>
  3575. <h3 class="name name-method" id="cubeMapNode" translate="no">.<a href="#cubeMapNode">cubeMapNode</a><span class="signature">( envNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="CubeMapNode.html">CubeMapNode</a></span> </h3>
  3576. <div class="method">
  3577. <div class="description">
  3578. <p>TSL function for creating a cube map node.</p>
  3579. </div>
  3580. <table class="params">
  3581. <tbody>
  3582. <tr>
  3583. <td class="name">
  3584. <strong>envNode</strong>
  3585. </td>
  3586. <td class="description last">
  3587. <p>The node representing the environment map.</p>
  3588. </td>
  3589. </tr>
  3590. </tbody>
  3591. </table>
  3592. </div>
  3593. <h3 class="name name-method" id="cubeTexture" translate="no">.<a href="#cubeTexture">cubeTexture</a><span class="signature">( value : <span class="param-type"><a href="CubeTexture.html">CubeTexture</a> | <a href="CubeTextureNode.html">CubeTextureNode</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, biasNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="CubeTextureNode.html">CubeTextureNode</a></span> </h3>
  3594. <div class="method">
  3595. <div class="description">
  3596. <p>TSL function for creating a cube texture uniform node.</p>
  3597. </div>
  3598. <table class="params">
  3599. <tbody>
  3600. <tr>
  3601. <td class="name">
  3602. <strong>value</strong>
  3603. </td>
  3604. <td class="description last">
  3605. <p>The cube texture.</p>
  3606. <p>Default is <code>EmptyTexture</code>.</p>
  3607. </td>
  3608. </tr>
  3609. <tr>
  3610. <td class="name">
  3611. <strong>uvNode</strong>
  3612. </td>
  3613. <td class="description last">
  3614. <p>The uv node.</p>
  3615. <p>Default is <code>null</code>.</p>
  3616. </td>
  3617. </tr>
  3618. <tr>
  3619. <td class="name">
  3620. <strong>levelNode</strong>
  3621. </td>
  3622. <td class="description last">
  3623. <p>The level node.</p>
  3624. <p>Default is <code>null</code>.</p>
  3625. </td>
  3626. </tr>
  3627. <tr>
  3628. <td class="name">
  3629. <strong>biasNode</strong>
  3630. </td>
  3631. <td class="description last">
  3632. <p>The bias node.</p>
  3633. <p>Default is <code>null</code>.</p>
  3634. </td>
  3635. </tr>
  3636. </tbody>
  3637. </table>
  3638. </div>
  3639. <h3 class="name name-method" id="cubeTextureBase" translate="no">.<a href="#cubeTextureBase">cubeTextureBase</a><span class="signature">( value : <span class="param-type"><a href="CubeTexture.html">CubeTexture</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, biasNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="CubeTextureNode.html">CubeTextureNode</a></span> </h3>
  3640. <div class="method">
  3641. <div class="description">
  3642. <p>TSL function for creating a cube texture node.</p>
  3643. </div>
  3644. <table class="params">
  3645. <tbody>
  3646. <tr>
  3647. <td class="name">
  3648. <strong>value</strong>
  3649. </td>
  3650. <td class="description last">
  3651. <p>The cube texture.</p>
  3652. </td>
  3653. </tr>
  3654. <tr>
  3655. <td class="name">
  3656. <strong>uvNode</strong>
  3657. </td>
  3658. <td class="description last">
  3659. <p>The uv node.</p>
  3660. <p>Default is <code>null</code>.</p>
  3661. </td>
  3662. </tr>
  3663. <tr>
  3664. <td class="name">
  3665. <strong>levelNode</strong>
  3666. </td>
  3667. <td class="description last">
  3668. <p>The level node.</p>
  3669. <p>Default is <code>null</code>.</p>
  3670. </td>
  3671. </tr>
  3672. <tr>
  3673. <td class="name">
  3674. <strong>biasNode</strong>
  3675. </td>
  3676. <td class="description last">
  3677. <p>The bias node.</p>
  3678. <p>Default is <code>null</code>.</p>
  3679. </td>
  3680. </tr>
  3681. </tbody>
  3682. </table>
  3683. </div>
  3684. <h3 class="name name-method" id="dFdx" translate="no">.<a href="#dFdx">dFdx</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  3685. <div class="method">
  3686. <div class="description">
  3687. <p>Returns the partial derivative of the parameter with respect to x.</p>
  3688. </div>
  3689. <table class="params">
  3690. <tbody>
  3691. <tr>
  3692. <td class="name">
  3693. <strong>x</strong>
  3694. </td>
  3695. <td class="description last">
  3696. <p>The parameter.</p>
  3697. </td>
  3698. </tr>
  3699. </tbody>
  3700. </table>
  3701. </div>
  3702. <h3 class="name name-method" id="dFdy" translate="no">.<a href="#dFdy">dFdy</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  3703. <div class="method">
  3704. <div class="description">
  3705. <p>Returns the partial derivative of the parameter with respect to y.</p>
  3706. </div>
  3707. <table class="params">
  3708. <tbody>
  3709. <tr>
  3710. <td class="name">
  3711. <strong>x</strong>
  3712. </td>
  3713. <td class="description last">
  3714. <p>The parameter.</p>
  3715. </td>
  3716. </tr>
  3717. </tbody>
  3718. </table>
  3719. </div>
  3720. <h3 class="name name-method" id="debug" translate="no">.<a href="#debug">debug</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, callback : <span class="param-type">function</span> )</span><span class="type-signature"> : DebugNode</span> </h3>
  3721. <div class="method">
  3722. <div class="description">
  3723. <p>TSL function for creating a debug node.</p>
  3724. </div>
  3725. <table class="params">
  3726. <tbody>
  3727. <tr>
  3728. <td class="name">
  3729. <strong>node</strong>
  3730. </td>
  3731. <td class="description last">
  3732. <p>The node to debug.</p>
  3733. </td>
  3734. </tr>
  3735. <tr>
  3736. <td class="name">
  3737. <strong>callback</strong>
  3738. </td>
  3739. <td class="description last">
  3740. <p>Optional callback function to handle the debug output.</p>
  3741. <p>Default is <code>null</code>.</p>
  3742. </td>
  3743. </tr>
  3744. </tbody>
  3745. </table>
  3746. </div>
  3747. <h3 class="name name-method" id="decrement" translate="no">.<a href="#decrement">decrement</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  3748. <div class="method">
  3749. <div class="description">
  3750. <p>Decrements a node by 1 and returns the previous value.</p>
  3751. </div>
  3752. <table class="params">
  3753. <tbody>
  3754. <tr>
  3755. <td class="name">
  3756. <strong>a</strong>
  3757. </td>
  3758. <td class="description last">
  3759. <p>The node to decrement.</p>
  3760. </td>
  3761. </tr>
  3762. </tbody>
  3763. </table>
  3764. </div>
  3765. <h3 class="name name-method" id="decrementBefore" translate="no">.<a href="#decrementBefore">decrementBefore</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  3766. <div class="method">
  3767. <div class="description">
  3768. <p>Decrements a node by 1.</p>
  3769. </div>
  3770. <table class="params">
  3771. <tbody>
  3772. <tr>
  3773. <td class="name">
  3774. <strong>a</strong>
  3775. </td>
  3776. <td class="description last">
  3777. <p>The node to decrement.</p>
  3778. </td>
  3779. </tr>
  3780. </tbody>
  3781. </table>
  3782. </div>
  3783. <h3 class="name name-method" id="degrees" translate="no">.<a href="#degrees">degrees</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  3784. <div class="method">
  3785. <div class="description">
  3786. <p>Convert a quantity in radians to degrees.</p>
  3787. </div>
  3788. <table class="params">
  3789. <tbody>
  3790. <tr>
  3791. <td class="name">
  3792. <strong>x</strong>
  3793. </td>
  3794. <td class="description last">
  3795. <p>The input in radians.</p>
  3796. </td>
  3797. </tr>
  3798. </tbody>
  3799. </table>
  3800. </div>
  3801. <h3 class="name name-method" id="denoise" translate="no">.<a href="#denoise">denoise</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, depthNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, normalNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span><span class="type-signature"> : <a href="DenoiseNode.html">DenoiseNode</a></span> </h3>
  3802. <div class="method">
  3803. <div class="description">
  3804. <p>TSL function for creating a denoise effect.</p>
  3805. </div>
  3806. <table class="params">
  3807. <tbody>
  3808. <tr>
  3809. <td class="name">
  3810. <strong>node</strong>
  3811. </td>
  3812. <td class="description last">
  3813. <p>The node that represents the input of the effect (e.g. AO).</p>
  3814. </td>
  3815. </tr>
  3816. <tr>
  3817. <td class="name">
  3818. <strong>depthNode</strong>
  3819. </td>
  3820. <td class="description last">
  3821. <p>A node that represents the scene's depth.</p>
  3822. </td>
  3823. </tr>
  3824. <tr>
  3825. <td class="name">
  3826. <strong>normalNode</strong>
  3827. </td>
  3828. <td class="description last">
  3829. <p>A node that represents the scene's normals.</p>
  3830. </td>
  3831. </tr>
  3832. <tr>
  3833. <td class="name">
  3834. <strong>camera</strong>
  3835. </td>
  3836. <td class="description last">
  3837. <p>The camera the scene is rendered with.</p>
  3838. </td>
  3839. </tr>
  3840. </tbody>
  3841. </table>
  3842. </div>
  3843. <h3 class="name name-method" id="densityFogFactor" translate="no">.<a href="#densityFogFactor">densityFogFactor</a><span class="signature">( density : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  3844. <div class="method">
  3845. <div class="description">
  3846. <p>Represents an exponential squared fog. This type of fog gives
  3847. a clear view near the camera and a faster than exponentially
  3848. densening fog farther from the camera.</p>
  3849. </div>
  3850. <table class="params">
  3851. <tbody>
  3852. <tr>
  3853. <td class="name">
  3854. <strong>density</strong>
  3855. </td>
  3856. <td class="description last">
  3857. <p>Defines the fog density.</p>
  3858. </td>
  3859. </tr>
  3860. </tbody>
  3861. </table>
  3862. </div>
  3863. <h3 class="name name-method" id="depthBase" translate="no">.<a href="#depthBase">depthBase</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="ViewportDepthNode.html">ViewportDepthNode</a>.&lt;float></span> </h3>
  3864. <div class="method">
  3865. <div class="description">
  3866. <p>TSL function for defining a value for the current fragment's depth.</p>
  3867. </div>
  3868. <table class="params">
  3869. <tbody>
  3870. <tr>
  3871. <td class="name">
  3872. <strong>value</strong>
  3873. </td>
  3874. <td class="description last">
  3875. <p>The depth value to set.</p>
  3876. </td>
  3877. </tr>
  3878. </tbody>
  3879. </table>
  3880. </div>
  3881. <h3 class="name name-method" id="depthPass" translate="no">.<a href="#depthPass">depthPass</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, options : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="PassNode.html">PassNode</a></span> </h3>
  3882. <div class="method">
  3883. <div class="description">
  3884. <p>TSL function for creating a depth pass node.</p>
  3885. </div>
  3886. <table class="params">
  3887. <tbody>
  3888. <tr>
  3889. <td class="name">
  3890. <strong>scene</strong>
  3891. </td>
  3892. <td class="description last">
  3893. <p>A reference to the scene.</p>
  3894. </td>
  3895. </tr>
  3896. <tr>
  3897. <td class="name">
  3898. <strong>camera</strong>
  3899. </td>
  3900. <td class="description last">
  3901. <p>A reference to the camera.</p>
  3902. </td>
  3903. </tr>
  3904. <tr>
  3905. <td class="name">
  3906. <strong>options</strong>
  3907. </td>
  3908. <td class="description last">
  3909. <p>Options for the internal render target.</p>
  3910. </td>
  3911. </tr>
  3912. </tbody>
  3913. </table>
  3914. </div>
  3915. <h3 class="name name-method" id="determinant" translate="no">.<a href="#determinant">determinant</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;(mat2|mat3|mat4)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  3916. <div class="method">
  3917. <div class="description">
  3918. <p>Returns the determinant of a matrix.</p>
  3919. </div>
  3920. <table class="params">
  3921. <tbody>
  3922. <tr>
  3923. <td class="name">
  3924. <strong>x</strong>
  3925. </td>
  3926. <td class="description last">
  3927. <p>The parameter.</p>
  3928. </td>
  3929. </tr>
  3930. </tbody>
  3931. </table>
  3932. </div>
  3933. <h3 class="name name-method" id="difference" translate="no">.<a href="#difference">difference</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span>, y : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  3934. <div class="method">
  3935. <div class="description">
  3936. <p>Calculates the absolute difference between two values.</p>
  3937. </div>
  3938. <table class="params">
  3939. <tbody>
  3940. <tr>
  3941. <td class="name">
  3942. <strong>x</strong>
  3943. </td>
  3944. <td class="description last">
  3945. <p>The first parameter.</p>
  3946. </td>
  3947. </tr>
  3948. <tr>
  3949. <td class="name">
  3950. <strong>y</strong>
  3951. </td>
  3952. <td class="description last">
  3953. <p>The second parameter.</p>
  3954. </td>
  3955. </tr>
  3956. </tbody>
  3957. </table>
  3958. </div>
  3959. <h3 class="name name-method" id="directionToColor" translate="no">.<a href="#directionToColor">directionToColor</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  3960. <div class="method">
  3961. <div class="description">
  3962. <p>Packs a direction vector into a color value.</p>
  3963. </div>
  3964. <table class="params">
  3965. <tbody>
  3966. <tr>
  3967. <td class="name">
  3968. <strong>node</strong>
  3969. </td>
  3970. <td class="description last">
  3971. <p>The direction to pack.</p>
  3972. </td>
  3973. </tr>
  3974. </tbody>
  3975. </table>
  3976. <dl class="details">
  3977. <dt class="tag-returns"><strong>Returns:</strong> The color.</dt>
  3978. </dl>
  3979. </div>
  3980. <h3 class="name name-method" id="distance" translate="no">.<a href="#distance">distance</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span>, y : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  3981. <div class="method">
  3982. <div class="description">
  3983. <p>Calculates the distance between two points.</p>
  3984. </div>
  3985. <table class="params">
  3986. <tbody>
  3987. <tr>
  3988. <td class="name">
  3989. <strong>x</strong>
  3990. </td>
  3991. <td class="description last">
  3992. <p>The first point.</p>
  3993. </td>
  3994. </tr>
  3995. <tr>
  3996. <td class="name">
  3997. <strong>y</strong>
  3998. </td>
  3999. <td class="description last">
  4000. <p>The second point.</p>
  4001. </td>
  4002. </tr>
  4003. </tbody>
  4004. </table>
  4005. </div>
  4006. <h3 class="name name-method" id="div" translate="no">.<a href="#div">div</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span>, &hellip;params : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  4007. <div class="method">
  4008. <div class="description">
  4009. <p>Returns the division of two or more value.</p>
  4010. </div>
  4011. <table class="params">
  4012. <tbody>
  4013. <tr>
  4014. <td class="name">
  4015. <strong>a</strong>
  4016. </td>
  4017. <td class="description last">
  4018. <p>The first input.</p>
  4019. </td>
  4020. </tr>
  4021. <tr>
  4022. <td class="name">
  4023. <strong>b</strong>
  4024. </td>
  4025. <td class="description last">
  4026. <p>The second input.</p>
  4027. </td>
  4028. </tr>
  4029. <tr>
  4030. <td class="name">
  4031. <strong>params</strong>
  4032. </td>
  4033. <td class="description last">
  4034. <p>Additional input parameters.</p>
  4035. </td>
  4036. </tr>
  4037. </tbody>
  4038. </table>
  4039. </div>
  4040. <h3 class="name name-method" id="dof" translate="no">.<a href="#dof">dof</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, viewZNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, focusDistance : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span>, focalLength : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span>, bokehScale : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span> )</span><span class="type-signature"> : <a href="DepthOfFieldNode.html">DepthOfFieldNode</a></span> </h3>
  4041. <div class="method">
  4042. <div class="description">
  4043. <p>TSL function for creating a depth-of-field effect (DOF) for post processing.</p>
  4044. </div>
  4045. <table class="params">
  4046. <tbody>
  4047. <tr>
  4048. <td class="name">
  4049. <strong>node</strong>
  4050. </td>
  4051. <td class="description last">
  4052. <p>The node that represents the input of the effect.</p>
  4053. </td>
  4054. </tr>
  4055. <tr>
  4056. <td class="name">
  4057. <strong>viewZNode</strong>
  4058. </td>
  4059. <td class="description last">
  4060. <p>Represents the viewZ depth values of the scene.</p>
  4061. </td>
  4062. </tr>
  4063. <tr>
  4064. <td class="name">
  4065. <strong>focusDistance</strong>
  4066. </td>
  4067. <td class="description last">
  4068. <p>Defines the effect's focus which is the distance along the camera's look direction in world units.</p>
  4069. </td>
  4070. </tr>
  4071. <tr>
  4072. <td class="name">
  4073. <strong>focalLength</strong>
  4074. </td>
  4075. <td class="description last">
  4076. <p>How far an object can be from the focal plane before it goes completely out-of-focus in world units.</p>
  4077. </td>
  4078. </tr>
  4079. <tr>
  4080. <td class="name">
  4081. <strong>bokehScale</strong>
  4082. </td>
  4083. <td class="description last">
  4084. <p>A unitless value for artistic purposes to adjust the size of the bokeh.</p>
  4085. </td>
  4086. </tr>
  4087. </tbody>
  4088. </table>
  4089. </div>
  4090. <h3 class="name name-method" id="dot" translate="no">.<a href="#dot">dot</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span>, y : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  4091. <div class="method">
  4092. <div class="description">
  4093. <p>Calculates the dot product of two vectors.</p>
  4094. </div>
  4095. <table class="params">
  4096. <tbody>
  4097. <tr>
  4098. <td class="name">
  4099. <strong>x</strong>
  4100. </td>
  4101. <td class="description last">
  4102. <p>The first vector.</p>
  4103. </td>
  4104. </tr>
  4105. <tr>
  4106. <td class="name">
  4107. <strong>y</strong>
  4108. </td>
  4109. <td class="description last">
  4110. <p>The second vector.</p>
  4111. </td>
  4112. </tr>
  4113. </tbody>
  4114. </table>
  4115. </div>
  4116. <h3 class="name name-method" id="dotScreen" translate="no">.<a href="#dotScreen">dotScreen</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, angle : <span class="param-type">number</span>, scale : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="DotScreenNode.html">DotScreenNode</a></span> </h3>
  4117. <div class="method">
  4118. <div class="description">
  4119. <p>TSL function for creating a dot-screen node for post processing.</p>
  4120. </div>
  4121. <table class="params">
  4122. <tbody>
  4123. <tr>
  4124. <td class="name">
  4125. <strong>node</strong>
  4126. </td>
  4127. <td class="description last">
  4128. <p>The node that represents the input of the effect.</p>
  4129. </td>
  4130. </tr>
  4131. <tr>
  4132. <td class="name">
  4133. <strong>angle</strong>
  4134. </td>
  4135. <td class="description last">
  4136. <p>The rotation of the effect in radians.</p>
  4137. <p>Default is <code>1.57</code>.</p>
  4138. </td>
  4139. </tr>
  4140. <tr>
  4141. <td class="name">
  4142. <strong>scale</strong>
  4143. </td>
  4144. <td class="description last">
  4145. <p>The scale of the effect. A higher value means smaller dots.</p>
  4146. <p>Default is <code>1</code>.</p>
  4147. </td>
  4148. </tr>
  4149. </tbody>
  4150. </table>
  4151. </div>
  4152. <h3 class="name name-method" id="dynamicBufferAttribute" translate="no">.<a href="#dynamicBufferAttribute">dynamicBufferAttribute</a><span class="signature">( array : <span class="param-type"><a href="BufferAttribute.html">BufferAttribute</a> | <a href="InterleavedBuffer.html">InterleavedBuffer</a> | TypedArray</span>, type : <span class="param-type">string</span>, stride : <span class="param-type">number</span>, offset : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="BufferAttributeNode.html">BufferAttributeNode</a> | <a href="Node.html">Node</a></span> </h3>
  4153. <div class="method">
  4154. <div class="description">
  4155. <p>TSL function for creating a buffer attribute node but with dynamic draw usage.
  4156. Use this function if attribute data are updated per frame.</p>
  4157. </div>
  4158. <table class="params">
  4159. <tbody>
  4160. <tr>
  4161. <td class="name">
  4162. <strong>array</strong>
  4163. </td>
  4164. <td class="description last">
  4165. <p>The attribute data.</p>
  4166. </td>
  4167. </tr>
  4168. <tr>
  4169. <td class="name">
  4170. <strong>type</strong>
  4171. </td>
  4172. <td class="description last">
  4173. <p>The buffer type (e.g. <code>'vec3'</code>).</p>
  4174. <p>Default is <code>null</code>.</p>
  4175. </td>
  4176. </tr>
  4177. <tr>
  4178. <td class="name">
  4179. <strong>stride</strong>
  4180. </td>
  4181. <td class="description last">
  4182. <p>The buffer stride.</p>
  4183. <p>Default is <code>0</code>.</p>
  4184. </td>
  4185. </tr>
  4186. <tr>
  4187. <td class="name">
  4188. <strong>offset</strong>
  4189. </td>
  4190. <td class="description last">
  4191. <p>The buffer offset.</p>
  4192. <p>Default is <code>0</code>.</p>
  4193. </td>
  4194. </tr>
  4195. </tbody>
  4196. </table>
  4197. </div>
  4198. <h3 class="name name-method" id="equal" translate="no">.<a href="#equal">equal</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  4199. <div class="method">
  4200. <div class="description">
  4201. <p>Checks if two nodes are equal.</p>
  4202. </div>
  4203. <table class="params">
  4204. <tbody>
  4205. <tr>
  4206. <td class="name">
  4207. <strong>a</strong>
  4208. </td>
  4209. <td class="description last">
  4210. <p>The first input.</p>
  4211. </td>
  4212. </tr>
  4213. <tr>
  4214. <td class="name">
  4215. <strong>b</strong>
  4216. </td>
  4217. <td class="description last">
  4218. <p>The second input.</p>
  4219. </td>
  4220. </tr>
  4221. </tbody>
  4222. </table>
  4223. </div>
  4224. <h3 class="name name-method" id="equirectUV" translate="no">.<a href="#equirectUV">equirectUV</a><span class="signature">( dirNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> </h3>
  4225. <div class="method">
  4226. <div class="description">
  4227. <p>TSL function for creating an equirect uv node.</p>
  4228. <p>Can be used to compute texture coordinates for projecting an
  4229. equirectangular texture onto a mesh for using it as the scene's
  4230. background.</p>
  4231. <pre><code class="language-js">scene.backgroundNode = texture( equirectTexture, equirectUV() );
  4232. </code></pre>
  4233. </div>
  4234. <table class="params">
  4235. <tbody>
  4236. <tr>
  4237. <td class="name">
  4238. <strong>dirNode</strong>
  4239. </td>
  4240. <td class="description last">
  4241. <p>A direction vector for sampling which is by default <code>positionWorldDirection</code>.</p>
  4242. <p>Default is <code>positionWorldDirection</code>.</p>
  4243. </td>
  4244. </tr>
  4245. </tbody>
  4246. </table>
  4247. </div>
  4248. <h3 class="name name-method" id="exp" translate="no">.<a href="#exp">exp</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  4249. <div class="method">
  4250. <div class="description">
  4251. <p>Returns the natural exponentiation of the parameter.</p>
  4252. </div>
  4253. <table class="params">
  4254. <tbody>
  4255. <tr>
  4256. <td class="name">
  4257. <strong>x</strong>
  4258. </td>
  4259. <td class="description last">
  4260. <p>The parameter.</p>
  4261. </td>
  4262. </tr>
  4263. </tbody>
  4264. </table>
  4265. </div>
  4266. <h3 class="name name-method" id="exp2" translate="no">.<a href="#exp2">exp2</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  4267. <div class="method">
  4268. <div class="description">
  4269. <p>Returns 2 raised to the power of the parameter.</p>
  4270. </div>
  4271. <table class="params">
  4272. <tbody>
  4273. <tr>
  4274. <td class="name">
  4275. <strong>x</strong>
  4276. </td>
  4277. <td class="description last">
  4278. <p>The parameter.</p>
  4279. </td>
  4280. </tr>
  4281. </tbody>
  4282. </table>
  4283. </div>
  4284. <h3 class="name name-method" id="expression" translate="no">.<a href="#expression">expression</a><span class="signature">( snippet : <span class="param-type">string</span>, nodeType : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="ExpressionNode.html">ExpressionNode</a></span> </h3>
  4285. <div class="method">
  4286. <div class="description">
  4287. <p>TSL function for creating an expression node.</p>
  4288. </div>
  4289. <table class="params">
  4290. <tbody>
  4291. <tr>
  4292. <td class="name">
  4293. <strong>snippet</strong>
  4294. </td>
  4295. <td class="description last">
  4296. <p>The native code snippet.</p>
  4297. </td>
  4298. </tr>
  4299. <tr>
  4300. <td class="name">
  4301. <strong>nodeType</strong>
  4302. </td>
  4303. <td class="description last">
  4304. <p>The node type.</p>
  4305. <p>Default is <code>'void'</code>.</p>
  4306. </td>
  4307. </tr>
  4308. </tbody>
  4309. </table>
  4310. </div>
  4311. <h3 class="name name-method" id="faceForward" translate="no">.<a href="#faceForward">faceForward</a><span class="signature">( N : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span>, I : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span>, Nref : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span> </h3>
  4312. <div class="method">
  4313. <div class="description">
  4314. <p>Returns a vector pointing in the same direction as another.</p>
  4315. </div>
  4316. <table class="params">
  4317. <tbody>
  4318. <tr>
  4319. <td class="name">
  4320. <strong>N</strong>
  4321. </td>
  4322. <td class="description last">
  4323. <p>The vector to orient.</p>
  4324. </td>
  4325. </tr>
  4326. <tr>
  4327. <td class="name">
  4328. <strong>I</strong>
  4329. </td>
  4330. <td class="description last">
  4331. <p>The incident vector.</p>
  4332. </td>
  4333. </tr>
  4334. <tr>
  4335. <td class="name">
  4336. <strong>Nref</strong>
  4337. </td>
  4338. <td class="description last">
  4339. <p>The reference vector.</p>
  4340. </td>
  4341. </tr>
  4342. </tbody>
  4343. </table>
  4344. </div>
  4345. <h3 class="name name-method" id="film" translate="no">.<a href="#film">film</a><span class="signature">( inputNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, intensityNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="FilmNode.html">FilmNode</a></span> </h3>
  4346. <div class="method">
  4347. <div class="description">
  4348. <p>TSL function for creating a film node for post processing.</p>
  4349. </div>
  4350. <table class="params">
  4351. <tbody>
  4352. <tr>
  4353. <td class="name">
  4354. <strong>inputNode</strong>
  4355. </td>
  4356. <td class="description last">
  4357. <p>The node that represents the input of the effect.</p>
  4358. </td>
  4359. </tr>
  4360. <tr>
  4361. <td class="name">
  4362. <strong>intensityNode</strong>
  4363. </td>
  4364. <td class="description last">
  4365. <p>A node that represents the effect's intensity.</p>
  4366. <p>Default is <code>null</code>.</p>
  4367. </td>
  4368. </tr>
  4369. <tr>
  4370. <td class="name">
  4371. <strong>uvNode</strong>
  4372. </td>
  4373. <td class="description last">
  4374. <p>A node that allows to pass custom (e.g. animated) uv data.</p>
  4375. <p>Default is <code>null</code>.</p>
  4376. </td>
  4377. </tr>
  4378. </tbody>
  4379. </table>
  4380. </div>
  4381. <h3 class="name name-method" id="floatBitsToInt" translate="no">.<a href="#floatBitsToInt">floatBitsToInt</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="BitcastNode.html">BitcastNode</a></span> </h3>
  4382. <div class="method">
  4383. <div class="description">
  4384. <p>Bitcasts a float or a vector of floats to a corresponding integer type with the same element size.</p>
  4385. </div>
  4386. <table class="params">
  4387. <tbody>
  4388. <tr>
  4389. <td class="name">
  4390. <strong>value</strong>
  4391. </td>
  4392. <td class="description last">
  4393. <p>The float or vector of floats to bitcast.</p>
  4394. </td>
  4395. </tr>
  4396. </tbody>
  4397. </table>
  4398. </div>
  4399. <h3 class="name name-method" id="floatBitsToUint" translate="no">.<a href="#floatBitsToUint">floatBitsToUint</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="BitcastNode.html">BitcastNode</a></span> </h3>
  4400. <div class="method">
  4401. <div class="description">
  4402. <p>Bitcasts a float or a vector of floats to a corresponding unsigned integer type with the same element size.</p>
  4403. </div>
  4404. <table class="params">
  4405. <tbody>
  4406. <tr>
  4407. <td class="name">
  4408. <strong>value</strong>
  4409. </td>
  4410. <td class="description last">
  4411. <p>The float or vector of floats to bitcast.</p>
  4412. </td>
  4413. </tr>
  4414. </tbody>
  4415. </table>
  4416. </div>
  4417. <h3 class="name name-method" id="floor" translate="no">.<a href="#floor">floor</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  4418. <div class="method">
  4419. <div class="description">
  4420. <p>Finds the nearest integer less than or equal to the parameter.</p>
  4421. </div>
  4422. <table class="params">
  4423. <tbody>
  4424. <tr>
  4425. <td class="name">
  4426. <strong>x</strong>
  4427. </td>
  4428. <td class="description last">
  4429. <p>The parameter.</p>
  4430. </td>
  4431. </tr>
  4432. </tbody>
  4433. </table>
  4434. </div>
  4435. <h3 class="name name-method" id="fog" translate="no">.<a href="#fog">fog</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a></span>, factor : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  4436. <div class="method">
  4437. <div class="description">
  4438. <p>This class can be used to configure a fog for the scene.
  4439. Nodes of this type are assigned to <code>Scene.fogNode</code>.</p>
  4440. </div>
  4441. <table class="params">
  4442. <tbody>
  4443. <tr>
  4444. <td class="name">
  4445. <strong>color</strong>
  4446. </td>
  4447. <td class="description last">
  4448. <p>Defines the color of the fog.</p>
  4449. </td>
  4450. </tr>
  4451. <tr>
  4452. <td class="name">
  4453. <strong>factor</strong>
  4454. </td>
  4455. <td class="description last">
  4456. <p>Defines how the fog is factored in the scene.</p>
  4457. </td>
  4458. </tr>
  4459. </tbody>
  4460. </table>
  4461. </div>
  4462. <h3 class="name name-method" id="fract" translate="no">.<a href="#fract">fract</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  4463. <div class="method">
  4464. <div class="description">
  4465. <p>Computes the fractional part of the parameter.</p>
  4466. </div>
  4467. <table class="params">
  4468. <tbody>
  4469. <tr>
  4470. <td class="name">
  4471. <strong>x</strong>
  4472. </td>
  4473. <td class="description last">
  4474. <p>The parameter.</p>
  4475. </td>
  4476. </tr>
  4477. </tbody>
  4478. </table>
  4479. </div>
  4480. <h3 class="name name-method" id="fwidth" translate="no">.<a href="#fwidth">fwidth</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  4481. <div class="method">
  4482. <div class="description">
  4483. <p>Returns the sum of the absolute derivatives in x and y.</p>
  4484. </div>
  4485. <table class="params">
  4486. <tbody>
  4487. <tr>
  4488. <td class="name">
  4489. <strong>x</strong>
  4490. </td>
  4491. <td class="description last">
  4492. <p>The parameter.</p>
  4493. </td>
  4494. </tr>
  4495. </tbody>
  4496. </table>
  4497. </div>
  4498. <h3 class="name name-method" id="fxaa" translate="no">.<a href="#fxaa">fxaa</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span> )</span><span class="type-signature"> : <a href="FXAANode.html">FXAANode</a></span> </h3>
  4499. <div class="method">
  4500. <div class="description">
  4501. <p>TSL function for creating a FXAA node for anti-aliasing via post processing.</p>
  4502. </div>
  4503. <table class="params">
  4504. <tbody>
  4505. <tr>
  4506. <td class="name">
  4507. <strong>node</strong>
  4508. </td>
  4509. <td class="description last">
  4510. <p>The node that represents the input of the effect.</p>
  4511. </td>
  4512. </tr>
  4513. </tbody>
  4514. </table>
  4515. </div>
  4516. <h3 class="name name-method" id="gain" translate="no">.<a href="#gain">gain</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, k : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  4517. <div class="method">
  4518. <div class="description">
  4519. <p>A function that remaps the <code>[0,1]</code> interval into the <code>[0,1]</code> interval.
  4520. Expands the sides and compresses the center, and keeps <code>0.5</code> mapped to <code>0.5</code>.
  4521. Reference: <a href="https://iquilezles.org/articles/functions/" target="_blank" rel="noopener">https://iquilezles.org/articles/functions/</a>.</p>
  4522. </div>
  4523. <table class="params">
  4524. <tbody>
  4525. <tr>
  4526. <td class="name">
  4527. <strong>x</strong>
  4528. </td>
  4529. <td class="description last">
  4530. <p>The value to remap.</p>
  4531. </td>
  4532. </tr>
  4533. <tr>
  4534. <td class="name">
  4535. <strong>k</strong>
  4536. </td>
  4537. <td class="description last">
  4538. <p><code>k=1</code> is the identity curve,<code>k&lt;1</code> produces the classic <code>gain()</code> shape, and <code>k&gt;1</code> produces &quot;s&quot; shaped curves.</p>
  4539. </td>
  4540. </tr>
  4541. </tbody>
  4542. </table>
  4543. <dl class="details">
  4544. <dt class="tag-returns"><strong>Returns:</strong> The remapped value.</dt>
  4545. </dl>
  4546. </div>
  4547. <h3 class="name name-method" id="gaussianBlur" translate="no">.<a href="#gaussianBlur">gaussianBlur</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, directionNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|float)></span>, sigma : <span class="param-type">number</span>, options : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="GaussianBlurNode.html">GaussianBlurNode</a></span> </h3>
  4548. <div class="method">
  4549. <div class="description">
  4550. <p>TSL function for creating a gaussian blur node for post processing.</p>
  4551. </div>
  4552. <table class="params">
  4553. <tbody>
  4554. <tr>
  4555. <td class="name">
  4556. <strong>node</strong>
  4557. </td>
  4558. <td class="description last">
  4559. <p>The node that represents the input of the effect.</p>
  4560. </td>
  4561. </tr>
  4562. <tr>
  4563. <td class="name">
  4564. <strong>directionNode</strong>
  4565. </td>
  4566. <td class="description last">
  4567. <p>Defines the direction and radius of the blur.</p>
  4568. </td>
  4569. </tr>
  4570. <tr>
  4571. <td class="name">
  4572. <strong>sigma</strong>
  4573. </td>
  4574. <td class="description last">
  4575. <p>Controls the kernel of the blur filter. Higher values mean a wider blur radius.</p>
  4576. </td>
  4577. </tr>
  4578. <tr>
  4579. <td class="name">
  4580. <strong>options</strong>
  4581. </td>
  4582. <td class="description last">
  4583. <p>Additional options for the gaussian blur effect.</p>
  4584. <p>Default is <code>{}</code>.</p>
  4585. <table class="params">
  4586. <tbody>
  4587. <tr>
  4588. <td class="name">
  4589. <strong>premultipliedAlpha</strong>
  4590. </td>
  4591. <td class="description last">
  4592. <p>Whether to use premultiplied alpha for the blur effect.</p>
  4593. <p>Default is <code>false</code>.</p>
  4594. </td>
  4595. </tr>
  4596. <tr>
  4597. <td class="name">
  4598. <strong>resolutionScale</strong>
  4599. </td>
  4600. <td class="description last">
  4601. <p>The resolution of the effect. 0.5 means half the resolution of the texture node.</p>
  4602. <p>Default is <code>1</code>.</p>
  4603. </td>
  4604. </tr>
  4605. </tbody>
  4606. </table>
  4607. </td>
  4608. </tr>
  4609. </tbody>
  4610. </table>
  4611. </div>
  4612. <h3 class="name name-method" id="getNormalFromDepth" translate="no">.<a href="#getNormalFromDepth">getNormalFromDepth</a><span class="signature">( uv : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, depthTexture : <span class="param-type"><a href="DepthTexture.html">DepthTexture</a></span>, projectionMatrixInverse : <span class="param-type"><a href="Node.html">Node</a>.&lt;mat4></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  4613. <div class="method">
  4614. <div class="description">
  4615. <p>Computes a normal vector based on depth data. Can be used as a fallback when no normal render
  4616. target is available or if flat surface normals are required.</p>
  4617. </div>
  4618. <table class="params">
  4619. <tbody>
  4620. <tr>
  4621. <td class="name">
  4622. <strong>uv</strong>
  4623. </td>
  4624. <td class="description last">
  4625. <p>The texture coordinate.</p>
  4626. </td>
  4627. </tr>
  4628. <tr>
  4629. <td class="name">
  4630. <strong>depthTexture</strong>
  4631. </td>
  4632. <td class="description last">
  4633. <p>The depth texture.</p>
  4634. </td>
  4635. </tr>
  4636. <tr>
  4637. <td class="name">
  4638. <strong>projectionMatrixInverse</strong>
  4639. </td>
  4640. <td class="description last">
  4641. <p>The camera's inverse projection matrix.</p>
  4642. </td>
  4643. </tr>
  4644. </tbody>
  4645. </table>
  4646. <dl class="details">
  4647. <dt class="tag-returns"><strong>Returns:</strong> The computed normal vector.</dt>
  4648. </dl>
  4649. </div>
  4650. <h3 class="name name-method" id="getParallaxCorrectNormal" translate="no">.<a href="#getParallaxCorrectNormal">getParallaxCorrectNormal</a><span class="signature">( normal : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, cubeSize : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, cubePos : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  4651. <div class="method">
  4652. <div class="description">
  4653. <p>This computes a parallax corrected normal which is used for box-projected cube mapping (BPCEM).</p>
  4654. <p>Reference: <a href="https://devlog-martinsh.blogspot.com/2011/09/box-projected-cube-environment-mapping.html" target="_blank" rel="noopener">https://devlog-martinsh.blogspot.com/2011/09/box-projected-cube-environment-mapping.html</a></p>
  4655. <pre><code class="language-js">const uvNode = getParallaxCorrectNormal( reflectVector, vec3( 200, 100, 100 ), vec3( 0, - 50, 0 ) );
  4656. material.envNode = pmremTexture( renderTarget.texture, uvNode );
  4657. </code></pre>
  4658. </div>
  4659. <table class="params">
  4660. <tbody>
  4661. <tr>
  4662. <td class="name">
  4663. <strong>normal</strong>
  4664. </td>
  4665. <td class="description last">
  4666. <p>The normal to correct.</p>
  4667. </td>
  4668. </tr>
  4669. <tr>
  4670. <td class="name">
  4671. <strong>cubeSize</strong>
  4672. </td>
  4673. <td class="description last">
  4674. <p>The cube size should reflect the size of the environment (BPCEM is usually applied in closed environments like rooms).</p>
  4675. </td>
  4676. </tr>
  4677. <tr>
  4678. <td class="name">
  4679. <strong>cubePos</strong>
  4680. </td>
  4681. <td class="description last">
  4682. <p>The cube position.</p>
  4683. </td>
  4684. </tr>
  4685. </tbody>
  4686. </table>
  4687. <dl class="details">
  4688. <dt class="tag-returns"><strong>Returns:</strong> The parallax corrected normal.</dt>
  4689. </dl>
  4690. </div>
  4691. <h3 class="name name-method" id="getScreenPosition" translate="no">.<a href="#getScreenPosition">getScreenPosition</a><span class="signature">( viewPosition : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, projectionMatrix : <span class="param-type"><a href="Node.html">Node</a>.&lt;mat4></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> </h3>
  4692. <div class="method">
  4693. <div class="description">
  4694. <p>Computes a screen position expressed as uv coordinates based on a fragment's position in view space
  4695. and the camera's projection matrix</p>
  4696. </div>
  4697. <table class="params">
  4698. <tbody>
  4699. <tr>
  4700. <td class="name">
  4701. <strong>viewPosition</strong>
  4702. </td>
  4703. <td class="description last">
  4704. <p>The fragments position in view space.</p>
  4705. </td>
  4706. </tr>
  4707. <tr>
  4708. <td class="name">
  4709. <strong>projectionMatrix</strong>
  4710. </td>
  4711. <td class="description last">
  4712. <p>The camera's projection matrix.</p>
  4713. </td>
  4714. </tr>
  4715. </tbody>
  4716. </table>
  4717. <dl class="details">
  4718. <dt class="tag-returns"><strong>Returns:</strong> The fragment's screen position expressed as uv coordinates.</dt>
  4719. </dl>
  4720. </div>
  4721. <h3 class="name name-method" id="getShadowMaterial" translate="no">.<a href="#getShadowMaterial">getShadowMaterial</a><span class="signature">( light : <span class="param-type"><a href="Light.html">Light</a></span> )</span><span class="type-signature"> : <a href="NodeMaterial.html">NodeMaterial</a></span> </h3>
  4722. <div class="method">
  4723. <div class="description">
  4724. <p>Retrieves or creates a shadow material for the given light source.</p>
  4725. <p>This function checks if a shadow material already exists for the provided light.
  4726. If not, it creates a new <code>NodeMaterial</code> configured for shadow rendering and stores it
  4727. in the <code>shadowMaterialLib</code> for future use.</p>
  4728. </div>
  4729. <table class="params">
  4730. <tbody>
  4731. <tr>
  4732. <td class="name">
  4733. <strong>light</strong>
  4734. </td>
  4735. <td class="description last">
  4736. <p>The light source for which the shadow material is needed.
  4737. If the light is a point light, a depth node is calculated
  4738. using the linear shadow distance.</p>
  4739. </td>
  4740. </tr>
  4741. </tbody>
  4742. </table>
  4743. <dl class="details">
  4744. <dt class="tag-returns"><strong>Returns:</strong> The shadow material associated with the given light.</dt>
  4745. </dl>
  4746. </div>
  4747. <h3 class="name name-method" id="getShadowRenderObjectFunction" translate="no">.<a href="#getShadowRenderObjectFunction">getShadowRenderObjectFunction</a><span class="signature">( renderer : <span class="param-type"><a href="Renderer.html">Renderer</a></span>, shadow : <span class="param-type"><a href="LightShadow.html">LightShadow</a></span>, shadowType : <span class="param-type">number</span>, useVelocity : <span class="param-type">boolean</span> )</span><span class="type-signature"> : <a href="global.html#shadowRenderObjectFunction">shadowRenderObjectFunction</a></span> </h3>
  4748. <div class="method">
  4749. <div class="description">
  4750. <p>Creates a function to render shadow objects in a scene.</p>
  4751. </div>
  4752. <table class="params">
  4753. <tbody>
  4754. <tr>
  4755. <td class="name">
  4756. <strong>renderer</strong>
  4757. </td>
  4758. <td class="description last">
  4759. <p>The renderer.</p>
  4760. </td>
  4761. </tr>
  4762. <tr>
  4763. <td class="name">
  4764. <strong>shadow</strong>
  4765. </td>
  4766. <td class="description last">
  4767. <p>The light shadow object containing shadow properties.</p>
  4768. </td>
  4769. </tr>
  4770. <tr>
  4771. <td class="name">
  4772. <strong>shadowType</strong>
  4773. </td>
  4774. <td class="description last">
  4775. <p>The type of shadow map (e.g., BasicShadowMap).</p>
  4776. </td>
  4777. </tr>
  4778. <tr>
  4779. <td class="name">
  4780. <strong>useVelocity</strong>
  4781. </td>
  4782. <td class="description last">
  4783. <p>Whether to use velocity data for rendering.</p>
  4784. </td>
  4785. </tr>
  4786. </tbody>
  4787. </table>
  4788. <dl class="details">
  4789. <dt class="tag-returns"><strong>Returns:</strong> A function that renders shadow objects.</dt>
  4790. </dl>
  4791. </div>
  4792. <h3 class="name name-method" id="getViewPosition" translate="no">.<a href="#getViewPosition">getViewPosition</a><span class="signature">( screenPosition : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, depth : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, projectionMatrixInverse : <span class="param-type"><a href="Node.html">Node</a>.&lt;mat4></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  4793. <div class="method">
  4794. <div class="description">
  4795. <p>Computes a position in view space based on a fragment's screen position expressed as uv coordinates, the fragments
  4796. depth value and the camera's inverse projection matrix.</p>
  4797. </div>
  4798. <table class="params">
  4799. <tbody>
  4800. <tr>
  4801. <td class="name">
  4802. <strong>screenPosition</strong>
  4803. </td>
  4804. <td class="description last">
  4805. <p>The fragment's screen position expressed as uv coordinates.</p>
  4806. </td>
  4807. </tr>
  4808. <tr>
  4809. <td class="name">
  4810. <strong>depth</strong>
  4811. </td>
  4812. <td class="description last">
  4813. <p>The fragment's depth value.</p>
  4814. </td>
  4815. </tr>
  4816. <tr>
  4817. <td class="name">
  4818. <strong>projectionMatrixInverse</strong>
  4819. </td>
  4820. <td class="description last">
  4821. <p>The camera's inverse projection matrix.</p>
  4822. </td>
  4823. </tr>
  4824. </tbody>
  4825. </table>
  4826. <dl class="details">
  4827. <dt class="tag-returns"><strong>Returns:</strong> The fragments position in view space.</dt>
  4828. </dl>
  4829. </div>
  4830. <h3 class="name name-method" id="glsl" translate="no">.<a href="#glsl">glsl</a><span class="signature">( src : <span class="param-type">string</span>, includes : <span class="param-type">Array.&lt;<a href="Node.html">Node</a>></span> )</span><span class="type-signature"> : <a href="CodeNode.html">CodeNode</a></span> </h3>
  4831. <div class="method">
  4832. <div class="description">
  4833. <p>TSL function for creating a GLSL code node.</p>
  4834. </div>
  4835. <table class="params">
  4836. <tbody>
  4837. <tr>
  4838. <td class="name">
  4839. <strong>src</strong>
  4840. </td>
  4841. <td class="description last">
  4842. <p>The native code.</p>
  4843. </td>
  4844. </tr>
  4845. <tr>
  4846. <td class="name">
  4847. <strong>includes</strong>
  4848. </td>
  4849. <td class="description last">
  4850. <p>An array of includes.</p>
  4851. </td>
  4852. </tr>
  4853. </tbody>
  4854. </table>
  4855. </div>
  4856. <h3 class="name name-method" id="grayscale" translate="no">.<a href="#grayscale">grayscale</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  4857. <div class="method">
  4858. <div class="description">
  4859. <p>Computes a grayscale value for the given RGB color value.</p>
  4860. </div>
  4861. <table class="params">
  4862. <tbody>
  4863. <tr>
  4864. <td class="name">
  4865. <strong>color</strong>
  4866. </td>
  4867. <td class="description last">
  4868. <p>The color value to compute the grayscale for.</p>
  4869. </td>
  4870. </tr>
  4871. </tbody>
  4872. </table>
  4873. <dl class="details">
  4874. <dt class="tag-returns"><strong>Returns:</strong> The grayscale color.</dt>
  4875. </dl>
  4876. </div>
  4877. <h3 class="name name-method" id="greaterThan" translate="no">.<a href="#greaterThan">greaterThan</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  4878. <div class="method">
  4879. <div class="description">
  4880. <p>Checks if the first node is greater than the second.</p>
  4881. </div>
  4882. <table class="params">
  4883. <tbody>
  4884. <tr>
  4885. <td class="name">
  4886. <strong>a</strong>
  4887. </td>
  4888. <td class="description last">
  4889. <p>The first input.</p>
  4890. </td>
  4891. </tr>
  4892. <tr>
  4893. <td class="name">
  4894. <strong>b</strong>
  4895. </td>
  4896. <td class="description last">
  4897. <p>The second input.</p>
  4898. </td>
  4899. </tr>
  4900. </tbody>
  4901. </table>
  4902. </div>
  4903. <h3 class="name name-method" id="greaterThanEqual" translate="no">.<a href="#greaterThanEqual">greaterThanEqual</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  4904. <div class="method">
  4905. <div class="description">
  4906. <p>Checks if the first node is greater than or equal to the second.</p>
  4907. </div>
  4908. <table class="params">
  4909. <tbody>
  4910. <tr>
  4911. <td class="name">
  4912. <strong>a</strong>
  4913. </td>
  4914. <td class="description last">
  4915. <p>The first input.</p>
  4916. </td>
  4917. </tr>
  4918. <tr>
  4919. <td class="name">
  4920. <strong>b</strong>
  4921. </td>
  4922. <td class="description last">
  4923. <p>The second input.</p>
  4924. </td>
  4925. </tr>
  4926. </tbody>
  4927. </table>
  4928. </div>
  4929. <h3 class="name name-method" id="hardwareClipping" translate="no">.<a href="#hardwareClipping">hardwareClipping</a><span class="signature">()</span><span class="type-signature"> : <a href="ClippingNode.html">ClippingNode</a></span> </h3>
  4930. <div class="method">
  4931. <div class="description">
  4932. <p>TSL function for setting up hardware-based clipping.</p>
  4933. </div>
  4934. </div>
  4935. <h3 class="name name-method" id="hash" translate="no">.<a href="#hash">hash</a><span class="signature">( seed : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  4936. <div class="method">
  4937. <div class="description">
  4938. <p>Generates a hash value in the range <code>[0, 1]</code> from the given seed.</p>
  4939. </div>
  4940. <table class="params">
  4941. <tbody>
  4942. <tr>
  4943. <td class="name">
  4944. <strong>seed</strong>
  4945. </td>
  4946. <td class="description last">
  4947. <p>The seed.</p>
  4948. </td>
  4949. </tr>
  4950. </tbody>
  4951. </table>
  4952. <dl class="details">
  4953. <dt class="tag-returns"><strong>Returns:</strong> The hash value.</dt>
  4954. </dl>
  4955. </div>
  4956. <h3 class="name name-method" id="hashBlur" translate="no">.<a href="#hashBlur">hashBlur</a><span class="signature">( textureNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, bluramount : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, options : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  4957. <div class="method">
  4958. <div class="description">
  4959. <p>Applies a hash blur effect to the given texture node.</p>
  4960. <p>The approach of this blur is different compared to Gaussian and box blur since
  4961. it does not rely on a kernel to apply a convolution. Instead, it reads the base
  4962. texture multiple times in a random pattern and then averages the samples. A
  4963. typical artifact of this technique is a slightly noisy appearance of the blur which
  4964. can be mitigated by increasing the number of iterations (see <code>repeats</code> parameter).
  4965. Compared to Gaussian blur, hash blur requires just a single pass.</p>
  4966. <p>Reference: <a href="https://www.shadertoy.com/view/4lXXWn" target="_blank" rel="noopener">https://www.shadertoy.com/view/4lXXWn</a>.</p>
  4967. </div>
  4968. <table class="params">
  4969. <tbody>
  4970. <tr>
  4971. <td class="name">
  4972. <strong>textureNode</strong>
  4973. </td>
  4974. <td class="description last">
  4975. <p>The texture node that should be blurred.</p>
  4976. </td>
  4977. </tr>
  4978. <tr>
  4979. <td class="name">
  4980. <strong>bluramount</strong>
  4981. </td>
  4982. <td class="description last">
  4983. <p>This node determines the amount of blur.</p>
  4984. <p>Default is <code>float(0.1)</code>.</p>
  4985. </td>
  4986. </tr>
  4987. <tr>
  4988. <td class="name">
  4989. <strong>options</strong>
  4990. </td>
  4991. <td class="description last">
  4992. <p>Additional options for the hash blur effect.</p>
  4993. <p>Default is <code>{}</code>.</p>
  4994. <table class="params">
  4995. <tbody>
  4996. <tr>
  4997. <td class="name">
  4998. <strong>repeats</strong>
  4999. </td>
  5000. <td class="description last">
  5001. <p>The number of iterations for the blur effect.</p>
  5002. <p>Default is <code>float(45)</code>.</p>
  5003. </td>
  5004. </tr>
  5005. <tr>
  5006. <td class="name">
  5007. <strong>premultipliedAlpha</strong>
  5008. </td>
  5009. <td class="description last">
  5010. <p>Whether to use premultiplied alpha for the blur effect.</p>
  5011. <p>Default is <code>false</code>.</p>
  5012. </td>
  5013. </tr>
  5014. </tbody>
  5015. </table>
  5016. </td>
  5017. </tr>
  5018. </tbody>
  5019. </table>
  5020. <dl class="details">
  5021. <dt class="tag-returns"><strong>Returns:</strong> The blurred texture node.</dt>
  5022. </dl>
  5023. </div>
  5024. <h3 class="name name-method" id="hue" translate="no">.<a href="#hue">hue</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, adjustment : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  5025. <div class="method">
  5026. <div class="description">
  5027. <p>Updates the hue component of the given RGB color while preserving its luminance and saturation.</p>
  5028. </div>
  5029. <table class="params">
  5030. <tbody>
  5031. <tr>
  5032. <td class="name">
  5033. <strong>color</strong>
  5034. </td>
  5035. <td class="description last">
  5036. <p>The input color.</p>
  5037. </td>
  5038. </tr>
  5039. <tr>
  5040. <td class="name">
  5041. <strong>adjustment</strong>
  5042. </td>
  5043. <td class="description last">
  5044. <p>Defines the degree of hue rotation in radians. A positive value rotates the hue clockwise, while a negative value rotates it counterclockwise.</p>
  5045. <p>Default is <code>1</code>.</p>
  5046. </td>
  5047. </tr>
  5048. </tbody>
  5049. </table>
  5050. <dl class="details">
  5051. <dt class="tag-returns"><strong>Returns:</strong> The updated color.</dt>
  5052. </dl>
  5053. </div>
  5054. <h3 class="name name-method" id="increment" translate="no">.<a href="#increment">increment</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  5055. <div class="method">
  5056. <div class="description">
  5057. <p>Increments a node by 1 and returns the previous value.</p>
  5058. </div>
  5059. <table class="params">
  5060. <tbody>
  5061. <tr>
  5062. <td class="name">
  5063. <strong>a</strong>
  5064. </td>
  5065. <td class="description last">
  5066. <p>The node to increment.</p>
  5067. </td>
  5068. </tr>
  5069. </tbody>
  5070. </table>
  5071. </div>
  5072. <h3 class="name name-method" id="incrementBefore" translate="no">.<a href="#incrementBefore">incrementBefore</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  5073. <div class="method">
  5074. <div class="description">
  5075. <p>Increments a node by 1.</p>
  5076. </div>
  5077. <table class="params">
  5078. <tbody>
  5079. <tr>
  5080. <td class="name">
  5081. <strong>a</strong>
  5082. </td>
  5083. <td class="description last">
  5084. <p>The node to increment.</p>
  5085. </td>
  5086. </tr>
  5087. </tbody>
  5088. </table>
  5089. </div>
  5090. <h3 class="name name-method" id="inspector" translate="no">.<a href="#inspector">inspector</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span>, callback : <span class="param-type">function | null</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  5091. <div class="method">
  5092. <div class="description">
  5093. <p>Creates an inspector node to wrap around a given node for inspection purposes.</p>
  5094. </div>
  5095. <table class="params">
  5096. <tbody>
  5097. <tr>
  5098. <td class="name">
  5099. <strong>node</strong>
  5100. </td>
  5101. <td class="description last">
  5102. <p>The node to inspect.</p>
  5103. </td>
  5104. </tr>
  5105. <tr>
  5106. <td class="name">
  5107. <strong>name</strong>
  5108. </td>
  5109. <td class="description last">
  5110. <p>Optional name for the inspector node.</p>
  5111. <p>Default is <code>''</code>.</p>
  5112. </td>
  5113. </tr>
  5114. <tr>
  5115. <td class="name">
  5116. <strong>callback</strong>
  5117. </td>
  5118. <td class="description last">
  5119. <p>Optional callback to modify the node during setup.</p>
  5120. <p>Default is <code>null</code>.</p>
  5121. </td>
  5122. </tr>
  5123. </tbody>
  5124. </table>
  5125. <dl class="details">
  5126. <dt class="tag-returns"><strong>Returns:</strong> The inspector node.</dt>
  5127. </dl>
  5128. </div>
  5129. <h3 class="name name-method" id="instance" translate="no">.<a href="#instance">instance</a><span class="signature">( count : <span class="param-type">number</span>, instanceMatrix : <span class="param-type"><a href="InstancedBufferAttribute.html">InstancedBufferAttribute</a> | <a href="StorageInstancedBufferAttribute.html">StorageInstancedBufferAttribute</a></span>, instanceColor : <span class="param-type"><a href="InstancedBufferAttribute.html">InstancedBufferAttribute</a> | <a href="StorageInstancedBufferAttribute.html">StorageInstancedBufferAttribute</a></span> )</span><span class="type-signature"> : <a href="InstanceNode.html">InstanceNode</a></span> </h3>
  5130. <div class="method">
  5131. <div class="description">
  5132. <p>TSL function for creating an instance node.</p>
  5133. </div>
  5134. <table class="params">
  5135. <tbody>
  5136. <tr>
  5137. <td class="name">
  5138. <strong>count</strong>
  5139. </td>
  5140. <td class="description last">
  5141. <p>The number of instances.</p>
  5142. </td>
  5143. </tr>
  5144. <tr>
  5145. <td class="name">
  5146. <strong>instanceMatrix</strong>
  5147. </td>
  5148. <td class="description last">
  5149. <p>Instanced buffer attribute representing the instance transformations.</p>
  5150. </td>
  5151. </tr>
  5152. <tr>
  5153. <td class="name">
  5154. <strong>instanceColor</strong>
  5155. </td>
  5156. <td class="description last">
  5157. <p>Instanced buffer attribute representing the instance colors.</p>
  5158. </td>
  5159. </tr>
  5160. </tbody>
  5161. </table>
  5162. </div>
  5163. <h3 class="name name-method" id="instancedArray" translate="no">.<a href="#instancedArray">instancedArray</a><span class="signature">( count : <span class="param-type">number | TypedArray</span>, type : <span class="param-type">string | Struct</span> )</span><span class="type-signature"> : <a href="StorageBufferNode.html">StorageBufferNode</a></span> </h3>
  5164. <div class="method">
  5165. <div class="description">
  5166. <p>TSL function for creating a storage buffer node with a configured <code>StorageInstancedBufferAttribute</code>.</p>
  5167. </div>
  5168. <table class="params">
  5169. <tbody>
  5170. <tr>
  5171. <td class="name">
  5172. <strong>count</strong>
  5173. </td>
  5174. <td class="description last">
  5175. <p>The data count. It is also valid to pass a typed array as an argument.</p>
  5176. </td>
  5177. </tr>
  5178. <tr>
  5179. <td class="name">
  5180. <strong>type</strong>
  5181. </td>
  5182. <td class="description last">
  5183. <p>The data type.</p>
  5184. <p>Default is <code>'float'</code>.</p>
  5185. </td>
  5186. </tr>
  5187. </tbody>
  5188. </table>
  5189. </div>
  5190. <h3 class="name name-method" id="instancedBufferAttribute" translate="no">.<a href="#instancedBufferAttribute">instancedBufferAttribute</a><span class="signature">( array : <span class="param-type"><a href="BufferAttribute.html">BufferAttribute</a> | <a href="InterleavedBuffer.html">InterleavedBuffer</a> | TypedArray</span>, type : <span class="param-type">string</span>, stride : <span class="param-type">number</span>, offset : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="BufferAttributeNode.html">BufferAttributeNode</a> | <a href="Node.html">Node</a></span> </h3>
  5191. <div class="method">
  5192. <div class="description">
  5193. <p>TSL function for creating a buffer attribute node but with enabled instancing</p>
  5194. </div>
  5195. <table class="params">
  5196. <tbody>
  5197. <tr>
  5198. <td class="name">
  5199. <strong>array</strong>
  5200. </td>
  5201. <td class="description last">
  5202. <p>The attribute data.</p>
  5203. </td>
  5204. </tr>
  5205. <tr>
  5206. <td class="name">
  5207. <strong>type</strong>
  5208. </td>
  5209. <td class="description last">
  5210. <p>The buffer type (e.g. <code>'vec3'</code>).</p>
  5211. <p>Default is <code>null</code>.</p>
  5212. </td>
  5213. </tr>
  5214. <tr>
  5215. <td class="name">
  5216. <strong>stride</strong>
  5217. </td>
  5218. <td class="description last">
  5219. <p>The buffer stride.</p>
  5220. <p>Default is <code>0</code>.</p>
  5221. </td>
  5222. </tr>
  5223. <tr>
  5224. <td class="name">
  5225. <strong>offset</strong>
  5226. </td>
  5227. <td class="description last">
  5228. <p>The buffer offset.</p>
  5229. <p>Default is <code>0</code>.</p>
  5230. </td>
  5231. </tr>
  5232. </tbody>
  5233. </table>
  5234. </div>
  5235. <h3 class="name name-method" id="instancedDynamicBufferAttribute" translate="no">.<a href="#instancedDynamicBufferAttribute">instancedDynamicBufferAttribute</a><span class="signature">( array : <span class="param-type"><a href="BufferAttribute.html">BufferAttribute</a> | <a href="InterleavedBuffer.html">InterleavedBuffer</a> | TypedArray</span>, type : <span class="param-type">string</span>, stride : <span class="param-type">number</span>, offset : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="BufferAttributeNode.html">BufferAttributeNode</a> | <a href="Node.html">Node</a></span> </h3>
  5236. <div class="method">
  5237. <div class="description">
  5238. <p>TSL function for creating a buffer attribute node but with dynamic draw usage and enabled instancing</p>
  5239. </div>
  5240. <table class="params">
  5241. <tbody>
  5242. <tr>
  5243. <td class="name">
  5244. <strong>array</strong>
  5245. </td>
  5246. <td class="description last">
  5247. <p>The attribute data.</p>
  5248. </td>
  5249. </tr>
  5250. <tr>
  5251. <td class="name">
  5252. <strong>type</strong>
  5253. </td>
  5254. <td class="description last">
  5255. <p>The buffer type (e.g. <code>'vec3'</code>).</p>
  5256. <p>Default is <code>null</code>.</p>
  5257. </td>
  5258. </tr>
  5259. <tr>
  5260. <td class="name">
  5261. <strong>stride</strong>
  5262. </td>
  5263. <td class="description last">
  5264. <p>The buffer stride.</p>
  5265. <p>Default is <code>0</code>.</p>
  5266. </td>
  5267. </tr>
  5268. <tr>
  5269. <td class="name">
  5270. <strong>offset</strong>
  5271. </td>
  5272. <td class="description last">
  5273. <p>The buffer offset.</p>
  5274. <p>Default is <code>0</code>.</p>
  5275. </td>
  5276. </tr>
  5277. </tbody>
  5278. </table>
  5279. </div>
  5280. <h3 class="name name-method" id="instancedMesh" translate="no">.<a href="#instancedMesh">instancedMesh</a><span class="signature">( instancedMesh : <span class="param-type"><a href="InstancedMesh.html">InstancedMesh</a></span> )</span><span class="type-signature"> : <a href="InstancedMeshNode.html">InstancedMeshNode</a></span> </h3>
  5281. <div class="method">
  5282. <div class="description">
  5283. <p>TSL function for creating an instanced mesh node.</p>
  5284. </div>
  5285. <table class="params">
  5286. <tbody>
  5287. <tr>
  5288. <td class="name">
  5289. <strong>instancedMesh</strong>
  5290. </td>
  5291. <td class="description last">
  5292. <p>The instancedMesh.</p>
  5293. </td>
  5294. </tr>
  5295. </tbody>
  5296. </table>
  5297. </div>
  5298. <h3 class="name name-method" id="intBitsToFloat" translate="no">.<a href="#intBitsToFloat">intBitsToFloat</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span> )</span><span class="type-signature"> : <a href="BitcastNode.html">BitcastNode</a></span> </h3>
  5299. <div class="method">
  5300. <div class="description">
  5301. <p>Bitcasts an integer or a vector of integers to a corresponding float type with the same element size.</p>
  5302. </div>
  5303. <table class="params">
  5304. <tbody>
  5305. <tr>
  5306. <td class="name">
  5307. <strong>value</strong>
  5308. </td>
  5309. <td class="description last">
  5310. <p>The integer or vector of integers to bitcast.</p>
  5311. </td>
  5312. </tr>
  5313. </tbody>
  5314. </table>
  5315. </div>
  5316. <h3 class="name name-method" id="interleavedGradientNoise" translate="no">.<a href="#interleavedGradientNoise">interleavedGradientNoise</a><span class="signature">( position : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  5317. <div class="method">
  5318. <div class="description">
  5319. <p>Interleaved Gradient Noise (IGN) from Jimenez 2014.</p>
  5320. <p>IGN has &quot;low discrepancy&quot; resulting in evenly distributed samples. It's superior compared to
  5321. default white noise, blue noise or Bayer.</p>
  5322. <p>References:</p>
  5323. <ul>
  5324. <li><a href="https://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare/" target="_blank" rel="noopener">https://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare/</a></li>
  5325. <li><a href="https://blog.demofox.org/2022/01/01/interleaved-gradient-noise-a-different-kind-of-low-discrepancy-sequence/" target="_blank" rel="noopener">https://blog.demofox.org/2022/01/01/interleaved-gradient-noise-a-different-kind-of-low-discrepancy-sequence/</a></li>
  5326. </ul>
  5327. </div>
  5328. <table class="params">
  5329. <tbody>
  5330. <tr>
  5331. <td class="name">
  5332. <strong>position</strong>
  5333. </td>
  5334. <td class="description last">
  5335. <p>The input position, usually screen coordinates.</p>
  5336. </td>
  5337. </tr>
  5338. </tbody>
  5339. </table>
  5340. <dl class="details">
  5341. <dt class="tag-returns"><strong>Returns:</strong> The noise value.</dt>
  5342. </dl>
  5343. </div>
  5344. <h3 class="name name-method" id="inverse" translate="no">.<a href="#inverse">inverse</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;(mat2|mat3|mat4)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;(mat2|mat3|mat4)></span> </h3>
  5345. <div class="method">
  5346. <div class="description">
  5347. <p>Returns the inverse of a matrix.</p>
  5348. </div>
  5349. <table class="params">
  5350. <tbody>
  5351. <tr>
  5352. <td class="name">
  5353. <strong>x</strong>
  5354. </td>
  5355. <td class="description last">
  5356. <p>The parameter.</p>
  5357. </td>
  5358. </tr>
  5359. </tbody>
  5360. </table>
  5361. </div>
  5362. <h3 class="name name-method" id="inverseSqrt" translate="no">.<a href="#inverseSqrt">inverseSqrt</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  5363. <div class="method">
  5364. <div class="description">
  5365. <p>Returns the inverse of the square root of the parameter.</p>
  5366. </div>
  5367. <table class="params">
  5368. <tbody>
  5369. <tr>
  5370. <td class="name">
  5371. <strong>x</strong>
  5372. </td>
  5373. <td class="description last">
  5374. <p>The parameter.</p>
  5375. </td>
  5376. </tr>
  5377. </tbody>
  5378. </table>
  5379. </div>
  5380. <h3 class="name name-method" id="isolate" translate="no">.<a href="#isolate">isolate</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="IsolateNode.html">IsolateNode</a></span> </h3>
  5381. <div class="method">
  5382. <div class="description">
  5383. <p>TSL function for creating a cache node.</p>
  5384. </div>
  5385. <table class="params">
  5386. <tbody>
  5387. <tr>
  5388. <td class="name">
  5389. <strong>node</strong>
  5390. </td>
  5391. <td class="description last">
  5392. <p>The node that should be cached.</p>
  5393. </td>
  5394. </tr>
  5395. </tbody>
  5396. </table>
  5397. </div>
  5398. <h3 class="name name-method" id="js" translate="no">.<a href="#js">js</a><span class="signature">( src : <span class="param-type">string</span>, includes : <span class="param-type">Array.&lt;<a href="Node.html">Node</a>></span> )</span><span class="type-signature"> : <a href="CodeNode.html">CodeNode</a></span> </h3>
  5399. <div class="method">
  5400. <div class="description">
  5401. <p>TSL function for creating a JS code node.</p>
  5402. </div>
  5403. <table class="params">
  5404. <tbody>
  5405. <tr>
  5406. <td class="name">
  5407. <strong>src</strong>
  5408. </td>
  5409. <td class="description last">
  5410. <p>The native code.</p>
  5411. </td>
  5412. </tr>
  5413. <tr>
  5414. <td class="name">
  5415. <strong>includes</strong>
  5416. </td>
  5417. <td class="description last">
  5418. <p>An array of includes.</p>
  5419. </td>
  5420. </tr>
  5421. </tbody>
  5422. </table>
  5423. </div>
  5424. <h3 class="name name-method" id="label" translate="no">.<a href="#label">label</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="ContextNode.html">ContextNode</a></span> </h3>
  5425. <div class="method">
  5426. <div class="description">
  5427. <p>TSL function for defining a label context value for a given node.</p>
  5428. </div>
  5429. <table class="params">
  5430. <tbody>
  5431. <tr>
  5432. <td class="name">
  5433. <strong>node</strong>
  5434. </td>
  5435. <td class="description last">
  5436. <p>The node whose context should be modified.</p>
  5437. </td>
  5438. </tr>
  5439. <tr>
  5440. <td class="name">
  5441. <strong>name</strong>
  5442. </td>
  5443. <td class="description last">
  5444. <p>The name/label to set.</p>
  5445. </td>
  5446. </tr>
  5447. </tbody>
  5448. </table>
  5449. <dl class="details">
  5450. <dt class="important tag-deprecated"><strong>Deprecated:</strong> Yes</dt>
  5451. </dl>
  5452. </div>
  5453. <h3 class="name name-method" id="length" translate="no">.<a href="#length">length</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  5454. <div class="method">
  5455. <div class="description">
  5456. <p>Calculates the length of a vector.</p>
  5457. </div>
  5458. <table class="params">
  5459. <tbody>
  5460. <tr>
  5461. <td class="name">
  5462. <strong>x</strong>
  5463. </td>
  5464. <td class="description last">
  5465. <p>The parameter.</p>
  5466. </td>
  5467. </tr>
  5468. </tbody>
  5469. </table>
  5470. </div>
  5471. <h3 class="name name-method" id="lengthSq" translate="no">.<a href="#lengthSq">lengthSq</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  5472. <div class="method">
  5473. <div class="description">
  5474. <p>Calculate the squared length of a vector.</p>
  5475. </div>
  5476. <table class="params">
  5477. <tbody>
  5478. <tr>
  5479. <td class="name">
  5480. <strong>a</strong>
  5481. </td>
  5482. <td class="description last">
  5483. <p>The vector.</p>
  5484. </td>
  5485. </tr>
  5486. </tbody>
  5487. </table>
  5488. </div>
  5489. <h3 class="name name-method" id="lensflare" translate="no">.<a href="#lensflare">lensflare</a><span class="signature">( node : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, params : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="LensflareNode.html">LensflareNode</a></span> </h3>
  5490. <div class="method">
  5491. <div class="description">
  5492. <p>TSL function for creating a bloom-based lens flare effect.</p>
  5493. </div>
  5494. <table class="params">
  5495. <tbody>
  5496. <tr>
  5497. <td class="name">
  5498. <strong>node</strong>
  5499. </td>
  5500. <td class="description last">
  5501. <p>The node that represents the scene's bloom.</p>
  5502. </td>
  5503. </tr>
  5504. <tr>
  5505. <td class="name">
  5506. <strong>params</strong>
  5507. </td>
  5508. <td class="description last">
  5509. <p>The parameter object for configuring the effect.</p>
  5510. <table class="params">
  5511. <tbody>
  5512. <tr>
  5513. <td class="name">
  5514. <strong>ghostTint</strong>
  5515. </td>
  5516. <td class="description last">
  5517. <p>Defines the tint of the flare/ghosts.</p>
  5518. <p>Default is <code>vec3(1, 1, 1)</code>.</p>
  5519. </td>
  5520. </tr>
  5521. <tr>
  5522. <td class="name">
  5523. <strong>threshold</strong>
  5524. </td>
  5525. <td class="description last">
  5526. <p>Controls the size and strength of the effect. A higher threshold results in smaller flares.</p>
  5527. <p>Default is <code>float(0.5)</code>.</p>
  5528. </td>
  5529. </tr>
  5530. <tr>
  5531. <td class="name">
  5532. <strong>ghostSamples</strong>
  5533. </td>
  5534. <td class="description last">
  5535. <p>Represents the number of flares/ghosts per bright spot which pivot around the center.</p>
  5536. <p>Default is <code>float(4)</code>.</p>
  5537. </td>
  5538. </tr>
  5539. <tr>
  5540. <td class="name">
  5541. <strong>ghostSpacing</strong>
  5542. </td>
  5543. <td class="description last">
  5544. <p>Defines the spacing of the flares/ghosts.</p>
  5545. <p>Default is <code>float(0.25)</code>.</p>
  5546. </td>
  5547. </tr>
  5548. <tr>
  5549. <td class="name">
  5550. <strong>ghostAttenuationFactor</strong>
  5551. </td>
  5552. <td class="description last">
  5553. <p>Defines the attenuation factor of flares/ghosts.</p>
  5554. <p>Default is <code>float(25)</code>.</p>
  5555. </td>
  5556. </tr>
  5557. <tr>
  5558. <td class="name">
  5559. <strong>downSampleRatio</strong>
  5560. </td>
  5561. <td class="description last">
  5562. <p>Defines how downsampling since the effect is usually not rendered at full resolution.</p>
  5563. <p>Default is <code>4</code>.</p>
  5564. </td>
  5565. </tr>
  5566. </tbody>
  5567. </table>
  5568. </td>
  5569. </tr>
  5570. </tbody>
  5571. </table>
  5572. </div>
  5573. <h3 class="name name-method" id="lessThan" translate="no">.<a href="#lessThan">lessThan</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  5574. <div class="method">
  5575. <div class="description">
  5576. <p>Checks if the first node is less than the second.</p>
  5577. </div>
  5578. <table class="params">
  5579. <tbody>
  5580. <tr>
  5581. <td class="name">
  5582. <strong>a</strong>
  5583. </td>
  5584. <td class="description last">
  5585. <p>The first input.</p>
  5586. </td>
  5587. </tr>
  5588. <tr>
  5589. <td class="name">
  5590. <strong>b</strong>
  5591. </td>
  5592. <td class="description last">
  5593. <p>The second input.</p>
  5594. </td>
  5595. </tr>
  5596. </tbody>
  5597. </table>
  5598. </div>
  5599. <h3 class="name name-method" id="lessThanEqual" translate="no">.<a href="#lessThanEqual">lessThanEqual</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  5600. <div class="method">
  5601. <div class="description">
  5602. <p>Checks if the first node is less than or equal to the second.</p>
  5603. </div>
  5604. <table class="params">
  5605. <tbody>
  5606. <tr>
  5607. <td class="name">
  5608. <strong>a</strong>
  5609. </td>
  5610. <td class="description last">
  5611. <p>The first input.</p>
  5612. </td>
  5613. </tr>
  5614. <tr>
  5615. <td class="name">
  5616. <strong>b</strong>
  5617. </td>
  5618. <td class="description last">
  5619. <p>The second input.</p>
  5620. </td>
  5621. </tr>
  5622. </tbody>
  5623. </table>
  5624. </div>
  5625. <h3 class="name name-method" id="lightPosition" translate="no">.<a href="#lightPosition">lightPosition</a><span class="signature">( light : <span class="param-type"><a href="Light.html">Light</a></span> )</span><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;vec3></span> </h3>
  5626. <div class="method">
  5627. <div class="description">
  5628. <p>TSL function for getting the position in world space for the given light.</p>
  5629. </div>
  5630. <table class="params">
  5631. <tbody>
  5632. <tr>
  5633. <td class="name">
  5634. <strong>light</strong>
  5635. </td>
  5636. <td class="description last">
  5637. <p>The light source.</p>
  5638. </td>
  5639. </tr>
  5640. </tbody>
  5641. </table>
  5642. <dl class="details">
  5643. <dt class="tag-returns"><strong>Returns:</strong> The light's position in world space.</dt>
  5644. </dl>
  5645. </div>
  5646. <h3 class="name name-method" id="lightProjectionUV" translate="no">.<a href="#lightProjectionUV">lightProjectionUV</a><span class="signature">( light : <span class="param-type"><a href="Light.html">Light</a></span>, position : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  5647. <div class="method">
  5648. <div class="description">
  5649. <p>TSL function for getting projected uv coordinates for the given light.
  5650. Relevant when using maps with spot lights.</p>
  5651. </div>
  5652. <table class="params">
  5653. <tbody>
  5654. <tr>
  5655. <td class="name">
  5656. <strong>light</strong>
  5657. </td>
  5658. <td class="description last">
  5659. <p>The light source.</p>
  5660. </td>
  5661. </tr>
  5662. <tr>
  5663. <td class="name">
  5664. <strong>position</strong>
  5665. </td>
  5666. <td class="description last">
  5667. <p>The position to project.</p>
  5668. <p>Default is <code>positionWorld</code>.</p>
  5669. </td>
  5670. </tr>
  5671. </tbody>
  5672. </table>
  5673. <dl class="details">
  5674. <dt class="tag-returns"><strong>Returns:</strong> The projected uvs.</dt>
  5675. </dl>
  5676. </div>
  5677. <h3 class="name name-method" id="lightShadowMatrix" translate="no">.<a href="#lightShadowMatrix">lightShadowMatrix</a><span class="signature">( light : <span class="param-type"><a href="Light.html">Light</a></span> )</span><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;mat4></span> </h3>
  5678. <div class="method">
  5679. <div class="description">
  5680. <p>TSL function for getting a shadow matrix uniform node for the given light.</p>
  5681. </div>
  5682. <table class="params">
  5683. <tbody>
  5684. <tr>
  5685. <td class="name">
  5686. <strong>light</strong>
  5687. </td>
  5688. <td class="description last">
  5689. <p>The light source.</p>
  5690. </td>
  5691. </tr>
  5692. </tbody>
  5693. </table>
  5694. <dl class="details">
  5695. <dt class="tag-returns"><strong>Returns:</strong> The shadow matrix uniform node.</dt>
  5696. </dl>
  5697. </div>
  5698. <h3 class="name name-method" id="lightTargetDirection" translate="no">.<a href="#lightTargetDirection">lightTargetDirection</a><span class="signature">( light : <span class="param-type"><a href="Light.html">Light</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  5699. <div class="method">
  5700. <div class="description">
  5701. <p>TSL function for getting the light target direction for the given light.</p>
  5702. </div>
  5703. <table class="params">
  5704. <tbody>
  5705. <tr>
  5706. <td class="name">
  5707. <strong>light</strong>
  5708. </td>
  5709. <td class="description last">
  5710. <p>The light source.</p>
  5711. </td>
  5712. </tr>
  5713. </tbody>
  5714. </table>
  5715. <dl class="details">
  5716. <dt class="tag-returns"><strong>Returns:</strong> The light's target direction.</dt>
  5717. </dl>
  5718. </div>
  5719. <h3 class="name name-method" id="lightTargetPosition" translate="no">.<a href="#lightTargetPosition">lightTargetPosition</a><span class="signature">( light : <span class="param-type"><a href="Light.html">Light</a></span> )</span><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;vec3></span> </h3>
  5720. <div class="method">
  5721. <div class="description">
  5722. <p>TSL function for getting the light target position in world space for the given light.</p>
  5723. </div>
  5724. <table class="params">
  5725. <tbody>
  5726. <tr>
  5727. <td class="name">
  5728. <strong>light</strong>
  5729. </td>
  5730. <td class="description last">
  5731. <p>The light source.</p>
  5732. </td>
  5733. </tr>
  5734. </tbody>
  5735. </table>
  5736. <dl class="details">
  5737. <dt class="tag-returns"><strong>Returns:</strong> The light target position in world space.</dt>
  5738. </dl>
  5739. </div>
  5740. <h3 class="name name-method" id="lightViewPosition" translate="no">.<a href="#lightViewPosition">lightViewPosition</a><span class="signature">( light : <span class="param-type"><a href="Light.html">Light</a></span> )</span><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;vec3></span> </h3>
  5741. <div class="method">
  5742. <div class="description">
  5743. <p>TSL function for getting the position in view space for the given light.</p>
  5744. </div>
  5745. <table class="params">
  5746. <tbody>
  5747. <tr>
  5748. <td class="name">
  5749. <strong>light</strong>
  5750. </td>
  5751. <td class="description last">
  5752. <p>The light source.</p>
  5753. </td>
  5754. </tr>
  5755. </tbody>
  5756. </table>
  5757. <dl class="details">
  5758. <dt class="tag-returns"><strong>Returns:</strong> The light's position in view space.</dt>
  5759. </dl>
  5760. </div>
  5761. <h3 class="name name-method" id="lights" translate="no">.<a href="#lights">lights</a><span class="signature">( lights : <span class="param-type">Array.&lt;<a href="Light.html">Light</a>></span> )</span><span class="type-signature"> : <a href="LightsNode.html">LightsNode</a></span> </h3>
  5762. <div class="method">
  5763. <div class="description">
  5764. <p>TSL function for creating an instance of <code>LightsNode</code> and configuring
  5765. it with the given array of lights.</p>
  5766. </div>
  5767. <table class="params">
  5768. <tbody>
  5769. <tr>
  5770. <td class="name">
  5771. <strong>lights</strong>
  5772. </td>
  5773. <td class="description last">
  5774. <p>An array of lights.</p>
  5775. </td>
  5776. </tr>
  5777. </tbody>
  5778. </table>
  5779. <dl class="details">
  5780. <dt class="tag-returns"><strong>Returns:</strong> The created lights node.</dt>
  5781. </dl>
  5782. </div>
  5783. <h3 class="name name-method" id="linearDepth" translate="no">.<a href="#linearDepth">linearDepth</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="ViewportDepthNode.html">ViewportDepthNode</a>.&lt;float></span> </h3>
  5784. <div class="method">
  5785. <div class="description">
  5786. <p>TSL function for converting a perspective depth value to linear depth.</p>
  5787. </div>
  5788. <table class="params">
  5789. <tbody>
  5790. <tr>
  5791. <td class="name">
  5792. <strong>value</strong>
  5793. </td>
  5794. <td class="description last">
  5795. <p>The perspective depth. If <code>null</code> is provided, the current fragment's depth is used.</p>
  5796. <p>Default is <code>null</code>.</p>
  5797. </td>
  5798. </tr>
  5799. </tbody>
  5800. </table>
  5801. </div>
  5802. <h3 class="name name-method" id="linearToneMapping" translate="no">.<a href="#linearToneMapping">linearToneMapping</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, exposure : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  5803. <div class="method">
  5804. <div class="description">
  5805. <p>Linear tone mapping, exposure only.</p>
  5806. </div>
  5807. <table class="params">
  5808. <tbody>
  5809. <tr>
  5810. <td class="name">
  5811. <strong>color</strong>
  5812. </td>
  5813. <td class="description last">
  5814. <p>The color that should be tone mapped.</p>
  5815. </td>
  5816. </tr>
  5817. <tr>
  5818. <td class="name">
  5819. <strong>exposure</strong>
  5820. </td>
  5821. <td class="description last">
  5822. <p>The exposure.</p>
  5823. </td>
  5824. </tr>
  5825. </tbody>
  5826. </table>
  5827. <dl class="details">
  5828. <dt class="tag-returns"><strong>Returns:</strong> The tone mapped color.</dt>
  5829. </dl>
  5830. </div>
  5831. <h3 class="name name-method" id="log" translate="no">.<a href="#log">log</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  5832. <div class="method">
  5833. <div class="description">
  5834. <p>Returns the natural logarithm of the parameter.</p>
  5835. </div>
  5836. <table class="params">
  5837. <tbody>
  5838. <tr>
  5839. <td class="name">
  5840. <strong>x</strong>
  5841. </td>
  5842. <td class="description last">
  5843. <p>The parameter.</p>
  5844. </td>
  5845. </tr>
  5846. </tbody>
  5847. </table>
  5848. </div>
  5849. <h3 class="name name-method" id="log2" translate="no">.<a href="#log2">log2</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  5850. <div class="method">
  5851. <div class="description">
  5852. <p>Returns the base 2 logarithm of the parameter.</p>
  5853. </div>
  5854. <table class="params">
  5855. <tbody>
  5856. <tr>
  5857. <td class="name">
  5858. <strong>x</strong>
  5859. </td>
  5860. <td class="description last">
  5861. <p>The parameter.</p>
  5862. </td>
  5863. </tr>
  5864. </tbody>
  5865. </table>
  5866. </div>
  5867. <h3 class="name name-method" id="logarithmicDepthToViewZ" translate="no">.<a href="#logarithmicDepthToViewZ">logarithmicDepthToViewZ</a><span class="signature">( depth : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, near : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, far : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  5868. <div class="method">
  5869. <div class="description">
  5870. <p>TSL function for converting a logarithmic depth value to a viewZ value.</p>
  5871. </div>
  5872. <table class="params">
  5873. <tbody>
  5874. <tr>
  5875. <td class="name">
  5876. <strong>depth</strong>
  5877. </td>
  5878. <td class="description last">
  5879. <p>The logarithmic depth.</p>
  5880. </td>
  5881. </tr>
  5882. <tr>
  5883. <td class="name">
  5884. <strong>near</strong>
  5885. </td>
  5886. <td class="description last">
  5887. <p>The camera's near value.</p>
  5888. </td>
  5889. </tr>
  5890. <tr>
  5891. <td class="name">
  5892. <strong>far</strong>
  5893. </td>
  5894. <td class="description last">
  5895. <p>The camera's far value.</p>
  5896. </td>
  5897. </tr>
  5898. </tbody>
  5899. </table>
  5900. </div>
  5901. <h3 class="name name-method" id="luminance" translate="no">.<a href="#luminance">luminance</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, luminanceCoefficients : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  5902. <div class="method">
  5903. <div class="description">
  5904. <p>Computes the luminance for the given RGB color value.</p>
  5905. </div>
  5906. <table class="params">
  5907. <tbody>
  5908. <tr>
  5909. <td class="name">
  5910. <strong>color</strong>
  5911. </td>
  5912. <td class="description last">
  5913. <p>The color value to compute the luminance for.</p>
  5914. </td>
  5915. </tr>
  5916. <tr>
  5917. <td class="name">
  5918. <strong>luminanceCoefficients</strong>
  5919. </td>
  5920. <td class="description last">
  5921. <p>The luminance coefficients. By default predefined values of the current working color space are used.</p>
  5922. </td>
  5923. </tr>
  5924. </tbody>
  5925. </table>
  5926. <dl class="details">
  5927. <dt class="tag-returns"><strong>Returns:</strong> The luminance.</dt>
  5928. </dl>
  5929. </div>
  5930. <h3 class="name name-method" id="lut3D" translate="no">.<a href="#lut3D">lut3D</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, lut : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, size : <span class="param-type">number</span>, intensity : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span> )</span><span class="type-signature"> : <a href="Lut3DNode.html">Lut3DNode</a></span> </h3>
  5931. <div class="method">
  5932. <div class="description">
  5933. <p>TSL function for creating a LUT node for color grading via post processing.</p>
  5934. </div>
  5935. <table class="params">
  5936. <tbody>
  5937. <tr>
  5938. <td class="name">
  5939. <strong>node</strong>
  5940. </td>
  5941. <td class="description last">
  5942. <p>The node that represents the input of the effect.</p>
  5943. </td>
  5944. </tr>
  5945. <tr>
  5946. <td class="name">
  5947. <strong>lut</strong>
  5948. </td>
  5949. <td class="description last">
  5950. <p>A texture node that represents the lookup table.</p>
  5951. </td>
  5952. </tr>
  5953. <tr>
  5954. <td class="name">
  5955. <strong>size</strong>
  5956. </td>
  5957. <td class="description last">
  5958. <p>The size of the lookup table.</p>
  5959. </td>
  5960. </tr>
  5961. <tr>
  5962. <td class="name">
  5963. <strong>intensity</strong>
  5964. </td>
  5965. <td class="description last">
  5966. <p>Controls the intensity of the effect.</p>
  5967. </td>
  5968. </tr>
  5969. </tbody>
  5970. </table>
  5971. </div>
  5972. <h3 class="name name-method" id="matcapUV" translate="no">.<a href="#matcapUV">matcapUV</a><span class="signature">()</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> </h3>
  5973. <div class="method">
  5974. <div class="description">
  5975. <p>TSL function for creating a matcap uv node.</p>
  5976. <p>Can be used to compute texture coordinates for projecting a
  5977. matcap onto a mesh. Used by <a href="MeshMatcapNodeMaterial.html">MeshMatcapNodeMaterial</a>.</p>
  5978. </div>
  5979. <dl class="details">
  5980. <dt class="tag-returns"><strong>Returns:</strong> The matcap UV coordinates.</dt>
  5981. </dl>
  5982. </div>
  5983. <h3 class="name name-method" id="materialReference" translate="no">.<a href="#materialReference">materialReference</a><span class="signature">( name : <span class="param-type">string</span>, type : <span class="param-type">string</span>, material : <span class="param-type"><a href="Material.html">Material</a></span> )</span><span class="type-signature"> : <a href="MaterialReferenceNode.html">MaterialReferenceNode</a></span> </h3>
  5984. <div class="method">
  5985. <div class="description">
  5986. <p>TSL function for creating a material reference node.</p>
  5987. </div>
  5988. <table class="params">
  5989. <tbody>
  5990. <tr>
  5991. <td class="name">
  5992. <strong>name</strong>
  5993. </td>
  5994. <td class="description last">
  5995. <p>The name of the property the node refers to.</p>
  5996. </td>
  5997. </tr>
  5998. <tr>
  5999. <td class="name">
  6000. <strong>type</strong>
  6001. </td>
  6002. <td class="description last">
  6003. <p>The uniform type that should be used to represent the property value.</p>
  6004. </td>
  6005. </tr>
  6006. <tr>
  6007. <td class="name">
  6008. <strong>material</strong>
  6009. </td>
  6010. <td class="description last">
  6011. <p>The material the property belongs to.
  6012. When no material is set, the node refers to the material of the current rendered object.</p>
  6013. <p>Default is <code>null</code>.</p>
  6014. </td>
  6015. </tr>
  6016. </tbody>
  6017. </table>
  6018. </div>
  6019. <h3 class="name name-method" id="max" translate="no">.<a href="#max">max</a><span class="signature">( &hellip;values : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6020. <div class="method">
  6021. <div class="description">
  6022. <p>Returns the greatest of the given values.</p>
  6023. </div>
  6024. <table class="params">
  6025. <tbody>
  6026. <tr>
  6027. <td class="name">
  6028. <strong>values</strong>
  6029. </td>
  6030. <td class="description last">
  6031. <p>The values to compare.</p>
  6032. </td>
  6033. </tr>
  6034. </tbody>
  6035. </table>
  6036. </div>
  6037. <h3 class="name name-method" id="maxMipLevel" translate="no">.<a href="#maxMipLevel">maxMipLevel</a><span class="signature">( textureNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span> )</span><span class="type-signature"> : <a href="MaxMipLevelNode.html">MaxMipLevelNode</a></span> </h3>
  6038. <div class="method">
  6039. <div class="description">
  6040. <p>TSL function for creating a max mip level node.</p>
  6041. </div>
  6042. <table class="params">
  6043. <tbody>
  6044. <tr>
  6045. <td class="name">
  6046. <strong>textureNode</strong>
  6047. </td>
  6048. <td class="description last">
  6049. <p>The texture node to compute the max mip level for.</p>
  6050. </td>
  6051. </tr>
  6052. </tbody>
  6053. </table>
  6054. </div>
  6055. <h3 class="name name-method" id="min" translate="no">.<a href="#min">min</a><span class="signature">( &hellip;values : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6056. <div class="method">
  6057. <div class="description">
  6058. <p>Returns the least of the given values.</p>
  6059. </div>
  6060. <table class="params">
  6061. <tbody>
  6062. <tr>
  6063. <td class="name">
  6064. <strong>values</strong>
  6065. </td>
  6066. <td class="description last">
  6067. <p>The values to compare.</p>
  6068. </td>
  6069. </tr>
  6070. </tbody>
  6071. </table>
  6072. </div>
  6073. <h3 class="name name-method" id="mix" translate="no">.<a href="#mix">mix</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a> | number</span>, b : <span class="param-type"><a href="Node.html">Node</a> | number</span>, t : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6074. <div class="method">
  6075. <div class="description">
  6076. <p>Linearly interpolates between two values.</p>
  6077. </div>
  6078. <table class="params">
  6079. <tbody>
  6080. <tr>
  6081. <td class="name">
  6082. <strong>a</strong>
  6083. </td>
  6084. <td class="description last">
  6085. <p>The first parameter.</p>
  6086. </td>
  6087. </tr>
  6088. <tr>
  6089. <td class="name">
  6090. <strong>b</strong>
  6091. </td>
  6092. <td class="description last">
  6093. <p>The second parameter.</p>
  6094. </td>
  6095. </tr>
  6096. <tr>
  6097. <td class="name">
  6098. <strong>t</strong>
  6099. </td>
  6100. <td class="description last">
  6101. <p>The interpolation value.</p>
  6102. </td>
  6103. </tr>
  6104. </tbody>
  6105. </table>
  6106. </div>
  6107. <h3 class="name name-method" id="mixElement" translate="no">.<a href="#mixElement">mixElement</a><span class="signature">( t : <span class="param-type"><a href="Node.html">Node</a> | number</span>, e1 : <span class="param-type"><a href="Node.html">Node</a> | number</span>, e2 : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6108. <div class="method">
  6109. <div class="description">
  6110. <p>Alias for <code>mix()</code> with a different parameter order.</p>
  6111. </div>
  6112. <table class="params">
  6113. <tbody>
  6114. <tr>
  6115. <td class="name">
  6116. <strong>t</strong>
  6117. </td>
  6118. <td class="description last">
  6119. <p>The interpolation value.</p>
  6120. </td>
  6121. </tr>
  6122. <tr>
  6123. <td class="name">
  6124. <strong>e1</strong>
  6125. </td>
  6126. <td class="description last">
  6127. <p>The first parameter.</p>
  6128. </td>
  6129. </tr>
  6130. <tr>
  6131. <td class="name">
  6132. <strong>e2</strong>
  6133. </td>
  6134. <td class="description last">
  6135. <p>The second parameter.</p>
  6136. </td>
  6137. </tr>
  6138. </tbody>
  6139. </table>
  6140. </div>
  6141. <h3 class="name name-method" id="mod" translate="no">.<a href="#mod">mod</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  6142. <div class="method">
  6143. <div class="description">
  6144. <p>Computes the remainder of dividing the first node by the second one.</p>
  6145. </div>
  6146. <table class="params">
  6147. <tbody>
  6148. <tr>
  6149. <td class="name">
  6150. <strong>a</strong>
  6151. </td>
  6152. <td class="description last">
  6153. <p>The first input.</p>
  6154. </td>
  6155. </tr>
  6156. <tr>
  6157. <td class="name">
  6158. <strong>b</strong>
  6159. </td>
  6160. <td class="description last">
  6161. <p>The second input.</p>
  6162. </td>
  6163. </tr>
  6164. </tbody>
  6165. </table>
  6166. </div>
  6167. <h3 class="name name-method" id="modInt" translate="no">.<a href="#modInt">modInt</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  6168. <div class="method">
  6169. <table class="params">
  6170. <tbody>
  6171. <tr>
  6172. <td class="name">
  6173. <strong>a</strong>
  6174. </td>
  6175. <td class="description last">
  6176. <p>The first input.</p>
  6177. </td>
  6178. </tr>
  6179. <tr>
  6180. <td class="name">
  6181. <strong>b</strong>
  6182. </td>
  6183. <td class="description last">
  6184. <p>The second input.</p>
  6185. </td>
  6186. </tr>
  6187. </tbody>
  6188. </table>
  6189. <dl class="details">
  6190. <dt class="important tag-deprecated"><strong>Deprecated:</strong> since r175. Use <a href="TSL.html#mod">mod</a> instead.</dt>
  6191. </dl>
  6192. </div>
  6193. <h3 class="name name-method" id="morphReference" translate="no">.<a href="#morphReference">morphReference</a><span class="signature">( mesh : <span class="param-type"><a href="Mesh.html">Mesh</a></span> )</span><span class="type-signature"> : <a href="MorphNode.html">MorphNode</a></span> </h3>
  6194. <div class="method">
  6195. <div class="description">
  6196. <p>TSL function for creating a morph node.</p>
  6197. </div>
  6198. <table class="params">
  6199. <tbody>
  6200. <tr>
  6201. <td class="name">
  6202. <strong>mesh</strong>
  6203. </td>
  6204. <td class="description last">
  6205. <p>The mesh holding the morph targets.</p>
  6206. </td>
  6207. </tr>
  6208. </tbody>
  6209. </table>
  6210. </div>
  6211. <h3 class="name name-method" id="motionBlur" translate="no">.<a href="#motionBlur">motionBlur</a><span class="signature">( inputNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, velocity : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, numSamples : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  6212. <div class="method">
  6213. <div class="description">
  6214. <p>Applies a motion blur effect to the given input node.</p>
  6215. </div>
  6216. <table class="params">
  6217. <tbody>
  6218. <tr>
  6219. <td class="name">
  6220. <strong>inputNode</strong>
  6221. </td>
  6222. <td class="description last">
  6223. <p>The input node to apply the motion blur for.</p>
  6224. </td>
  6225. </tr>
  6226. <tr>
  6227. <td class="name">
  6228. <strong>velocity</strong>
  6229. </td>
  6230. <td class="description last">
  6231. <p>The motion vectors of the beauty pass.</p>
  6232. </td>
  6233. </tr>
  6234. <tr>
  6235. <td class="name">
  6236. <strong>numSamples</strong>
  6237. </td>
  6238. <td class="description last">
  6239. <p>How many samples the effect should use. A higher value results in better quality but is also more expensive.</p>
  6240. <p>Default is <code>int(16)</code>.</p>
  6241. </td>
  6242. </tr>
  6243. </tbody>
  6244. </table>
  6245. <dl class="details">
  6246. <dt class="tag-returns"><strong>Returns:</strong> The input node with the motion blur effect applied.</dt>
  6247. </dl>
  6248. </div>
  6249. <h3 class="name name-method" id="mrt" translate="no">.<a href="#mrt">mrt</a><span class="signature">( outputNodes : <span class="param-type">Object.&lt;string, <a href="Node.html">Node</a>></span> )</span><span class="type-signature"> : <a href="MRTNode.html">MRTNode</a></span> </h3>
  6250. <div class="method">
  6251. <div class="description">
  6252. <p>TSL function for creating a MRT node.</p>
  6253. </div>
  6254. <table class="params">
  6255. <tbody>
  6256. <tr>
  6257. <td class="name">
  6258. <strong>outputNodes</strong>
  6259. </td>
  6260. <td class="description last">
  6261. <p>The MRT outputs.</p>
  6262. </td>
  6263. </tr>
  6264. </tbody>
  6265. </table>
  6266. </div>
  6267. <h3 class="name name-method" id="mul" translate="no">.<a href="#mul">mul</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span>, &hellip;params : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  6268. <div class="method">
  6269. <div class="description">
  6270. <p>Returns the multiplication of two or more value.</p>
  6271. </div>
  6272. <table class="params">
  6273. <tbody>
  6274. <tr>
  6275. <td class="name">
  6276. <strong>a</strong>
  6277. </td>
  6278. <td class="description last">
  6279. <p>The first input.</p>
  6280. </td>
  6281. </tr>
  6282. <tr>
  6283. <td class="name">
  6284. <strong>b</strong>
  6285. </td>
  6286. <td class="description last">
  6287. <p>The second input.</p>
  6288. </td>
  6289. </tr>
  6290. <tr>
  6291. <td class="name">
  6292. <strong>params</strong>
  6293. </td>
  6294. <td class="description last">
  6295. <p>Additional input parameters.</p>
  6296. </td>
  6297. </tr>
  6298. </tbody>
  6299. </table>
  6300. </div>
  6301. <h3 class="name name-method" id="negate" translate="no">.<a href="#negate">negate</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6302. <div class="method">
  6303. <div class="description">
  6304. <p>Negates the value of the parameter (-x).</p>
  6305. </div>
  6306. <table class="params">
  6307. <tbody>
  6308. <tr>
  6309. <td class="name">
  6310. <strong>x</strong>
  6311. </td>
  6312. <td class="description last">
  6313. <p>The parameter.</p>
  6314. </td>
  6315. </tr>
  6316. </tbody>
  6317. </table>
  6318. </div>
  6319. <h3 class="name name-method" id="neutralToneMapping" translate="no">.<a href="#neutralToneMapping">neutralToneMapping</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, exposure : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  6320. <div class="method">
  6321. <div class="description">
  6322. <p>Neutral tone mapping.</p>
  6323. <p>Reference: <a href="https://modelviewer.dev/examples/tone-mapping" target="_blank" rel="noopener">https://modelviewer.dev/examples/tone-mapping</a></p>
  6324. </div>
  6325. <table class="params">
  6326. <tbody>
  6327. <tr>
  6328. <td class="name">
  6329. <strong>color</strong>
  6330. </td>
  6331. <td class="description last">
  6332. <p>The color that should be tone mapped.</p>
  6333. </td>
  6334. </tr>
  6335. <tr>
  6336. <td class="name">
  6337. <strong>exposure</strong>
  6338. </td>
  6339. <td class="description last">
  6340. <p>The exposure.</p>
  6341. </td>
  6342. </tr>
  6343. </tbody>
  6344. </table>
  6345. <dl class="details">
  6346. <dt class="tag-returns"><strong>Returns:</strong> The tone mapped color.</dt>
  6347. </dl>
  6348. </div>
  6349. <h3 class="name name-method" id="normalMap" translate="no">.<a href="#normalMap">normalMap</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, scaleNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="NormalMapNode.html">NormalMapNode</a></span> </h3>
  6350. <div class="method">
  6351. <div class="description">
  6352. <p>TSL function for creating a normal map node.</p>
  6353. </div>
  6354. <table class="params">
  6355. <tbody>
  6356. <tr>
  6357. <td class="name">
  6358. <strong>node</strong>
  6359. </td>
  6360. <td class="description last">
  6361. <p>Represents the normal map data.</p>
  6362. </td>
  6363. </tr>
  6364. <tr>
  6365. <td class="name">
  6366. <strong>scaleNode</strong>
  6367. </td>
  6368. <td class="description last">
  6369. <p>Controls the intensity of the effect.</p>
  6370. <p>Default is <code>null</code>.</p>
  6371. </td>
  6372. </tr>
  6373. </tbody>
  6374. </table>
  6375. </div>
  6376. <h3 class="name name-method" id="normalize" translate="no">.<a href="#normalize">normalize</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6377. <div class="method">
  6378. <div class="description">
  6379. <p>Calculates the unit vector in the same direction as the original vector.</p>
  6380. </div>
  6381. <table class="params">
  6382. <tbody>
  6383. <tr>
  6384. <td class="name">
  6385. <strong>x</strong>
  6386. </td>
  6387. <td class="description last">
  6388. <p>The input vector.</p>
  6389. </td>
  6390. </tr>
  6391. </tbody>
  6392. </table>
  6393. </div>
  6394. <h3 class="name name-method" id="not" translate="no">.<a href="#not">not</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  6395. <div class="method">
  6396. <div class="description">
  6397. <p>Performs logical NOT on a node.</p>
  6398. </div>
  6399. <table class="params">
  6400. <tbody>
  6401. <tr>
  6402. <td class="name">
  6403. <strong>value</strong>
  6404. </td>
  6405. <td class="description last">
  6406. <p>The value.</p>
  6407. </td>
  6408. </tr>
  6409. </tbody>
  6410. </table>
  6411. </div>
  6412. <h3 class="name name-method" id="notEqual" translate="no">.<a href="#notEqual">notEqual</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  6413. <div class="method">
  6414. <div class="description">
  6415. <p>Checks if two nodes are not equal.</p>
  6416. </div>
  6417. <table class="params">
  6418. <tbody>
  6419. <tr>
  6420. <td class="name">
  6421. <strong>a</strong>
  6422. </td>
  6423. <td class="description last">
  6424. <p>The first input.</p>
  6425. </td>
  6426. </tr>
  6427. <tr>
  6428. <td class="name">
  6429. <strong>b</strong>
  6430. </td>
  6431. <td class="description last">
  6432. <p>The second input.</p>
  6433. </td>
  6434. </tr>
  6435. </tbody>
  6436. </table>
  6437. </div>
  6438. <h3 class="name name-method" id="objectDirection" translate="no">.<a href="#objectDirection">objectDirection</a><span class="signature">( object3d : <span class="param-type"><a href="Object3D.html">Object3D</a></span> )</span><span class="type-signature"> : <a href="Object3DNode.html">Object3DNode</a>.&lt;vec3></span> </h3>
  6439. <div class="method">
  6440. <div class="description">
  6441. <p>TSL function for creating an object 3D node that represents the object's direction in world space.</p>
  6442. </div>
  6443. <table class="params">
  6444. <tbody>
  6445. <tr>
  6446. <td class="name">
  6447. <strong>object3d</strong>
  6448. </td>
  6449. <td class="description last">
  6450. <p>The 3D object.</p>
  6451. </td>
  6452. </tr>
  6453. </tbody>
  6454. </table>
  6455. </div>
  6456. <h3 class="name name-method" id="objectPosition" translate="no">.<a href="#objectPosition">objectPosition</a><span class="signature">( object3d : <span class="param-type"><a href="Object3D.html">Object3D</a></span> )</span><span class="type-signature"> : <a href="Object3DNode.html">Object3DNode</a>.&lt;vec3></span> </h3>
  6457. <div class="method">
  6458. <div class="description">
  6459. <p>TSL function for creating an object 3D node that represents the object's position in world space.</p>
  6460. </div>
  6461. <table class="params">
  6462. <tbody>
  6463. <tr>
  6464. <td class="name">
  6465. <strong>object3d</strong>
  6466. </td>
  6467. <td class="description last">
  6468. <p>The 3D object.</p>
  6469. </td>
  6470. </tr>
  6471. </tbody>
  6472. </table>
  6473. </div>
  6474. <h3 class="name name-method" id="objectRadius" translate="no">.<a href="#objectRadius">objectRadius</a><span class="signature">( object3d : <span class="param-type"><a href="Object3D.html">Object3D</a></span> )</span><span class="type-signature"> : <a href="Object3DNode.html">Object3DNode</a>.&lt;float></span> </h3>
  6475. <div class="method">
  6476. <div class="description">
  6477. <p>TSL function for creating an object 3D node that represents the object's radius.</p>
  6478. </div>
  6479. <table class="params">
  6480. <tbody>
  6481. <tr>
  6482. <td class="name">
  6483. <strong>object3d</strong>
  6484. </td>
  6485. <td class="description last">
  6486. <p>The 3D object.</p>
  6487. </td>
  6488. </tr>
  6489. </tbody>
  6490. </table>
  6491. </div>
  6492. <h3 class="name name-method" id="objectScale" translate="no">.<a href="#objectScale">objectScale</a><span class="signature">( object3d : <span class="param-type"><a href="Object3D.html">Object3D</a></span> )</span><span class="type-signature"> : <a href="Object3DNode.html">Object3DNode</a>.&lt;vec3></span> </h3>
  6493. <div class="method">
  6494. <div class="description">
  6495. <p>TSL function for creating an object 3D node that represents the object's scale in world space.</p>
  6496. </div>
  6497. <table class="params">
  6498. <tbody>
  6499. <tr>
  6500. <td class="name">
  6501. <strong>object3d</strong>
  6502. </td>
  6503. <td class="description last">
  6504. <p>The 3D object.</p>
  6505. </td>
  6506. </tr>
  6507. </tbody>
  6508. </table>
  6509. </div>
  6510. <h3 class="name name-method" id="objectViewPosition" translate="no">.<a href="#objectViewPosition">objectViewPosition</a><span class="signature">( object3d : <span class="param-type"><a href="Object3D.html">Object3D</a></span> )</span><span class="type-signature"> : <a href="Object3DNode.html">Object3DNode</a>.&lt;vec3></span> </h3>
  6511. <div class="method">
  6512. <div class="description">
  6513. <p>TSL function for creating an object 3D node that represents the object's position in view/camera space.</p>
  6514. </div>
  6515. <table class="params">
  6516. <tbody>
  6517. <tr>
  6518. <td class="name">
  6519. <strong>object3d</strong>
  6520. </td>
  6521. <td class="description last">
  6522. <p>The 3D object.</p>
  6523. </td>
  6524. </tr>
  6525. </tbody>
  6526. </table>
  6527. </div>
  6528. <h3 class="name name-method" id="objectWorldMatrix" translate="no">.<a href="#objectWorldMatrix">objectWorldMatrix</a><span class="signature">( object3d : <span class="param-type"><a href="Object3D.html">Object3D</a></span> )</span><span class="type-signature"> : <a href="Object3DNode.html">Object3DNode</a>.&lt;mat4></span> </h3>
  6529. <div class="method">
  6530. <div class="description">
  6531. <p>TSL function for creating an object 3D node that represents the object's world matrix.</p>
  6532. </div>
  6533. <table class="params">
  6534. <tbody>
  6535. <tr>
  6536. <td class="name">
  6537. <strong>object3d</strong>
  6538. </td>
  6539. <td class="description last">
  6540. <p>The 3D object.</p>
  6541. </td>
  6542. </tr>
  6543. </tbody>
  6544. </table>
  6545. </div>
  6546. <h3 class="name name-method" id="oneMinus" translate="no">.<a href="#oneMinus">oneMinus</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6547. <div class="method">
  6548. <div class="description">
  6549. <p>Return <code>1</code> minus the parameter.</p>
  6550. </div>
  6551. <table class="params">
  6552. <tbody>
  6553. <tr>
  6554. <td class="name">
  6555. <strong>x</strong>
  6556. </td>
  6557. <td class="description last">
  6558. <p>The parameter.</p>
  6559. </td>
  6560. </tr>
  6561. </tbody>
  6562. </table>
  6563. </div>
  6564. <h3 class="name name-method" id="or" translate="no">.<a href="#or">or</a><span class="signature">( &hellip;nodes : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  6565. <div class="method">
  6566. <div class="description">
  6567. <p>Performs a logical OR operation on multiple nodes.</p>
  6568. </div>
  6569. <table class="params">
  6570. <tbody>
  6571. <tr>
  6572. <td class="name">
  6573. <strong>nodes</strong>
  6574. </td>
  6575. <td class="description last">
  6576. <p>The input nodes to be combined using OR.</p>
  6577. </td>
  6578. </tr>
  6579. </tbody>
  6580. </table>
  6581. </div>
  6582. <h3 class="name name-method" id="orthographicDepthToViewZ" translate="no">.<a href="#orthographicDepthToViewZ">orthographicDepthToViewZ</a><span class="signature">( depth : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, near : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, far : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  6583. <div class="method">
  6584. <div class="description">
  6585. <p>TSL function for converting an orthographic depth value to a viewZ value.</p>
  6586. </div>
  6587. <table class="params">
  6588. <tbody>
  6589. <tr>
  6590. <td class="name">
  6591. <strong>depth</strong>
  6592. </td>
  6593. <td class="description last">
  6594. <p>The orthographic depth.</p>
  6595. </td>
  6596. </tr>
  6597. <tr>
  6598. <td class="name">
  6599. <strong>near</strong>
  6600. </td>
  6601. <td class="description last">
  6602. <p>The camera's near value.</p>
  6603. </td>
  6604. </tr>
  6605. <tr>
  6606. <td class="name">
  6607. <strong>far</strong>
  6608. </td>
  6609. <td class="description last">
  6610. <p>The camera's far value.</p>
  6611. </td>
  6612. </tr>
  6613. </tbody>
  6614. </table>
  6615. </div>
  6616. <h3 class="name name-method" id="oscSawtooth" translate="no">.<a href="#oscSawtooth">oscSawtooth</a><span class="signature">( t : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  6617. <div class="method">
  6618. <div class="description">
  6619. <p>Generates a sawtooth wave oscillation based on a timer.</p>
  6620. </div>
  6621. <table class="params">
  6622. <tbody>
  6623. <tr>
  6624. <td class="name">
  6625. <strong>t</strong>
  6626. </td>
  6627. <td class="description last">
  6628. <p>The timer to generate the oscillation with.</p>
  6629. </td>
  6630. </tr>
  6631. </tbody>
  6632. </table>
  6633. <dl class="details">
  6634. <dt class="tag-returns"><strong>Returns:</strong> The oscillation node.</dt>
  6635. </dl>
  6636. </div>
  6637. <h3 class="name name-method" id="oscSine" translate="no">.<a href="#oscSine">oscSine</a><span class="signature">( t : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  6638. <div class="method">
  6639. <div class="description">
  6640. <p>Generates a sine wave oscillation based on a timer.</p>
  6641. </div>
  6642. <table class="params">
  6643. <tbody>
  6644. <tr>
  6645. <td class="name">
  6646. <strong>t</strong>
  6647. </td>
  6648. <td class="description last">
  6649. <p>The timer to generate the oscillation with.</p>
  6650. </td>
  6651. </tr>
  6652. </tbody>
  6653. </table>
  6654. <dl class="details">
  6655. <dt class="tag-returns"><strong>Returns:</strong> The oscillation node.</dt>
  6656. </dl>
  6657. </div>
  6658. <h3 class="name name-method" id="oscSquare" translate="no">.<a href="#oscSquare">oscSquare</a><span class="signature">( t : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  6659. <div class="method">
  6660. <div class="description">
  6661. <p>Generates a square wave oscillation based on a timer.</p>
  6662. </div>
  6663. <table class="params">
  6664. <tbody>
  6665. <tr>
  6666. <td class="name">
  6667. <strong>t</strong>
  6668. </td>
  6669. <td class="description last">
  6670. <p>The timer to generate the oscillation with.</p>
  6671. </td>
  6672. </tr>
  6673. </tbody>
  6674. </table>
  6675. <dl class="details">
  6676. <dt class="tag-returns"><strong>Returns:</strong> The oscillation node.</dt>
  6677. </dl>
  6678. </div>
  6679. <h3 class="name name-method" id="oscTriangle" translate="no">.<a href="#oscTriangle">oscTriangle</a><span class="signature">( t : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  6680. <div class="method">
  6681. <div class="description">
  6682. <p>Generates a triangle wave oscillation based on a timer.</p>
  6683. </div>
  6684. <table class="params">
  6685. <tbody>
  6686. <tr>
  6687. <td class="name">
  6688. <strong>t</strong>
  6689. </td>
  6690. <td class="description last">
  6691. <p>The timer to generate the oscillation with.</p>
  6692. </td>
  6693. </tr>
  6694. </tbody>
  6695. </table>
  6696. <dl class="details">
  6697. <dt class="tag-returns"><strong>Returns:</strong> The oscillation node.</dt>
  6698. </dl>
  6699. </div>
  6700. <h3 class="name name-method" id="outline" translate="no">.<a href="#outline">outline</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, params : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="OutlineNode.html">OutlineNode</a></span> </h3>
  6701. <div class="method">
  6702. <div class="description">
  6703. <p>TSL function for creating an outline effect around selected objects.</p>
  6704. </div>
  6705. <table class="params">
  6706. <tbody>
  6707. <tr>
  6708. <td class="name">
  6709. <strong>scene</strong>
  6710. </td>
  6711. <td class="description last">
  6712. <p>A reference to the scene.</p>
  6713. </td>
  6714. </tr>
  6715. <tr>
  6716. <td class="name">
  6717. <strong>camera</strong>
  6718. </td>
  6719. <td class="description last">
  6720. <p>The camera the scene is rendered with.</p>
  6721. </td>
  6722. </tr>
  6723. <tr>
  6724. <td class="name">
  6725. <strong>params</strong>
  6726. </td>
  6727. <td class="description last">
  6728. <p>The configuration parameters.</p>
  6729. <table class="params">
  6730. <tbody>
  6731. <tr>
  6732. <td class="name">
  6733. <strong>selectedObjects</strong>
  6734. </td>
  6735. <td class="description last">
  6736. <p>An array of selected objects.</p>
  6737. </td>
  6738. </tr>
  6739. <tr>
  6740. <td class="name">
  6741. <strong>edgeThickness</strong>
  6742. </td>
  6743. <td class="description last">
  6744. <p>The thickness of the edges.</p>
  6745. <p>Default is <code>float(1)</code>.</p>
  6746. </td>
  6747. </tr>
  6748. <tr>
  6749. <td class="name">
  6750. <strong>edgeGlow</strong>
  6751. </td>
  6752. <td class="description last">
  6753. <p>Can be used for animated glow/pulse effects.</p>
  6754. <p>Default is <code>float(0)</code>.</p>
  6755. </td>
  6756. </tr>
  6757. <tr>
  6758. <td class="name">
  6759. <strong>downSampleRatio</strong>
  6760. </td>
  6761. <td class="description last">
  6762. <p>The downsample ratio.</p>
  6763. <p>Default is <code>2</code>.</p>
  6764. </td>
  6765. </tr>
  6766. </tbody>
  6767. </table>
  6768. </td>
  6769. </tr>
  6770. </tbody>
  6771. </table>
  6772. </div>
  6773. <h3 class="name name-method" id="outputStruct" translate="no">.<a href="#outputStruct">outputStruct</a><span class="signature">( &hellip;members : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OutputStructNode.html">OutputStructNode</a></span> </h3>
  6774. <div class="method">
  6775. <div class="description">
  6776. <p>TSL function for creating an output struct node.</p>
  6777. </div>
  6778. <table class="params">
  6779. <tbody>
  6780. <tr>
  6781. <td class="name">
  6782. <strong>members</strong>
  6783. </td>
  6784. <td class="description last">
  6785. <p>A parameter list of nodes.</p>
  6786. </td>
  6787. </tr>
  6788. </tbody>
  6789. </table>
  6790. </div>
  6791. <h3 class="name name-method" id="overloadingFn" translate="no">.<a href="#overloadingFn">overloadingFn</a><span class="signature">( functionNodes : <span class="param-type">Array.&lt;function()></span> )</span><span class="type-signature"> : <a href="FunctionOverloadingNode.html">FunctionOverloadingNode</a></span> </h3>
  6792. <div class="method">
  6793. <div class="description">
  6794. <p>TSL function for creating a function overloading node.</p>
  6795. </div>
  6796. <table class="params">
  6797. <tbody>
  6798. <tr>
  6799. <td class="name">
  6800. <strong>functionNodes</strong>
  6801. </td>
  6802. <td class="description last">
  6803. <p>Array of <code>Fn</code> function definitions.</p>
  6804. </td>
  6805. </tr>
  6806. </tbody>
  6807. </table>
  6808. </div>
  6809. <h3 class="name name-method" id="packHalf2x16" translate="no">.<a href="#packHalf2x16">packHalf2x16</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6810. <div class="method">
  6811. <div class="description">
  6812. <p>Converts each component of the vec2 to 16-bit floating-point values. The results are packed into a single unsigned integer.</p>
  6813. </div>
  6814. <table class="params">
  6815. <tbody>
  6816. <tr>
  6817. <td class="name">
  6818. <strong>value</strong>
  6819. </td>
  6820. <td class="description last">
  6821. <p>The 2-component vector to be packed</p>
  6822. </td>
  6823. </tr>
  6824. </tbody>
  6825. </table>
  6826. </div>
  6827. <h3 class="name name-method" id="packSnorm2x16" translate="no">.<a href="#packSnorm2x16">packSnorm2x16</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6828. <div class="method">
  6829. <div class="description">
  6830. <p>Converts each component of the normalized float to 16-bit integer values. The results are packed into a single unsigned integer.
  6831. round(clamp(c, -1, +1) * 32767.0)</p>
  6832. </div>
  6833. <table class="params">
  6834. <tbody>
  6835. <tr>
  6836. <td class="name">
  6837. <strong>value</strong>
  6838. </td>
  6839. <td class="description last">
  6840. <p>The 2-component vector to be packed</p>
  6841. </td>
  6842. </tr>
  6843. </tbody>
  6844. </table>
  6845. </div>
  6846. <h3 class="name name-method" id="packUnorm2x16" translate="no">.<a href="#packUnorm2x16">packUnorm2x16</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  6847. <div class="method">
  6848. <div class="description">
  6849. <p>Converts each component of the normalized float to 16-bit integer values. The results are packed into a single unsigned integer.
  6850. round(clamp(c, 0, +1) * 65535.0)</p>
  6851. </div>
  6852. <table class="params">
  6853. <tbody>
  6854. <tr>
  6855. <td class="name">
  6856. <strong>value</strong>
  6857. </td>
  6858. <td class="description last">
  6859. <p>The 2-component vector to be packed</p>
  6860. </td>
  6861. </tr>
  6862. </tbody>
  6863. </table>
  6864. </div>
  6865. <h3 class="name name-method" id="parabola" translate="no">.<a href="#parabola">parabola</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, k : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  6866. <div class="method">
  6867. <div class="description">
  6868. <p>A function that remaps the <code>[0,1]</code> interval into the <code>[0,1]</code> interval.
  6869. The corners are mapped to <code>0</code> and the center to <code>1</code>.
  6870. Reference: <a href="https://iquilezles.org/articles/functions/" target="_blank" rel="noopener">https://iquilezles.org/articles/functions/</a>.</p>
  6871. </div>
  6872. <table class="params">
  6873. <tbody>
  6874. <tr>
  6875. <td class="name">
  6876. <strong>x</strong>
  6877. </td>
  6878. <td class="description last">
  6879. <p>The value to remap.</p>
  6880. </td>
  6881. </tr>
  6882. <tr>
  6883. <td class="name">
  6884. <strong>k</strong>
  6885. </td>
  6886. <td class="description last">
  6887. <p>Allows to control the remapping functions shape by rising the parabola to a power <code>k</code>.</p>
  6888. </td>
  6889. </tr>
  6890. </tbody>
  6891. </table>
  6892. <dl class="details">
  6893. <dt class="tag-returns"><strong>Returns:</strong> The remapped value.</dt>
  6894. </dl>
  6895. </div>
  6896. <h3 class="name name-method" id="parallaxBarrierPass" translate="no">.<a href="#parallaxBarrierPass">parallaxBarrierPass</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span><span class="type-signature"> : <a href="ParallaxBarrierPassNode.html">ParallaxBarrierPassNode</a></span> </h3>
  6897. <div class="method">
  6898. <div class="description">
  6899. <p>TSL function for creating an parallax barrier pass node.</p>
  6900. </div>
  6901. <table class="params">
  6902. <tbody>
  6903. <tr>
  6904. <td class="name">
  6905. <strong>scene</strong>
  6906. </td>
  6907. <td class="description last">
  6908. <p>The scene to render.</p>
  6909. </td>
  6910. </tr>
  6911. <tr>
  6912. <td class="name">
  6913. <strong>camera</strong>
  6914. </td>
  6915. <td class="description last">
  6916. <p>The camera to render the scene with.</p>
  6917. </td>
  6918. </tr>
  6919. </tbody>
  6920. </table>
  6921. </div>
  6922. <h3 class="name name-method" id="parallaxUV" translate="no">.<a href="#parallaxUV">parallaxUV</a><span class="signature">( uv : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, scale : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> </h3>
  6923. <div class="method">
  6924. <div class="description">
  6925. <p>TSL function for computing parallax uv coordinates.</p>
  6926. </div>
  6927. <table class="params">
  6928. <tbody>
  6929. <tr>
  6930. <td class="name">
  6931. <strong>uv</strong>
  6932. </td>
  6933. <td class="description last">
  6934. <p>A uv node.</p>
  6935. </td>
  6936. </tr>
  6937. <tr>
  6938. <td class="name">
  6939. <strong>scale</strong>
  6940. </td>
  6941. <td class="description last">
  6942. <p>A scale node.</p>
  6943. </td>
  6944. </tr>
  6945. </tbody>
  6946. </table>
  6947. <dl class="details">
  6948. <dt class="tag-returns"><strong>Returns:</strong> Parallax uv coordinates.</dt>
  6949. </dl>
  6950. </div>
  6951. <h3 class="name name-method" id="parameter" translate="no">.<a href="#parameter">parameter</a><span class="signature">( type : <span class="param-type">string</span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="ParameterNode.html">ParameterNode</a></span> </h3>
  6952. <div class="method">
  6953. <div class="description">
  6954. <p>TSL function for creating a parameter node.</p>
  6955. </div>
  6956. <table class="params">
  6957. <tbody>
  6958. <tr>
  6959. <td class="name">
  6960. <strong>type</strong>
  6961. </td>
  6962. <td class="description last">
  6963. <p>The type of the node.</p>
  6964. </td>
  6965. </tr>
  6966. <tr>
  6967. <td class="name">
  6968. <strong>name</strong>
  6969. </td>
  6970. <td class="description last">
  6971. <p>The name of the parameter in the shader.</p>
  6972. </td>
  6973. </tr>
  6974. </tbody>
  6975. </table>
  6976. </div>
  6977. <h3 class="name name-method" id="pass" translate="no">.<a href="#pass">pass</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, options : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="PassNode.html">PassNode</a></span> </h3>
  6978. <div class="method">
  6979. <div class="description">
  6980. <p>TSL function for creating a pass node.</p>
  6981. </div>
  6982. <table class="params">
  6983. <tbody>
  6984. <tr>
  6985. <td class="name">
  6986. <strong>scene</strong>
  6987. </td>
  6988. <td class="description last">
  6989. <p>A reference to the scene.</p>
  6990. </td>
  6991. </tr>
  6992. <tr>
  6993. <td class="name">
  6994. <strong>camera</strong>
  6995. </td>
  6996. <td class="description last">
  6997. <p>A reference to the camera.</p>
  6998. </td>
  6999. </tr>
  7000. <tr>
  7001. <td class="name">
  7002. <strong>options</strong>
  7003. </td>
  7004. <td class="description last">
  7005. <p>Options for the internal render target.</p>
  7006. </td>
  7007. </tr>
  7008. </tbody>
  7009. </table>
  7010. </div>
  7011. <h3 class="name name-method" id="passTexture" translate="no">.<a href="#passTexture">passTexture</a><span class="signature">( pass : <span class="param-type"><a href="PassNode.html">PassNode</a></span>, texture : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span><span class="type-signature"> : <a href="PassTextureNode.html">PassTextureNode</a></span> </h3>
  7012. <div class="method">
  7013. <div class="description">
  7014. <p>TSL function for creating a pass texture node.</p>
  7015. </div>
  7016. <table class="params">
  7017. <tbody>
  7018. <tr>
  7019. <td class="name">
  7020. <strong>pass</strong>
  7021. </td>
  7022. <td class="description last">
  7023. <p>The pass node.</p>
  7024. </td>
  7025. </tr>
  7026. <tr>
  7027. <td class="name">
  7028. <strong>texture</strong>
  7029. </td>
  7030. <td class="description last">
  7031. <p>The output texture.</p>
  7032. </td>
  7033. </tr>
  7034. </tbody>
  7035. </table>
  7036. </div>
  7037. <h3 class="name name-method" id="pcurve" translate="no">.<a href="#pcurve">pcurve</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, a : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, b : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  7038. <div class="method">
  7039. <div class="description">
  7040. <p>A function that remaps the <code>[0,1]</code> interval into the <code>[0,1]</code> interval.
  7041. A generalization of the <code>parabola()</code>. Keeps the corners mapped to 0 but allows the control of the shape one either side of the curve.
  7042. Reference: <a href="https://iquilezles.org/articles/functions/" target="_blank" rel="noopener">https://iquilezles.org/articles/functions/</a>.</p>
  7043. </div>
  7044. <table class="params">
  7045. <tbody>
  7046. <tr>
  7047. <td class="name">
  7048. <strong>x</strong>
  7049. </td>
  7050. <td class="description last">
  7051. <p>The value to remap.</p>
  7052. </td>
  7053. </tr>
  7054. <tr>
  7055. <td class="name">
  7056. <strong>a</strong>
  7057. </td>
  7058. <td class="description last">
  7059. <p>First control parameter.</p>
  7060. </td>
  7061. </tr>
  7062. <tr>
  7063. <td class="name">
  7064. <strong>b</strong>
  7065. </td>
  7066. <td class="description last">
  7067. <p>Second control parameter.</p>
  7068. </td>
  7069. </tr>
  7070. </tbody>
  7071. </table>
  7072. <dl class="details">
  7073. <dt class="tag-returns"><strong>Returns:</strong> The remapped value.</dt>
  7074. </dl>
  7075. </div>
  7076. <h3 class="name name-method" id="perspectiveDepthToViewZ" translate="no">.<a href="#perspectiveDepthToViewZ">perspectiveDepthToViewZ</a><span class="signature">( depth : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, near : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, far : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  7077. <div class="method">
  7078. <div class="description">
  7079. <p>TSL function for converting a perspective depth value to a viewZ value.</p>
  7080. </div>
  7081. <table class="params">
  7082. <tbody>
  7083. <tr>
  7084. <td class="name">
  7085. <strong>depth</strong>
  7086. </td>
  7087. <td class="description last">
  7088. <p>The perspective depth.</p>
  7089. </td>
  7090. </tr>
  7091. <tr>
  7092. <td class="name">
  7093. <strong>near</strong>
  7094. </td>
  7095. <td class="description last">
  7096. <p>The camera's near value.</p>
  7097. </td>
  7098. </tr>
  7099. <tr>
  7100. <td class="name">
  7101. <strong>far</strong>
  7102. </td>
  7103. <td class="description last">
  7104. <p>The camera's far value.</p>
  7105. </td>
  7106. </tr>
  7107. </tbody>
  7108. </table>
  7109. </div>
  7110. <h3 class="name name-method" id="pixelationPass" translate="no">.<a href="#pixelationPass">pixelationPass</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, pixelSize : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span>, normalEdgeStrength : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span>, depthEdgeStrength : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span> )</span><span class="type-signature"> : <a href="PixelationPassNode.html">PixelationPassNode</a></span> </h3>
  7111. <div class="method">
  7112. <div class="description">
  7113. <p>TSL function for creating a pixelation render pass node for post processing.</p>
  7114. </div>
  7115. <table class="params">
  7116. <tbody>
  7117. <tr>
  7118. <td class="name">
  7119. <strong>scene</strong>
  7120. </td>
  7121. <td class="description last">
  7122. <p>The scene to render.</p>
  7123. </td>
  7124. </tr>
  7125. <tr>
  7126. <td class="name">
  7127. <strong>camera</strong>
  7128. </td>
  7129. <td class="description last">
  7130. <p>The camera to render the scene with.</p>
  7131. </td>
  7132. </tr>
  7133. <tr>
  7134. <td class="name">
  7135. <strong>pixelSize</strong>
  7136. </td>
  7137. <td class="description last">
  7138. <p>The pixel size.</p>
  7139. <p>Default is <code>6</code>.</p>
  7140. </td>
  7141. </tr>
  7142. <tr>
  7143. <td class="name">
  7144. <strong>normalEdgeStrength</strong>
  7145. </td>
  7146. <td class="description last">
  7147. <p>The normal edge strength.</p>
  7148. <p>Default is <code>0.3</code>.</p>
  7149. </td>
  7150. </tr>
  7151. <tr>
  7152. <td class="name">
  7153. <strong>depthEdgeStrength</strong>
  7154. </td>
  7155. <td class="description last">
  7156. <p>The depth edge strength.</p>
  7157. <p>Default is <code>0.4</code>.</p>
  7158. </td>
  7159. </tr>
  7160. </tbody>
  7161. </table>
  7162. </div>
  7163. <h3 class="name name-method" id="pmremTexture" translate="no">.<a href="#pmremTexture">pmremTexture</a><span class="signature">( value : <span class="param-type"><a href="Texture.html">Texture</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="PMREMNode.html">PMREMNode</a></span> </h3>
  7164. <div class="method">
  7165. <div class="description">
  7166. <p>TSL function for creating a PMREM node.</p>
  7167. </div>
  7168. <table class="params">
  7169. <tbody>
  7170. <tr>
  7171. <td class="name">
  7172. <strong>value</strong>
  7173. </td>
  7174. <td class="description last">
  7175. <p>The input texture.</p>
  7176. </td>
  7177. </tr>
  7178. <tr>
  7179. <td class="name">
  7180. <strong>uvNode</strong>
  7181. </td>
  7182. <td class="description last">
  7183. <p>The uv node.</p>
  7184. <p>Default is <code>null</code>.</p>
  7185. </td>
  7186. </tr>
  7187. <tr>
  7188. <td class="name">
  7189. <strong>levelNode</strong>
  7190. </td>
  7191. <td class="description last">
  7192. <p>The level node.</p>
  7193. <p>Default is <code>null</code>.</p>
  7194. </td>
  7195. </tr>
  7196. </tbody>
  7197. </table>
  7198. </div>
  7199. <h3 class="name name-method" id="pointShadow" translate="no">.<a href="#pointShadow">pointShadow</a><span class="signature">( light : <span class="param-type"><a href="PointLight.html">PointLight</a></span>, shadow : <span class="param-type"><a href="PointLightShadow.html">PointLightShadow</a></span> )</span><span class="type-signature"> : <a href="PointShadowNode.html">PointShadowNode</a></span> </h3>
  7200. <div class="method">
  7201. <div class="description">
  7202. <p>TSL function for creating an instance of <code>PointShadowNode</code>.</p>
  7203. </div>
  7204. <table class="params">
  7205. <tbody>
  7206. <tr>
  7207. <td class="name">
  7208. <strong>light</strong>
  7209. </td>
  7210. <td class="description last">
  7211. <p>The shadow casting point light.</p>
  7212. </td>
  7213. </tr>
  7214. <tr>
  7215. <td class="name">
  7216. <strong>shadow</strong>
  7217. </td>
  7218. <td class="description last">
  7219. <p>An optional point light shadow.</p>
  7220. <p>Default is <code>null</code>.</p>
  7221. </td>
  7222. </tr>
  7223. </tbody>
  7224. </table>
  7225. <dl class="details">
  7226. <dt class="tag-returns"><strong>Returns:</strong> The created point shadow node.</dt>
  7227. </dl>
  7228. </div>
  7229. <h3 class="name name-method" id="posterize" translate="no">.<a href="#posterize">posterize</a><span class="signature">( sourceNode : <span class="param-type"><a href="Node.html">Node</a></span>, stepsNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="PosterizeNode.html">PosterizeNode</a></span> </h3>
  7230. <div class="method">
  7231. <div class="description">
  7232. <p>TSL function for creating a posterize node.</p>
  7233. </div>
  7234. <table class="params">
  7235. <tbody>
  7236. <tr>
  7237. <td class="name">
  7238. <strong>sourceNode</strong>
  7239. </td>
  7240. <td class="description last">
  7241. <p>The input color.</p>
  7242. </td>
  7243. </tr>
  7244. <tr>
  7245. <td class="name">
  7246. <strong>stepsNode</strong>
  7247. </td>
  7248. <td class="description last">
  7249. <p>Controls the intensity of the posterization effect. A lower number results in a more blocky appearance.</p>
  7250. </td>
  7251. </tr>
  7252. </tbody>
  7253. </table>
  7254. </div>
  7255. <h3 class="name name-method" id="pow" translate="no">.<a href="#pow">pow</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span>, y : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  7256. <div class="method">
  7257. <div class="description">
  7258. <p>Return the value of the first parameter raised to the power of the second one.</p>
  7259. </div>
  7260. <table class="params">
  7261. <tbody>
  7262. <tr>
  7263. <td class="name">
  7264. <strong>x</strong>
  7265. </td>
  7266. <td class="description last">
  7267. <p>The first parameter.</p>
  7268. </td>
  7269. </tr>
  7270. <tr>
  7271. <td class="name">
  7272. <strong>y</strong>
  7273. </td>
  7274. <td class="description last">
  7275. <p>The second parameter.</p>
  7276. </td>
  7277. </tr>
  7278. </tbody>
  7279. </table>
  7280. </div>
  7281. <h3 class="name name-method" id="pow2" translate="no">.<a href="#pow2">pow2</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  7282. <div class="method">
  7283. <div class="description">
  7284. <p>Returns the square of the parameter.</p>
  7285. </div>
  7286. <table class="params">
  7287. <tbody>
  7288. <tr>
  7289. <td class="name">
  7290. <strong>x</strong>
  7291. </td>
  7292. <td class="description last">
  7293. <p>The first parameter.</p>
  7294. </td>
  7295. </tr>
  7296. </tbody>
  7297. </table>
  7298. </div>
  7299. <h3 class="name name-method" id="pow3" translate="no">.<a href="#pow3">pow3</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  7300. <div class="method">
  7301. <div class="description">
  7302. <p>Returns the cube of the parameter.</p>
  7303. </div>
  7304. <table class="params">
  7305. <tbody>
  7306. <tr>
  7307. <td class="name">
  7308. <strong>x</strong>
  7309. </td>
  7310. <td class="description last">
  7311. <p>The first parameter.</p>
  7312. </td>
  7313. </tr>
  7314. </tbody>
  7315. </table>
  7316. </div>
  7317. <h3 class="name name-method" id="pow4" translate="no">.<a href="#pow4">pow4</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  7318. <div class="method">
  7319. <div class="description">
  7320. <p>Returns the fourth power of the parameter.</p>
  7321. </div>
  7322. <table class="params">
  7323. <tbody>
  7324. <tr>
  7325. <td class="name">
  7326. <strong>x</strong>
  7327. </td>
  7328. <td class="description last">
  7329. <p>The first parameter.</p>
  7330. </td>
  7331. </tr>
  7332. </tbody>
  7333. </table>
  7334. </div>
  7335. <h3 class="name name-method" id="premultipliedGaussianBlur" translate="no">.<a href="#premultipliedGaussianBlur">premultipliedGaussianBlur</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, directionNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|float)></span>, sigma : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="GaussianBlurNode.html">GaussianBlurNode</a></span> </h3>
  7336. <div class="method">
  7337. <div class="description">
  7338. <p>TSL function for creating a gaussian blur node for post processing with enabled premultiplied alpha.</p>
  7339. </div>
  7340. <table class="params">
  7341. <tbody>
  7342. <tr>
  7343. <td class="name">
  7344. <strong>node</strong>
  7345. </td>
  7346. <td class="description last">
  7347. <p>The node that represents the input of the effect.</p>
  7348. </td>
  7349. </tr>
  7350. <tr>
  7351. <td class="name">
  7352. <strong>directionNode</strong>
  7353. </td>
  7354. <td class="description last">
  7355. <p>Defines the direction and radius of the blur.</p>
  7356. </td>
  7357. </tr>
  7358. <tr>
  7359. <td class="name">
  7360. <strong>sigma</strong>
  7361. </td>
  7362. <td class="description last">
  7363. <p>Controls the kernel of the blur filter. Higher values mean a wider blur radius.</p>
  7364. </td>
  7365. </tr>
  7366. </tbody>
  7367. </table>
  7368. <dl class="details">
  7369. <dt class="important tag-deprecated"><strong>Deprecated:</strong> since r180. Use `gaussianBlur()` with `premultipliedAlpha: true` option instead.</dt>
  7370. </dl>
  7371. </div>
  7372. <h3 class="name name-method" id="premultiplyAlpha" translate="no">.<a href="#premultiplyAlpha">premultiplyAlpha</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  7373. <div class="method">
  7374. <div class="description">
  7375. <p>Premultiplies the RGB channels of a color by its alpha channel.</p>
  7376. <p>This function is useful for converting a non-premultiplied alpha color
  7377. into a premultiplied alpha format, where the RGB values are scaled
  7378. by the alpha value. Premultiplied alpha is often used in graphics
  7379. rendering for certain operations, such as compositing and image processing.</p>
  7380. </div>
  7381. <table class="params">
  7382. <tbody>
  7383. <tr>
  7384. <td class="name">
  7385. <strong>color</strong>
  7386. </td>
  7387. <td class="description last">
  7388. <p>The input color with non-premultiplied alpha.</p>
  7389. </td>
  7390. </tr>
  7391. </tbody>
  7392. </table>
  7393. <dl class="details">
  7394. <dt class="tag-returns"><strong>Returns:</strong> The color with premultiplied alpha.</dt>
  7395. </dl>
  7396. </div>
  7397. <h3 class="name name-method" id="property" translate="no">.<a href="#property">property</a><span class="signature">( type : <span class="param-type">string</span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a></span> </h3>
  7398. <div class="method">
  7399. <div class="description">
  7400. <p>TSL function for creating a property node.</p>
  7401. </div>
  7402. <table class="params">
  7403. <tbody>
  7404. <tr>
  7405. <td class="name">
  7406. <strong>type</strong>
  7407. </td>
  7408. <td class="description last">
  7409. <p>The type of the node.</p>
  7410. </td>
  7411. </tr>
  7412. <tr>
  7413. <td class="name">
  7414. <strong>name</strong>
  7415. </td>
  7416. <td class="description last">
  7417. <p>The name of the property in the shader.</p>
  7418. <p>Default is <code>null</code>.</p>
  7419. </td>
  7420. </tr>
  7421. </tbody>
  7422. </table>
  7423. </div>
  7424. <h3 class="name name-method" id="quadBroadcast" translate="no">.<a href="#quadBroadcast">quadBroadcast</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  7425. <div class="method">
  7426. <div class="description">
  7427. <p>Broadcasts e from the quad invocation with id equal to id.</p>
  7428. </div>
  7429. <table class="params">
  7430. <tbody>
  7431. <tr>
  7432. <td class="name">
  7433. <strong>e</strong>
  7434. </td>
  7435. <td class="description last">
  7436. <p>The value to broadcast.</p>
  7437. </td>
  7438. </tr>
  7439. </tbody>
  7440. </table>
  7441. <dl class="details">
  7442. <dt class="tag-returns"><strong>Returns:</strong> The broadcast value.</dt>
  7443. </dl>
  7444. </div>
  7445. <h3 class="name name-method" id="quadSwapDiagonal" translate="no">.<a href="#quadSwapDiagonal">quadSwapDiagonal</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  7446. <div class="method">
  7447. <div class="description">
  7448. <p>Swaps e between invocations in the quad diagonally.</p>
  7449. </div>
  7450. <table class="params">
  7451. <tbody>
  7452. <tr>
  7453. <td class="name">
  7454. <strong>e</strong>
  7455. </td>
  7456. <td class="description last">
  7457. <p>The value to swap from the current invocation.</p>
  7458. </td>
  7459. </tr>
  7460. </tbody>
  7461. </table>
  7462. <dl class="details">
  7463. <dt class="tag-returns"><strong>Returns:</strong> The value received from the swap operation.</dt>
  7464. </dl>
  7465. </div>
  7466. <h3 class="name name-method" id="quadSwapX" translate="no">.<a href="#quadSwapX">quadSwapX</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  7467. <div class="method">
  7468. <div class="description">
  7469. <p>Swaps e between invocations in the quad in the X direction.</p>
  7470. </div>
  7471. <table class="params">
  7472. <tbody>
  7473. <tr>
  7474. <td class="name">
  7475. <strong>e</strong>
  7476. </td>
  7477. <td class="description last">
  7478. <p>The value to swap from the current invocation.</p>
  7479. </td>
  7480. </tr>
  7481. </tbody>
  7482. </table>
  7483. <dl class="details">
  7484. <dt class="tag-returns"><strong>Returns:</strong> The value received from the swap operation.</dt>
  7485. </dl>
  7486. </div>
  7487. <h3 class="name name-method" id="quadSwapY" translate="no">.<a href="#quadSwapY">quadSwapY</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  7488. <div class="method">
  7489. <div class="description">
  7490. <p>Swaps e between invocations in the quad in the Y direction.</p>
  7491. </div>
  7492. <table class="params">
  7493. <tbody>
  7494. <tr>
  7495. <td class="name">
  7496. <strong>e</strong>
  7497. </td>
  7498. <td class="description last">
  7499. <p>The value to swap from the current invocation.</p>
  7500. </td>
  7501. </tr>
  7502. </tbody>
  7503. </table>
  7504. <dl class="details">
  7505. <dt class="tag-returns"><strong>Returns:</strong> The value received from the swap operation.</dt>
  7506. </dl>
  7507. </div>
  7508. <h3 class="name name-method" id="radialBlur" translate="no">.<a href="#radialBlur">radialBlur</a><span class="signature">( textureNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, options : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  7509. <div class="method">
  7510. <div class="description">
  7511. <p>This TSL function blurs an image in a circular pattern, radiating from a configurable center point in screen space.</p>
  7512. <p>Radial blurs can be used for different kind of effects like producing simple faked lighting effects also known as
  7513. &quot;light shafts&quot;. The major limitation of this specific usage is the center point can only be defined in 2D so the
  7514. effect does not honor the depth of 3D objects. Consequently, it is not intended for physically correct lit scenes.</p>
  7515. </div>
  7516. <table class="params">
  7517. <tbody>
  7518. <tr>
  7519. <td class="name">
  7520. <strong>textureNode</strong>
  7521. </td>
  7522. <td class="description last">
  7523. <p>The texture node that should be blurred.</p>
  7524. </td>
  7525. </tr>
  7526. <tr>
  7527. <td class="name">
  7528. <strong>options</strong>
  7529. </td>
  7530. <td class="description last">
  7531. <p>Additional options for the radial blur effect.</p>
  7532. <p>Default is <code>{}</code>.</p>
  7533. <table class="params">
  7534. <tbody>
  7535. <tr>
  7536. <td class="name">
  7537. <strong>center</strong>
  7538. </td>
  7539. <td class="description last">
  7540. <p>The center of the light in screen uvs.</p>
  7541. <p>Default is <code>vec2(0.5, 0.5)</code>.</p>
  7542. </td>
  7543. </tr>
  7544. <tr>
  7545. <td class="name">
  7546. <strong>weight</strong>
  7547. </td>
  7548. <td class="description last">
  7549. <p>Base weight factor for each sample in the range <code>[0,1]</code>.</p>
  7550. <p>Default is <code>float(0.9)</code>.</p>
  7551. </td>
  7552. </tr>
  7553. <tr>
  7554. <td class="name">
  7555. <strong>decay</strong>
  7556. </td>
  7557. <td class="description last">
  7558. <p>Decreases the weight factor so each iteration adds less to the sum. Must be in the range <code>[0,1]</code>.
  7559. If you increase the sample count, you have to increase this option as well to avoid a darking effect.</p>
  7560. <p>Default is <code>float(0.95)</code>.</p>
  7561. </td>
  7562. </tr>
  7563. <tr>
  7564. <td class="name">
  7565. <strong>count</strong>
  7566. </td>
  7567. <td class="description last">
  7568. <p>The number if iterations. Should be in the range <code>[16,64]</code>.</p>
  7569. <p>Default is <code>int(32)</code>.</p>
  7570. </td>
  7571. </tr>
  7572. <tr>
  7573. <td class="name">
  7574. <strong>exposure</strong>
  7575. </td>
  7576. <td class="description last">
  7577. <p>Exposure control of the blur.</p>
  7578. <p>Default is <code>float(5)</code>.</p>
  7579. </td>
  7580. </tr>
  7581. </tbody>
  7582. </table>
  7583. </td>
  7584. </tr>
  7585. </tbody>
  7586. </table>
  7587. <dl class="details">
  7588. <dt class="tag-returns"><strong>Returns:</strong> The blurred texture node.</dt>
  7589. </dl>
  7590. </div>
  7591. <h3 class="name name-method" id="radians" translate="no">.<a href="#radians">radians</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  7592. <div class="method">
  7593. <div class="description">
  7594. <p>Converts a quantity in degrees to radians.</p>
  7595. </div>
  7596. <table class="params">
  7597. <tbody>
  7598. <tr>
  7599. <td class="name">
  7600. <strong>x</strong>
  7601. </td>
  7602. <td class="description last">
  7603. <p>The input in degrees.</p>
  7604. </td>
  7605. </tr>
  7606. </tbody>
  7607. </table>
  7608. </div>
  7609. <h3 class="name name-method" id="rand" translate="no">.<a href="#rand">rand</a><span class="signature">( uv : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  7610. <div class="method">
  7611. <div class="description">
  7612. <p>Returns a random value for the given uv.</p>
  7613. </div>
  7614. <table class="params">
  7615. <tbody>
  7616. <tr>
  7617. <td class="name">
  7618. <strong>uv</strong>
  7619. </td>
  7620. <td class="description last">
  7621. <p>The uv node.</p>
  7622. </td>
  7623. </tr>
  7624. </tbody>
  7625. </table>
  7626. </div>
  7627. <h3 class="name name-method" id="range" translate="no">.<a href="#range">range</a><span class="signature">( minNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;<a href="global.html#any">any</a>></span>, maxNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;<a href="global.html#any">any</a>></span> )</span><span class="type-signature"> : <a href="RangeNode.html">RangeNode</a></span> </h3>
  7628. <div class="method">
  7629. <div class="description">
  7630. <p>TSL function for creating a range node.</p>
  7631. </div>
  7632. <table class="params">
  7633. <tbody>
  7634. <tr>
  7635. <td class="name">
  7636. <strong>minNode</strong>
  7637. </td>
  7638. <td class="description last">
  7639. <p>A node defining the lower bound of the range.</p>
  7640. <p>Default is <code>float()</code>.</p>
  7641. </td>
  7642. </tr>
  7643. <tr>
  7644. <td class="name">
  7645. <strong>maxNode</strong>
  7646. </td>
  7647. <td class="description last">
  7648. <p>A node defining the upper bound of the range.</p>
  7649. <p>Default is <code>float()</code>.</p>
  7650. </td>
  7651. </tr>
  7652. </tbody>
  7653. </table>
  7654. </div>
  7655. <h3 class="name name-method" id="rangeFogFactor" translate="no">.<a href="#rangeFogFactor">rangeFogFactor</a><span class="signature">( near : <span class="param-type"><a href="Node.html">Node</a></span>, far : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  7656. <div class="method">
  7657. <div class="description">
  7658. <p>Constructs a new range factor node.</p>
  7659. </div>
  7660. <table class="params">
  7661. <tbody>
  7662. <tr>
  7663. <td class="name">
  7664. <strong>near</strong>
  7665. </td>
  7666. <td class="description last">
  7667. <p>Defines the near value.</p>
  7668. </td>
  7669. </tr>
  7670. <tr>
  7671. <td class="name">
  7672. <strong>far</strong>
  7673. </td>
  7674. <td class="description last">
  7675. <p>Defines the far value.</p>
  7676. </td>
  7677. </tr>
  7678. </tbody>
  7679. </table>
  7680. </div>
  7681. <h3 class="name name-method" id="reciprocal" translate="no">.<a href="#reciprocal">reciprocal</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  7682. <div class="method">
  7683. <div class="description">
  7684. <p>Returns the reciprocal of the parameter <code>(1/x)</code>.</p>
  7685. </div>
  7686. <table class="params">
  7687. <tbody>
  7688. <tr>
  7689. <td class="name">
  7690. <strong>x</strong>
  7691. </td>
  7692. <td class="description last">
  7693. <p>The parameter.</p>
  7694. </td>
  7695. </tr>
  7696. </tbody>
  7697. </table>
  7698. </div>
  7699. <h3 class="name name-method" id="reference" translate="no">.<a href="#reference">reference</a><span class="signature">( name : <span class="param-type">string</span>, type : <span class="param-type">string</span>, object : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="ReferenceBaseNode.html">ReferenceBaseNode</a></span> </h3>
  7700. <div class="method">
  7701. <div class="description">
  7702. <p>TSL function for creating a reference base node.</p>
  7703. </div>
  7704. <table class="params">
  7705. <tbody>
  7706. <tr>
  7707. <td class="name">
  7708. <strong>name</strong>
  7709. </td>
  7710. <td class="description last">
  7711. <p>The name of the property the node refers to.</p>
  7712. </td>
  7713. </tr>
  7714. <tr>
  7715. <td class="name">
  7716. <strong>type</strong>
  7717. </td>
  7718. <td class="description last">
  7719. <p>The uniform type that should be used to represent the property value.</p>
  7720. </td>
  7721. </tr>
  7722. <tr>
  7723. <td class="name">
  7724. <strong>object</strong>
  7725. </td>
  7726. <td class="description last">
  7727. <p>The object the property belongs to.</p>
  7728. </td>
  7729. </tr>
  7730. </tbody>
  7731. </table>
  7732. </div>
  7733. <h3 class="name name-method" id="reference" translate="no">.<a href="#reference">reference</a><span class="signature">( name : <span class="param-type">string</span>, type : <span class="param-type">string</span>, object : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="ReferenceNode.html">ReferenceNode</a></span> </h3>
  7734. <div class="method">
  7735. <div class="description">
  7736. <p>TSL function for creating a reference node.</p>
  7737. </div>
  7738. <table class="params">
  7739. <tbody>
  7740. <tr>
  7741. <td class="name">
  7742. <strong>name</strong>
  7743. </td>
  7744. <td class="description last">
  7745. <p>The name of the property the node refers to.</p>
  7746. </td>
  7747. </tr>
  7748. <tr>
  7749. <td class="name">
  7750. <strong>type</strong>
  7751. </td>
  7752. <td class="description last">
  7753. <p>The uniform type that should be used to represent the property value.</p>
  7754. </td>
  7755. </tr>
  7756. <tr>
  7757. <td class="name">
  7758. <strong>object</strong>
  7759. </td>
  7760. <td class="description last">
  7761. <p>The object the property belongs to.</p>
  7762. </td>
  7763. </tr>
  7764. </tbody>
  7765. </table>
  7766. </div>
  7767. <h3 class="name name-method" id="referenceBuffer" translate="no">.<a href="#referenceBuffer">referenceBuffer</a><span class="signature">( name : <span class="param-type">string</span>, type : <span class="param-type">string</span>, count : <span class="param-type">number</span>, object : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="ReferenceBaseNode.html">ReferenceBaseNode</a></span> </h3>
  7768. <div class="method">
  7769. <div class="description">
  7770. <p>TSL function for creating a reference base node. Use this function if you want need a reference
  7771. to an array-like property that should be represented as a uniform buffer.</p>
  7772. </div>
  7773. <table class="params">
  7774. <tbody>
  7775. <tr>
  7776. <td class="name">
  7777. <strong>name</strong>
  7778. </td>
  7779. <td class="description last">
  7780. <p>The name of the property the node refers to.</p>
  7781. </td>
  7782. </tr>
  7783. <tr>
  7784. <td class="name">
  7785. <strong>type</strong>
  7786. </td>
  7787. <td class="description last">
  7788. <p>The uniform type that should be used to represent the property value.</p>
  7789. </td>
  7790. </tr>
  7791. <tr>
  7792. <td class="name">
  7793. <strong>count</strong>
  7794. </td>
  7795. <td class="description last">
  7796. <p>The number of value inside the array-like object.</p>
  7797. </td>
  7798. </tr>
  7799. <tr>
  7800. <td class="name">
  7801. <strong>object</strong>
  7802. </td>
  7803. <td class="description last">
  7804. <p>An array-like object the property belongs to.</p>
  7805. </td>
  7806. </tr>
  7807. </tbody>
  7808. </table>
  7809. </div>
  7810. <h3 class="name name-method" id="referenceBuffer" translate="no">.<a href="#referenceBuffer">referenceBuffer</a><span class="signature">( name : <span class="param-type">string</span>, type : <span class="param-type">string</span>, count : <span class="param-type">number</span>, object : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="ReferenceNode.html">ReferenceNode</a></span> </h3>
  7811. <div class="method">
  7812. <div class="description">
  7813. <p>TSL function for creating a reference node. Use this function if you want need a reference
  7814. to an array-like property that should be represented as a uniform buffer.</p>
  7815. </div>
  7816. <table class="params">
  7817. <tbody>
  7818. <tr>
  7819. <td class="name">
  7820. <strong>name</strong>
  7821. </td>
  7822. <td class="description last">
  7823. <p>The name of the property the node refers to.</p>
  7824. </td>
  7825. </tr>
  7826. <tr>
  7827. <td class="name">
  7828. <strong>type</strong>
  7829. </td>
  7830. <td class="description last">
  7831. <p>The uniform type that should be used to represent the property value.</p>
  7832. </td>
  7833. </tr>
  7834. <tr>
  7835. <td class="name">
  7836. <strong>count</strong>
  7837. </td>
  7838. <td class="description last">
  7839. <p>The number of value inside the array-like object.</p>
  7840. </td>
  7841. </tr>
  7842. <tr>
  7843. <td class="name">
  7844. <strong>object</strong>
  7845. </td>
  7846. <td class="description last">
  7847. <p>An array-like object the property belongs to.</p>
  7848. </td>
  7849. </tr>
  7850. </tbody>
  7851. </table>
  7852. </div>
  7853. <h3 class="name name-method" id="reflect" translate="no">.<a href="#reflect">reflect</a><span class="signature">( I : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span>, N : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span> </h3>
  7854. <div class="method">
  7855. <div class="description">
  7856. <p>Calculates the reflection direction for an incident vector.</p>
  7857. </div>
  7858. <table class="params">
  7859. <tbody>
  7860. <tr>
  7861. <td class="name">
  7862. <strong>I</strong>
  7863. </td>
  7864. <td class="description last">
  7865. <p>The incident vector.</p>
  7866. </td>
  7867. </tr>
  7868. <tr>
  7869. <td class="name">
  7870. <strong>N</strong>
  7871. </td>
  7872. <td class="description last">
  7873. <p>The normal vector.</p>
  7874. </td>
  7875. </tr>
  7876. </tbody>
  7877. </table>
  7878. </div>
  7879. <h3 class="name name-method" id="reflector" translate="no">.<a href="#reflector">reflector</a><span class="signature">( parameters : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="ReflectorNode.html">ReflectorNode</a></span> </h3>
  7880. <div class="method">
  7881. <div class="description">
  7882. <p>TSL function for creating a reflector node.</p>
  7883. </div>
  7884. <table class="params">
  7885. <tbody>
  7886. <tr>
  7887. <td class="name">
  7888. <strong>parameters</strong>
  7889. </td>
  7890. <td class="description last">
  7891. <p>An object holding configuration parameters.</p>
  7892. <p>Default is <code>{}</code>.</p>
  7893. <table class="params">
  7894. <tbody>
  7895. <tr>
  7896. <td class="name">
  7897. <strong>target</strong>
  7898. </td>
  7899. <td class="description last">
  7900. <p>The 3D object the reflector is linked to.</p>
  7901. <p>Default is <code>new Object3D()</code>.</p>
  7902. </td>
  7903. </tr>
  7904. <tr>
  7905. <td class="name">
  7906. <strong>resolution</strong>
  7907. </td>
  7908. <td class="description last">
  7909. <p>The resolution scale.</p>
  7910. <p>Default is <code>1</code>.</p>
  7911. </td>
  7912. </tr>
  7913. <tr>
  7914. <td class="name">
  7915. <strong>generateMipmaps</strong>
  7916. </td>
  7917. <td class="description last">
  7918. <p>Whether mipmaps should be generated or not.</p>
  7919. <p>Default is <code>false</code>.</p>
  7920. </td>
  7921. </tr>
  7922. <tr>
  7923. <td class="name">
  7924. <strong>bounces</strong>
  7925. </td>
  7926. <td class="description last">
  7927. <p>Whether reflectors can render other reflector nodes or not.</p>
  7928. <p>Default is <code>true</code>.</p>
  7929. </td>
  7930. </tr>
  7931. <tr>
  7932. <td class="name">
  7933. <strong>depth</strong>
  7934. </td>
  7935. <td class="description last">
  7936. <p>Whether depth data should be generated or not.</p>
  7937. <p>Default is <code>false</code>.</p>
  7938. </td>
  7939. </tr>
  7940. <tr>
  7941. <td class="name">
  7942. <strong>samples</strong>
  7943. </td>
  7944. <td class="description last">
  7945. <p>Anti-Aliasing samples of the internal render-target.</p>
  7946. </td>
  7947. </tr>
  7948. <tr>
  7949. <td class="name">
  7950. <strong>defaultTexture</strong>
  7951. </td>
  7952. <td class="description last">
  7953. <p>The default texture node.</p>
  7954. </td>
  7955. </tr>
  7956. <tr>
  7957. <td class="name">
  7958. <strong>reflector</strong>
  7959. </td>
  7960. <td class="description last">
  7961. <p>The reflector base node.</p>
  7962. </td>
  7963. </tr>
  7964. </tbody>
  7965. </table>
  7966. </td>
  7967. </tr>
  7968. </tbody>
  7969. </table>
  7970. </div>
  7971. <h3 class="name name-method" id="refract" translate="no">.<a href="#refract">refract</a><span class="signature">( I : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span>, N : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span>, eta : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span> </h3>
  7972. <div class="method">
  7973. <div class="description">
  7974. <p>Calculates the refraction direction for an incident vector.</p>
  7975. </div>
  7976. <table class="params">
  7977. <tbody>
  7978. <tr>
  7979. <td class="name">
  7980. <strong>I</strong>
  7981. </td>
  7982. <td class="description last">
  7983. <p>The incident vector.</p>
  7984. </td>
  7985. </tr>
  7986. <tr>
  7987. <td class="name">
  7988. <strong>N</strong>
  7989. </td>
  7990. <td class="description last">
  7991. <p>The normal vector.</p>
  7992. </td>
  7993. </tr>
  7994. <tr>
  7995. <td class="name">
  7996. <strong>eta</strong>
  7997. </td>
  7998. <td class="description last">
  7999. <p>The ratio of indices of refraction.</p>
  8000. </td>
  8001. </tr>
  8002. </tbody>
  8003. </table>
  8004. </div>
  8005. <h3 class="name name-method" id="reinhardToneMapping" translate="no">.<a href="#reinhardToneMapping">reinhardToneMapping</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, exposure : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  8006. <div class="method">
  8007. <div class="description">
  8008. <p>Reinhard tone mapping.</p>
  8009. <p>Reference: <a href="https://www.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf" target="_blank" rel="noopener">https://www.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf</a></p>
  8010. </div>
  8011. <table class="params">
  8012. <tbody>
  8013. <tr>
  8014. <td class="name">
  8015. <strong>color</strong>
  8016. </td>
  8017. <td class="description last">
  8018. <p>The color that should be tone mapped.</p>
  8019. </td>
  8020. </tr>
  8021. <tr>
  8022. <td class="name">
  8023. <strong>exposure</strong>
  8024. </td>
  8025. <td class="description last">
  8026. <p>The exposure.</p>
  8027. </td>
  8028. </tr>
  8029. </tbody>
  8030. </table>
  8031. <dl class="details">
  8032. <dt class="tag-returns"><strong>Returns:</strong> The tone mapped color.</dt>
  8033. </dl>
  8034. </div>
  8035. <h3 class="name name-method" id="remap" translate="no">.<a href="#remap">remap</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, inLowNode : <span class="param-type"><a href="Node.html">Node</a></span>, inHighNode : <span class="param-type"><a href="Node.html">Node</a></span>, outLowNode : <span class="param-type"><a href="Node.html">Node</a></span>, outHighNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="RemapNode.html">RemapNode</a></span> </h3>
  8036. <div class="method">
  8037. <div class="description">
  8038. <p>TSL function for creating a remap node.</p>
  8039. </div>
  8040. <table class="params">
  8041. <tbody>
  8042. <tr>
  8043. <td class="name">
  8044. <strong>node</strong>
  8045. </td>
  8046. <td class="description last">
  8047. <p>The node that should be remapped.</p>
  8048. </td>
  8049. </tr>
  8050. <tr>
  8051. <td class="name">
  8052. <strong>inLowNode</strong>
  8053. </td>
  8054. <td class="description last">
  8055. <p>The source or current lower bound of the range.</p>
  8056. </td>
  8057. </tr>
  8058. <tr>
  8059. <td class="name">
  8060. <strong>inHighNode</strong>
  8061. </td>
  8062. <td class="description last">
  8063. <p>The source or current upper bound of the range.</p>
  8064. </td>
  8065. </tr>
  8066. <tr>
  8067. <td class="name">
  8068. <strong>outLowNode</strong>
  8069. </td>
  8070. <td class="description last">
  8071. <p>The target lower bound of the range.</p>
  8072. <p>Default is <code>float(0)</code>.</p>
  8073. </td>
  8074. </tr>
  8075. <tr>
  8076. <td class="name">
  8077. <strong>outHighNode</strong>
  8078. </td>
  8079. <td class="description last">
  8080. <p>The target upper bound of the range.</p>
  8081. <p>Default is <code>float(1)</code>.</p>
  8082. </td>
  8083. </tr>
  8084. </tbody>
  8085. </table>
  8086. </div>
  8087. <h3 class="name name-method" id="remapClamp" translate="no">.<a href="#remapClamp">remapClamp</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, inLowNode : <span class="param-type"><a href="Node.html">Node</a></span>, inHighNode : <span class="param-type"><a href="Node.html">Node</a></span>, outLowNode : <span class="param-type"><a href="Node.html">Node</a></span>, outHighNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="RemapNode.html">RemapNode</a></span> </h3>
  8088. <div class="method">
  8089. <div class="description">
  8090. <p>TSL function for creating a remap node, but with enabled clamping.</p>
  8091. </div>
  8092. <table class="params">
  8093. <tbody>
  8094. <tr>
  8095. <td class="name">
  8096. <strong>node</strong>
  8097. </td>
  8098. <td class="description last">
  8099. <p>The node that should be remapped.</p>
  8100. </td>
  8101. </tr>
  8102. <tr>
  8103. <td class="name">
  8104. <strong>inLowNode</strong>
  8105. </td>
  8106. <td class="description last">
  8107. <p>The source or current lower bound of the range.</p>
  8108. </td>
  8109. </tr>
  8110. <tr>
  8111. <td class="name">
  8112. <strong>inHighNode</strong>
  8113. </td>
  8114. <td class="description last">
  8115. <p>The source or current upper bound of the range.</p>
  8116. </td>
  8117. </tr>
  8118. <tr>
  8119. <td class="name">
  8120. <strong>outLowNode</strong>
  8121. </td>
  8122. <td class="description last">
  8123. <p>The target lower bound of the range.</p>
  8124. <p>Default is <code>float(0)</code>.</p>
  8125. </td>
  8126. </tr>
  8127. <tr>
  8128. <td class="name">
  8129. <strong>outHighNode</strong>
  8130. </td>
  8131. <td class="description last">
  8132. <p>The target upper bound of the range.</p>
  8133. <p>Default is <code>float(1)</code>.</p>
  8134. </td>
  8135. </tr>
  8136. </tbody>
  8137. </table>
  8138. </div>
  8139. <h3 class="name name-method" id="renderOutput" translate="no">.<a href="#renderOutput">renderOutput</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a></span>, toneMapping : <span class="param-type">number</span>, outputColorSpace : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="RenderOutputNode.html">RenderOutputNode</a></span> </h3>
  8140. <div class="method">
  8141. <div class="description">
  8142. <p>TSL function for creating a posterize node.</p>
  8143. </div>
  8144. <table class="params">
  8145. <tbody>
  8146. <tr>
  8147. <td class="name">
  8148. <strong>color</strong>
  8149. </td>
  8150. <td class="description last">
  8151. <p>The color node to process.</p>
  8152. </td>
  8153. </tr>
  8154. <tr>
  8155. <td class="name">
  8156. <strong>toneMapping</strong>
  8157. </td>
  8158. <td class="description last">
  8159. <p>The tone mapping type.</p>
  8160. <p>Default is <code>null</code>.</p>
  8161. </td>
  8162. </tr>
  8163. <tr>
  8164. <td class="name">
  8165. <strong>outputColorSpace</strong>
  8166. </td>
  8167. <td class="description last">
  8168. <p>The output color space.</p>
  8169. <p>Default is <code>null</code>.</p>
  8170. </td>
  8171. </tr>
  8172. </tbody>
  8173. </table>
  8174. </div>
  8175. <h3 class="name name-method" id="rendererReference" translate="no">.<a href="#rendererReference">rendererReference</a><span class="signature">( name : <span class="param-type">string</span>, type : <span class="param-type">string</span>, renderer : <span class="param-type"><a href="Renderer.html">Renderer</a></span> )</span><span class="type-signature"> : <a href="RendererReferenceNode.html">RendererReferenceNode</a></span> </h3>
  8176. <div class="method">
  8177. <div class="description">
  8178. <p>TSL function for creating a renderer reference node.</p>
  8179. </div>
  8180. <table class="params">
  8181. <tbody>
  8182. <tr>
  8183. <td class="name">
  8184. <strong>name</strong>
  8185. </td>
  8186. <td class="description last">
  8187. <p>The name of the property the node refers to.</p>
  8188. </td>
  8189. </tr>
  8190. <tr>
  8191. <td class="name">
  8192. <strong>type</strong>
  8193. </td>
  8194. <td class="description last">
  8195. <p>The uniform type that should be used to represent the property value.</p>
  8196. </td>
  8197. </tr>
  8198. <tr>
  8199. <td class="name">
  8200. <strong>renderer</strong>
  8201. </td>
  8202. <td class="description last">
  8203. <p>The renderer the property belongs to. When no renderer is set,
  8204. the node refers to the renderer of the current state.</p>
  8205. <p>Default is <code>null</code>.</p>
  8206. </td>
  8207. </tr>
  8208. </tbody>
  8209. </table>
  8210. </div>
  8211. <h3 class="name name-method" id="replaceDefaultUV" translate="no">.<a href="#replaceDefaultUV">replaceDefaultUV</a><span class="signature">( callback : <span class="param-type">function</span>, node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="ContextNode.html">ContextNode</a></span> </h3>
  8212. <div class="method">
  8213. <div class="description">
  8214. <p>Replaces the default UV coordinates used in texture lookups.</p>
  8215. <pre><code class="language-js">material.contextNode = replaceDefaultUV( ( textureNode ) => {
  8216. // ...
  8217. return customUVCoordinates;
  8218. } );
  8219. </code></pre>
  8220. </div>
  8221. <table class="params">
  8222. <tbody>
  8223. <tr>
  8224. <td class="name">
  8225. <strong>callback</strong>
  8226. </td>
  8227. <td class="description last">
  8228. <p>A callback that receives the texture node
  8229. and must return the new uv coordinates.</p>
  8230. </td>
  8231. </tr>
  8232. <tr>
  8233. <td class="name">
  8234. <strong>node</strong>
  8235. </td>
  8236. <td class="description last">
  8237. <p>An optional node to which the context will be applied.</p>
  8238. <p>Default is <code>null</code>.</p>
  8239. </td>
  8240. </tr>
  8241. </tbody>
  8242. </table>
  8243. <dl class="details">
  8244. <dt class="tag-returns"><strong>Returns:</strong> A context node that replaces the default UV coordinates.</dt>
  8245. </dl>
  8246. </div>
  8247. <h3 class="name name-method" id="rgbShift" translate="no">.<a href="#rgbShift">rgbShift</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, amount : <span class="param-type">number</span>, angle : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="RGBShiftNode.html">RGBShiftNode</a></span> </h3>
  8248. <div class="method">
  8249. <div class="description">
  8250. <p>TSL function for creating a RGB shift or split effect for post processing.</p>
  8251. </div>
  8252. <table class="params">
  8253. <tbody>
  8254. <tr>
  8255. <td class="name">
  8256. <strong>node</strong>
  8257. </td>
  8258. <td class="description last">
  8259. <p>The node that represents the input of the effect.</p>
  8260. </td>
  8261. </tr>
  8262. <tr>
  8263. <td class="name">
  8264. <strong>amount</strong>
  8265. </td>
  8266. <td class="description last">
  8267. <p>The amount of the RGB shift.</p>
  8268. <p>Default is <code>0.005</code>.</p>
  8269. </td>
  8270. </tr>
  8271. <tr>
  8272. <td class="name">
  8273. <strong>angle</strong>
  8274. </td>
  8275. <td class="description last">
  8276. <p>Defines in which direction colors are shifted.</p>
  8277. <p>Default is <code>0</code>.</p>
  8278. </td>
  8279. </tr>
  8280. </tbody>
  8281. </table>
  8282. </div>
  8283. <h3 class="name name-method" id="rotate" translate="no">.<a href="#rotate">rotate</a><span class="signature">( positionNode : <span class="param-type"><a href="Node.html">Node</a></span>, rotationNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="RotateNode.html">RotateNode</a></span> </h3>
  8284. <div class="method">
  8285. <div class="description">
  8286. <p>TSL function for creating a rotate node.</p>
  8287. </div>
  8288. <table class="params">
  8289. <tbody>
  8290. <tr>
  8291. <td class="name">
  8292. <strong>positionNode</strong>
  8293. </td>
  8294. <td class="description last">
  8295. <p>The position node.</p>
  8296. </td>
  8297. </tr>
  8298. <tr>
  8299. <td class="name">
  8300. <strong>rotationNode</strong>
  8301. </td>
  8302. <td class="description last">
  8303. <p>Represents the rotation that is applied to the position node. Depending
  8304. on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value.</p>
  8305. </td>
  8306. </tr>
  8307. </tbody>
  8308. </table>
  8309. </div>
  8310. <h3 class="name name-method" id="rotateUV" translate="no">.<a href="#rotateUV">rotateUV</a><span class="signature">( uv : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, rotation : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, center : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> </h3>
  8311. <div class="method">
  8312. <div class="description">
  8313. <p>Rotates the given uv coordinates around a center point</p>
  8314. </div>
  8315. <table class="params">
  8316. <tbody>
  8317. <tr>
  8318. <td class="name">
  8319. <strong>uv</strong>
  8320. </td>
  8321. <td class="description last">
  8322. <p>The uv coordinates.</p>
  8323. </td>
  8324. </tr>
  8325. <tr>
  8326. <td class="name">
  8327. <strong>rotation</strong>
  8328. </td>
  8329. <td class="description last">
  8330. <p>The rotation defined in radians.</p>
  8331. </td>
  8332. </tr>
  8333. <tr>
  8334. <td class="name">
  8335. <strong>center</strong>
  8336. </td>
  8337. <td class="description last">
  8338. <p>The center of rotation</p>
  8339. </td>
  8340. </tr>
  8341. </tbody>
  8342. </table>
  8343. <dl class="details">
  8344. <dt class="tag-returns"><strong>Returns:</strong> The rotated uv coordinates.</dt>
  8345. </dl>
  8346. </div>
  8347. <h3 class="name name-method" id="round" translate="no">.<a href="#round">round</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  8348. <div class="method">
  8349. <div class="description">
  8350. <p>Rounds the parameter to the nearest integer.</p>
  8351. </div>
  8352. <table class="params">
  8353. <tbody>
  8354. <tr>
  8355. <td class="name">
  8356. <strong>x</strong>
  8357. </td>
  8358. <td class="description last">
  8359. <p>The parameter.</p>
  8360. </td>
  8361. </tr>
  8362. </tbody>
  8363. </table>
  8364. </div>
  8365. <h3 class="name name-method" id="rtt" translate="no">.<a href="#rtt">rtt</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, options : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="RTTNode.html">RTTNode</a></span> </h3>
  8366. <div class="method">
  8367. <div class="description">
  8368. <p>TSL function for creating a RTT node.</p>
  8369. </div>
  8370. <table class="params">
  8371. <tbody>
  8372. <tr>
  8373. <td class="name">
  8374. <strong>node</strong>
  8375. </td>
  8376. <td class="description last">
  8377. <p>The node to render a texture with.</p>
  8378. </td>
  8379. </tr>
  8380. <tr>
  8381. <td class="name">
  8382. <strong>width</strong>
  8383. </td>
  8384. <td class="description last">
  8385. <p>The width of the internal render target. If not width is applied, the render target is automatically resized.</p>
  8386. <p>Default is <code>null</code>.</p>
  8387. </td>
  8388. </tr>
  8389. <tr>
  8390. <td class="name">
  8391. <strong>height</strong>
  8392. </td>
  8393. <td class="description last">
  8394. <p>The height of the internal render target.</p>
  8395. <p>Default is <code>null</code>.</p>
  8396. </td>
  8397. </tr>
  8398. <tr>
  8399. <td class="name">
  8400. <strong>options</strong>
  8401. </td>
  8402. <td class="description last">
  8403. <p>The options for the internal render target.</p>
  8404. <p>Default is <code>{type:HalfFloatType}</code>.</p>
  8405. </td>
  8406. </tr>
  8407. </tbody>
  8408. </table>
  8409. </div>
  8410. <h3 class="name name-method" id="sRGBTransferEOTF" translate="no">.<a href="#sRGBTransferEOTF">sRGBTransferEOTF</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  8411. <div class="method">
  8412. <div class="description">
  8413. <p>Converts the given color value from sRGB to linear-sRGB color space.</p>
  8414. </div>
  8415. <table class="params">
  8416. <tbody>
  8417. <tr>
  8418. <td class="name">
  8419. <strong>color</strong>
  8420. </td>
  8421. <td class="description last">
  8422. <p>The sRGB color.</p>
  8423. </td>
  8424. </tr>
  8425. </tbody>
  8426. </table>
  8427. <dl class="details">
  8428. <dt class="tag-returns"><strong>Returns:</strong> The linear-sRGB color.</dt>
  8429. </dl>
  8430. </div>
  8431. <h3 class="name name-method" id="sRGBTransferOETF" translate="no">.<a href="#sRGBTransferOETF">sRGBTransferOETF</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  8432. <div class="method">
  8433. <div class="description">
  8434. <p>Converts the given color value from linear-sRGB to sRGB color space.</p>
  8435. </div>
  8436. <table class="params">
  8437. <tbody>
  8438. <tr>
  8439. <td class="name">
  8440. <strong>color</strong>
  8441. </td>
  8442. <td class="description last">
  8443. <p>The linear-sRGB color.</p>
  8444. </td>
  8445. </tr>
  8446. </tbody>
  8447. </table>
  8448. <dl class="details">
  8449. <dt class="tag-returns"><strong>Returns:</strong> The sRGB color.</dt>
  8450. </dl>
  8451. </div>
  8452. <h3 class="name name-method" id="sampler" translate="no">.<a href="#sampler">sampler</a><span class="signature">( value : <span class="param-type"><a href="TextureNode.html">TextureNode</a> | <a href="Texture.html">Texture</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  8453. <div class="method">
  8454. <div class="description">
  8455. <p>Converts a texture or texture node to a sampler.</p>
  8456. </div>
  8457. <table class="params">
  8458. <tbody>
  8459. <tr>
  8460. <td class="name">
  8461. <strong>value</strong>
  8462. </td>
  8463. <td class="description last">
  8464. <p>The texture or texture node to convert.</p>
  8465. </td>
  8466. </tr>
  8467. </tbody>
  8468. </table>
  8469. </div>
  8470. <h3 class="name name-method" id="samplerComparison" translate="no">.<a href="#samplerComparison">samplerComparison</a><span class="signature">( value : <span class="param-type"><a href="TextureNode.html">TextureNode</a> | <a href="Texture.html">Texture</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  8471. <div class="method">
  8472. <div class="description">
  8473. <p>Converts a texture or texture node to a sampler comparison.</p>
  8474. </div>
  8475. <table class="params">
  8476. <tbody>
  8477. <tr>
  8478. <td class="name">
  8479. <strong>value</strong>
  8480. </td>
  8481. <td class="description last">
  8482. <p>The texture or texture node to convert.</p>
  8483. </td>
  8484. </tr>
  8485. </tbody>
  8486. </table>
  8487. </div>
  8488. <h3 class="name name-method" id="saturate" translate="no">.<a href="#saturate">saturate</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  8489. <div class="method">
  8490. <div class="description">
  8491. <p>Constrains a value between <code>0</code> and <code>1</code>.</p>
  8492. </div>
  8493. <table class="params">
  8494. <tbody>
  8495. <tr>
  8496. <td class="name">
  8497. <strong>value</strong>
  8498. </td>
  8499. <td class="description last">
  8500. <p>The value to constrain.</p>
  8501. </td>
  8502. </tr>
  8503. </tbody>
  8504. </table>
  8505. </div>
  8506. <h3 class="name name-method" id="saturation" translate="no">.<a href="#saturation">saturation</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, adjustment : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  8507. <div class="method">
  8508. <div class="description">
  8509. <p>Super-saturates or desaturates the given RGB color.</p>
  8510. </div>
  8511. <table class="params">
  8512. <tbody>
  8513. <tr>
  8514. <td class="name">
  8515. <strong>color</strong>
  8516. </td>
  8517. <td class="description last">
  8518. <p>The input color.</p>
  8519. </td>
  8520. </tr>
  8521. <tr>
  8522. <td class="name">
  8523. <strong>adjustment</strong>
  8524. </td>
  8525. <td class="description last">
  8526. <p>Specifies the amount of the conversion. A value under <code>1</code> desaturates the color, a value over <code>1</code> super-saturates it.</p>
  8527. <p>Default is <code>1</code>.</p>
  8528. </td>
  8529. </tr>
  8530. </tbody>
  8531. </table>
  8532. <dl class="details">
  8533. <dt class="tag-returns"><strong>Returns:</strong> The saturated color.</dt>
  8534. </dl>
  8535. </div>
  8536. <h3 class="name name-method" id="scriptable" translate="no">.<a href="#scriptable">scriptable</a><span class="signature">( codeNode : <span class="param-type"><a href="CodeNode.html">CodeNode</a></span>, parameters : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="ScriptableNode.html">ScriptableNode</a></span> </h3>
  8537. <div class="method">
  8538. <div class="description">
  8539. <p>TSL function for creating a scriptable node.</p>
  8540. </div>
  8541. <table class="params">
  8542. <tbody>
  8543. <tr>
  8544. <td class="name">
  8545. <strong>codeNode</strong>
  8546. </td>
  8547. <td class="description last">
  8548. <p>The code node.</p>
  8549. </td>
  8550. </tr>
  8551. <tr>
  8552. <td class="name">
  8553. <strong>parameters</strong>
  8554. </td>
  8555. <td class="description last">
  8556. <p>The parameters definition.</p>
  8557. <p>Default is <code>{}</code>.</p>
  8558. </td>
  8559. </tr>
  8560. </tbody>
  8561. </table>
  8562. </div>
  8563. <h3 class="name name-method" id="scriptableValue" translate="no">.<a href="#scriptableValue">scriptableValue</a><span class="signature">( value : <span class="param-type"><a href="global.html#any">any</a></span> )</span><span class="type-signature"> : <a href="ScriptableValueNode.html">ScriptableValueNode</a></span> </h3>
  8564. <div class="method">
  8565. <div class="description">
  8566. <p>TSL function for creating a scriptable value node.</p>
  8567. </div>
  8568. <table class="params">
  8569. <tbody>
  8570. <tr>
  8571. <td class="name">
  8572. <strong>value</strong>
  8573. </td>
  8574. <td class="description last">
  8575. <p>The value.</p>
  8576. </td>
  8577. </tr>
  8578. </tbody>
  8579. </table>
  8580. </div>
  8581. <h3 class="name name-method" id="select" translate="no">.<a href="#select">select</a><span class="signature">( condNode : <span class="param-type"><a href="Node.html">Node</a></span>, ifNode : <span class="param-type"><a href="Node.html">Node</a></span>, elseNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="ConditionalNode.html">ConditionalNode</a></span> </h3>
  8582. <div class="method">
  8583. <div class="description">
  8584. <p>TSL function for creating a conditional node.</p>
  8585. </div>
  8586. <table class="params">
  8587. <tbody>
  8588. <tr>
  8589. <td class="name">
  8590. <strong>condNode</strong>
  8591. </td>
  8592. <td class="description last">
  8593. <p>The node that defines the condition.</p>
  8594. </td>
  8595. </tr>
  8596. <tr>
  8597. <td class="name">
  8598. <strong>ifNode</strong>
  8599. </td>
  8600. <td class="description last">
  8601. <p>The node that is evaluate when the condition ends up <code>true</code>.</p>
  8602. </td>
  8603. </tr>
  8604. <tr>
  8605. <td class="name">
  8606. <strong>elseNode</strong>
  8607. </td>
  8608. <td class="description last">
  8609. <p>The node that is evaluate when the condition ends up <code>false</code>.</p>
  8610. <p>Default is <code>null</code>.</p>
  8611. </td>
  8612. </tr>
  8613. </tbody>
  8614. </table>
  8615. </div>
  8616. <h3 class="name name-method" id="sepia" translate="no">.<a href="#sepia">sepia</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  8617. <div class="method">
  8618. <div class="description">
  8619. <p>Applies a sepia effect to the given color node.</p>
  8620. </div>
  8621. <table class="params">
  8622. <tbody>
  8623. <tr>
  8624. <td class="name">
  8625. <strong>color</strong>
  8626. </td>
  8627. <td class="description last">
  8628. <p>The color node to apply the sepia for.</p>
  8629. </td>
  8630. </tr>
  8631. </tbody>
  8632. </table>
  8633. <dl class="details">
  8634. <dt class="tag-returns"><strong>Returns:</strong> The updated color node.</dt>
  8635. </dl>
  8636. </div>
  8637. <h3 class="name name-method" id="setName" translate="no">.<a href="#setName">setName</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="ContextNode.html">ContextNode</a></span> </h3>
  8638. <div class="method">
  8639. <div class="description">
  8640. <p>TSL function for defining a name for the context value for a given node.</p>
  8641. </div>
  8642. <table class="params">
  8643. <tbody>
  8644. <tr>
  8645. <td class="name">
  8646. <strong>node</strong>
  8647. </td>
  8648. <td class="description last">
  8649. <p>The node whose context should be modified.</p>
  8650. </td>
  8651. </tr>
  8652. <tr>
  8653. <td class="name">
  8654. <strong>name</strong>
  8655. </td>
  8656. <td class="description last">
  8657. <p>The name to set.</p>
  8658. </td>
  8659. </tr>
  8660. </tbody>
  8661. </table>
  8662. </div>
  8663. <h3 class="name name-method" id="shadow" translate="no">.<a href="#shadow">shadow</a><span class="signature">( light : <span class="param-type"><a href="Light.html">Light</a></span>, shadow : <span class="param-type"><a href="LightShadow.html">LightShadow</a></span> )</span><span class="type-signature"> : <a href="ShadowNode.html">ShadowNode</a></span> </h3>
  8664. <div class="method">
  8665. <div class="description">
  8666. <p>TSL function for creating an instance of <code>ShadowNode</code>.</p>
  8667. </div>
  8668. <table class="params">
  8669. <tbody>
  8670. <tr>
  8671. <td class="name">
  8672. <strong>light</strong>
  8673. </td>
  8674. <td class="description last">
  8675. <p>The shadow casting light.</p>
  8676. </td>
  8677. </tr>
  8678. <tr>
  8679. <td class="name">
  8680. <strong>shadow</strong>
  8681. </td>
  8682. <td class="description last">
  8683. <p>The light shadow.</p>
  8684. </td>
  8685. </tr>
  8686. </tbody>
  8687. </table>
  8688. <dl class="details">
  8689. <dt class="tag-returns"><strong>Returns:</strong> The created shadow node.</dt>
  8690. </dl>
  8691. </div>
  8692. <h3 class="name name-method" id="shapeCircle" translate="no">.<a href="#shapeCircle">shapeCircle</a><span class="signature">( coord : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  8693. <div class="method">
  8694. <div class="description">
  8695. <p>Generates a circle based on the uv coordinates.</p>
  8696. </div>
  8697. <table class="params">
  8698. <tbody>
  8699. <tr>
  8700. <td class="name">
  8701. <strong>coord</strong>
  8702. </td>
  8703. <td class="description last">
  8704. <p>The uv to generate the circle.</p>
  8705. </td>
  8706. </tr>
  8707. </tbody>
  8708. </table>
  8709. <dl class="details">
  8710. <dt class="tag-returns"><strong>Returns:</strong> The circle shape.</dt>
  8711. </dl>
  8712. </div>
  8713. <h3 class="name name-method" id="sharedUniformGroup" translate="no">.<a href="#sharedUniformGroup">sharedUniformGroup</a><span class="signature">( name : <span class="param-type">string</span>, order : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="UniformGroupNode.html">UniformGroupNode</a></span> </h3>
  8714. <div class="method">
  8715. <div class="description">
  8716. <p>TSL function for creating a shared uniform group node with the given name and order.</p>
  8717. </div>
  8718. <table class="params">
  8719. <tbody>
  8720. <tr>
  8721. <td class="name">
  8722. <strong>name</strong>
  8723. </td>
  8724. <td class="description last">
  8725. <p>The name of the uniform group node.</p>
  8726. </td>
  8727. </tr>
  8728. <tr>
  8729. <td class="name">
  8730. <strong>order</strong>
  8731. </td>
  8732. <td class="description last">
  8733. <p>Influences the internal sorting.</p>
  8734. <p>Default is <code>0</code>.</p>
  8735. </td>
  8736. </tr>
  8737. </tbody>
  8738. </table>
  8739. </div>
  8740. <h3 class="name name-method" id="shiftLeft" translate="no">.<a href="#shiftLeft">shiftLeft</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  8741. <div class="method">
  8742. <div class="description">
  8743. <p>Shifts a node to the left.</p>
  8744. </div>
  8745. <table class="params">
  8746. <tbody>
  8747. <tr>
  8748. <td class="name">
  8749. <strong>a</strong>
  8750. </td>
  8751. <td class="description last">
  8752. <p>The node to shift.</p>
  8753. </td>
  8754. </tr>
  8755. <tr>
  8756. <td class="name">
  8757. <strong>b</strong>
  8758. </td>
  8759. <td class="description last">
  8760. <p>The value to shift.</p>
  8761. </td>
  8762. </tr>
  8763. </tbody>
  8764. </table>
  8765. </div>
  8766. <h3 class="name name-method" id="shiftRight" translate="no">.<a href="#shiftRight">shiftRight</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  8767. <div class="method">
  8768. <div class="description">
  8769. <p>Shifts a node to the right.</p>
  8770. </div>
  8771. <table class="params">
  8772. <tbody>
  8773. <tr>
  8774. <td class="name">
  8775. <strong>a</strong>
  8776. </td>
  8777. <td class="description last">
  8778. <p>The node to shift.</p>
  8779. </td>
  8780. </tr>
  8781. <tr>
  8782. <td class="name">
  8783. <strong>b</strong>
  8784. </td>
  8785. <td class="description last">
  8786. <p>The value to shift.</p>
  8787. </td>
  8788. </tr>
  8789. </tbody>
  8790. </table>
  8791. </div>
  8792. <h3 class="name name-method" id="sign" translate="no">.<a href="#sign">sign</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  8793. <div class="method">
  8794. <div class="description">
  8795. <p>Extracts the sign of the parameter.</p>
  8796. </div>
  8797. <table class="params">
  8798. <tbody>
  8799. <tr>
  8800. <td class="name">
  8801. <strong>x</strong>
  8802. </td>
  8803. <td class="description last">
  8804. <p>The parameter.</p>
  8805. </td>
  8806. </tr>
  8807. </tbody>
  8808. </table>
  8809. </div>
  8810. <h3 class="name name-method" id="sin" translate="no">.<a href="#sin">sin</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  8811. <div class="method">
  8812. <div class="description">
  8813. <p>Returns the sine of the parameter.</p>
  8814. </div>
  8815. <table class="params">
  8816. <tbody>
  8817. <tr>
  8818. <td class="name">
  8819. <strong>x</strong>
  8820. </td>
  8821. <td class="description last">
  8822. <p>The parameter.</p>
  8823. </td>
  8824. </tr>
  8825. </tbody>
  8826. </table>
  8827. </div>
  8828. <h3 class="name name-method" id="sinc" translate="no">.<a href="#sinc">sinc</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, k : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  8829. <div class="method">
  8830. <div class="description">
  8831. <p>A phase shifted sinus curve that starts at zero and ends at zero, with bouncing behavior.
  8832. Reference: <a href="https://iquilezles.org/articles/functions/" target="_blank" rel="noopener">https://iquilezles.org/articles/functions/</a>.</p>
  8833. </div>
  8834. <table class="params">
  8835. <tbody>
  8836. <tr>
  8837. <td class="name">
  8838. <strong>x</strong>
  8839. </td>
  8840. <td class="description last">
  8841. <p>The value to compute the sin for.</p>
  8842. </td>
  8843. </tr>
  8844. <tr>
  8845. <td class="name">
  8846. <strong>k</strong>
  8847. </td>
  8848. <td class="description last">
  8849. <p>Controls the amount of bounces.</p>
  8850. </td>
  8851. </tr>
  8852. </tbody>
  8853. </table>
  8854. <dl class="details">
  8855. <dt class="tag-returns"><strong>Returns:</strong> The result value.</dt>
  8856. </dl>
  8857. </div>
  8858. <h3 class="name name-method" id="skinning" translate="no">.<a href="#skinning">skinning</a><span class="signature">( skinnedMesh : <span class="param-type"><a href="SkinnedMesh.html">SkinnedMesh</a></span> )</span><span class="type-signature"> : <a href="SkinningNode.html">SkinningNode</a></span> </h3>
  8859. <div class="method">
  8860. <div class="description">
  8861. <p>TSL function for creating a skinning node.</p>
  8862. </div>
  8863. <table class="params">
  8864. <tbody>
  8865. <tr>
  8866. <td class="name">
  8867. <strong>skinnedMesh</strong>
  8868. </td>
  8869. <td class="description last">
  8870. <p>The skinned mesh.</p>
  8871. </td>
  8872. </tr>
  8873. </tbody>
  8874. </table>
  8875. </div>
  8876. <h3 class="name name-method" id="smaa" translate="no">.<a href="#smaa">smaa</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span> )</span><span class="type-signature"> : <a href="SMAANode.html">SMAANode</a></span> </h3>
  8877. <div class="method">
  8878. <div class="description">
  8879. <p>TSL function for creating a SMAA node for anti-aliasing via post processing.</p>
  8880. </div>
  8881. <table class="params">
  8882. <tbody>
  8883. <tr>
  8884. <td class="name">
  8885. <strong>node</strong>
  8886. </td>
  8887. <td class="description last">
  8888. <p>The node that represents the input of the effect.</p>
  8889. </td>
  8890. </tr>
  8891. </tbody>
  8892. </table>
  8893. </div>
  8894. <h3 class="name name-method" id="smoothstep" translate="no">.<a href="#smoothstep">smoothstep</a><span class="signature">( low : <span class="param-type"><a href="Node.html">Node</a> | number</span>, high : <span class="param-type"><a href="Node.html">Node</a> | number</span>, x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  8895. <div class="method">
  8896. <div class="description">
  8897. <p>Performs a Hermite interpolation between two values.</p>
  8898. </div>
  8899. <table class="params">
  8900. <tbody>
  8901. <tr>
  8902. <td class="name">
  8903. <strong>low</strong>
  8904. </td>
  8905. <td class="description last">
  8906. <p>The value of the lower edge of the Hermite function.</p>
  8907. </td>
  8908. </tr>
  8909. <tr>
  8910. <td class="name">
  8911. <strong>high</strong>
  8912. </td>
  8913. <td class="description last">
  8914. <p>The value of the upper edge of the Hermite function.</p>
  8915. </td>
  8916. </tr>
  8917. <tr>
  8918. <td class="name">
  8919. <strong>x</strong>
  8920. </td>
  8921. <td class="description last">
  8922. <p>The source value for interpolation.</p>
  8923. </td>
  8924. </tr>
  8925. </tbody>
  8926. </table>
  8927. </div>
  8928. <h3 class="name name-method" id="smoothstepElement" translate="no">.<a href="#smoothstepElement">smoothstepElement</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span>, low : <span class="param-type"><a href="Node.html">Node</a> | number</span>, high : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  8929. <div class="method">
  8930. <div class="description">
  8931. <p>Alias for <code>smoothstep()</code> with a different parameter order.</p>
  8932. </div>
  8933. <table class="params">
  8934. <tbody>
  8935. <tr>
  8936. <td class="name">
  8937. <strong>x</strong>
  8938. </td>
  8939. <td class="description last">
  8940. <p>The source value for interpolation.</p>
  8941. </td>
  8942. </tr>
  8943. <tr>
  8944. <td class="name">
  8945. <strong>low</strong>
  8946. </td>
  8947. <td class="description last">
  8948. <p>The value of the lower edge of the Hermite function.</p>
  8949. </td>
  8950. </tr>
  8951. <tr>
  8952. <td class="name">
  8953. <strong>high</strong>
  8954. </td>
  8955. <td class="description last">
  8956. <p>The value of the upper edge of the Hermite function.</p>
  8957. </td>
  8958. </tr>
  8959. </tbody>
  8960. </table>
  8961. </div>
  8962. <h3 class="name name-method" id="sobel" translate="no">.<a href="#sobel">sobel</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span> )</span><span class="type-signature"> : <a href="SobelOperatorNode.html">SobelOperatorNode</a></span> </h3>
  8963. <div class="method">
  8964. <div class="description">
  8965. <p>TSL function for creating a sobel operator node which performs edge detection with a sobel filter.</p>
  8966. </div>
  8967. <table class="params">
  8968. <tbody>
  8969. <tr>
  8970. <td class="name">
  8971. <strong>node</strong>
  8972. </td>
  8973. <td class="description last">
  8974. <p>The node that represents the input of the effect.</p>
  8975. </td>
  8976. </tr>
  8977. </tbody>
  8978. </table>
  8979. </div>
  8980. <h3 class="name name-method" id="spherizeUV" translate="no">.<a href="#spherizeUV">spherizeUV</a><span class="signature">( uv : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, strength : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, center : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> </h3>
  8981. <div class="method">
  8982. <div class="description">
  8983. <p>Applies a spherical warping effect to the given uv coordinates.</p>
  8984. </div>
  8985. <table class="params">
  8986. <tbody>
  8987. <tr>
  8988. <td class="name">
  8989. <strong>uv</strong>
  8990. </td>
  8991. <td class="description last">
  8992. <p>The uv coordinates.</p>
  8993. </td>
  8994. </tr>
  8995. <tr>
  8996. <td class="name">
  8997. <strong>strength</strong>
  8998. </td>
  8999. <td class="description last">
  9000. <p>The strength of the effect.</p>
  9001. </td>
  9002. </tr>
  9003. <tr>
  9004. <td class="name">
  9005. <strong>center</strong>
  9006. </td>
  9007. <td class="description last">
  9008. <p>The center point</p>
  9009. </td>
  9010. </tr>
  9011. </tbody>
  9012. </table>
  9013. <dl class="details">
  9014. <dt class="tag-returns"><strong>Returns:</strong> The updated uv coordinates.</dt>
  9015. </dl>
  9016. </div>
  9017. <h3 class="name name-method" id="spritesheetUV" translate="no">.<a href="#spritesheetUV">spritesheetUV</a><span class="signature">( countNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span>, frameNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="SpriteSheetUVNode.html">SpriteSheetUVNode</a></span> </h3>
  9018. <div class="method">
  9019. <div class="description">
  9020. <p>TSL function for creating a sprite sheet uv node.</p>
  9021. </div>
  9022. <table class="params">
  9023. <tbody>
  9024. <tr>
  9025. <td class="name">
  9026. <strong>countNode</strong>
  9027. </td>
  9028. <td class="description last">
  9029. <p>The node that defines the number of sprites in the x and y direction (e.g 6x6).</p>
  9030. </td>
  9031. </tr>
  9032. <tr>
  9033. <td class="name">
  9034. <strong>uvNode</strong>
  9035. </td>
  9036. <td class="description last">
  9037. <p>The uv node.</p>
  9038. <p>Default is <code>uv()</code>.</p>
  9039. </td>
  9040. </tr>
  9041. <tr>
  9042. <td class="name">
  9043. <strong>frameNode</strong>
  9044. </td>
  9045. <td class="description last">
  9046. <p>The node that defines the current frame/sprite.</p>
  9047. <p>Default is <code>float()</code>.</p>
  9048. </td>
  9049. </tr>
  9050. </tbody>
  9051. </table>
  9052. </div>
  9053. <h3 class="name name-method" id="sqrt" translate="no">.<a href="#sqrt">sqrt</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  9054. <div class="method">
  9055. <div class="description">
  9056. <p>Returns the square root of the parameter.</p>
  9057. </div>
  9058. <table class="params">
  9059. <tbody>
  9060. <tr>
  9061. <td class="name">
  9062. <strong>x</strong>
  9063. </td>
  9064. <td class="description last">
  9065. <p>The parameter.</p>
  9066. </td>
  9067. </tr>
  9068. </tbody>
  9069. </table>
  9070. </div>
  9071. <h3 class="name name-method" id="ssaaPass" translate="no">.<a href="#ssaaPass">ssaaPass</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span><span class="type-signature"> : <a href="SSAAPassNode.html">SSAAPassNode</a></span> </h3>
  9072. <div class="method">
  9073. <div class="description">
  9074. <p>TSL function for creating a SSAA pass node for Supersampling Anti-Aliasing.</p>
  9075. </div>
  9076. <table class="params">
  9077. <tbody>
  9078. <tr>
  9079. <td class="name">
  9080. <strong>scene</strong>
  9081. </td>
  9082. <td class="description last">
  9083. <p>The scene to render.</p>
  9084. </td>
  9085. </tr>
  9086. <tr>
  9087. <td class="name">
  9088. <strong>camera</strong>
  9089. </td>
  9090. <td class="description last">
  9091. <p>The camera to render the scene with.</p>
  9092. </td>
  9093. </tr>
  9094. </tbody>
  9095. </table>
  9096. </div>
  9097. <h3 class="name name-method" id="ssgi" translate="no">.<a href="#ssgi">ssgi</a><span class="signature">( beautyNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, depthNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, normalNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span><span class="type-signature"> : <a href="SSGINode.html">SSGINode</a></span> </h3>
  9098. <div class="method">
  9099. <div class="description">
  9100. <p>TSL function for creating a SSGI effect.</p>
  9101. </div>
  9102. <table class="params">
  9103. <tbody>
  9104. <tr>
  9105. <td class="name">
  9106. <strong>beautyNode</strong>
  9107. </td>
  9108. <td class="description last">
  9109. <p>The texture node that represents the input of the effect.</p>
  9110. </td>
  9111. </tr>
  9112. <tr>
  9113. <td class="name">
  9114. <strong>depthNode</strong>
  9115. </td>
  9116. <td class="description last">
  9117. <p>A texture node that represents the scene's depth.</p>
  9118. </td>
  9119. </tr>
  9120. <tr>
  9121. <td class="name">
  9122. <strong>normalNode</strong>
  9123. </td>
  9124. <td class="description last">
  9125. <p>A texture node that represents the scene's normals.</p>
  9126. </td>
  9127. </tr>
  9128. <tr>
  9129. <td class="name">
  9130. <strong>camera</strong>
  9131. </td>
  9132. <td class="description last">
  9133. <p>The camera the scene is rendered with.</p>
  9134. </td>
  9135. </tr>
  9136. </tbody>
  9137. </table>
  9138. </div>
  9139. <h3 class="name name-method" id="ssr" translate="no">.<a href="#ssr">ssr</a><span class="signature">( colorNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, depthNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, normalNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, metalnessNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, roughnessNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span><span class="type-signature"> : <a href="SSRNode.html">SSRNode</a></span> </h3>
  9140. <div class="method">
  9141. <div class="description">
  9142. <p>TSL function for creating screen space reflections (SSR).</p>
  9143. </div>
  9144. <table class="params">
  9145. <tbody>
  9146. <tr>
  9147. <td class="name">
  9148. <strong>colorNode</strong>
  9149. </td>
  9150. <td class="description last">
  9151. <p>The node that represents the beauty pass.</p>
  9152. </td>
  9153. </tr>
  9154. <tr>
  9155. <td class="name">
  9156. <strong>depthNode</strong>
  9157. </td>
  9158. <td class="description last">
  9159. <p>A node that represents the beauty pass's depth.</p>
  9160. </td>
  9161. </tr>
  9162. <tr>
  9163. <td class="name">
  9164. <strong>normalNode</strong>
  9165. </td>
  9166. <td class="description last">
  9167. <p>A node that represents the beauty pass's normals.</p>
  9168. </td>
  9169. </tr>
  9170. <tr>
  9171. <td class="name">
  9172. <strong>metalnessNode</strong>
  9173. </td>
  9174. <td class="description last">
  9175. <p>A node that represents the beauty pass's metalness.</p>
  9176. </td>
  9177. </tr>
  9178. <tr>
  9179. <td class="name">
  9180. <strong>roughnessNode</strong>
  9181. </td>
  9182. <td class="description last">
  9183. <p>A node that represents the beauty pass's roughness.</p>
  9184. <p>Default is <code>null</code>.</p>
  9185. </td>
  9186. </tr>
  9187. <tr>
  9188. <td class="name">
  9189. <strong>camera</strong>
  9190. </td>
  9191. <td class="description last">
  9192. <p>The camera the scene is rendered with.</p>
  9193. <p>Default is <code>null</code>.</p>
  9194. </td>
  9195. </tr>
  9196. </tbody>
  9197. </table>
  9198. </div>
  9199. <h3 class="name name-method" id="sss" translate="no">.<a href="#sss">sss</a><span class="signature">( depthNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, mainLight : <span class="param-type"><a href="DirectionalLight.html">DirectionalLight</a></span> )</span><span class="type-signature"> : <a href="SSSNode.html">SSSNode</a></span> </h3>
  9200. <div class="method">
  9201. <div class="description">
  9202. <p>TSL function for creating a SSS effect.</p>
  9203. </div>
  9204. <table class="params">
  9205. <tbody>
  9206. <tr>
  9207. <td class="name">
  9208. <strong>depthNode</strong>
  9209. </td>
  9210. <td class="description last">
  9211. <p>A texture node that represents the scene's depth.</p>
  9212. </td>
  9213. </tr>
  9214. <tr>
  9215. <td class="name">
  9216. <strong>camera</strong>
  9217. </td>
  9218. <td class="description last">
  9219. <p>The camera the scene is rendered with.</p>
  9220. </td>
  9221. </tr>
  9222. <tr>
  9223. <td class="name">
  9224. <strong>mainLight</strong>
  9225. </td>
  9226. <td class="description last">
  9227. <p>The main directional light of the scene.</p>
  9228. </td>
  9229. </tr>
  9230. </tbody>
  9231. </table>
  9232. </div>
  9233. <h3 class="name name-method" id="stack" translate="no">.<a href="#stack">stack</a><span class="signature">( parent : <span class="param-type"><a href="StackNode.html">StackNode</a></span> )</span><span class="type-signature"> : <a href="StackNode.html">StackNode</a></span> </h3>
  9234. <div class="method">
  9235. <div class="description">
  9236. <p>TSL function for creating a stack node.</p>
  9237. </div>
  9238. <table class="params">
  9239. <tbody>
  9240. <tr>
  9241. <td class="name">
  9242. <strong>parent</strong>
  9243. </td>
  9244. <td class="description last">
  9245. <p>The parent stack node.</p>
  9246. <p>Default is <code>null</code>.</p>
  9247. </td>
  9248. </tr>
  9249. </tbody>
  9250. </table>
  9251. </div>
  9252. <h3 class="name name-method" id="step" translate="no">.<a href="#step">step</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span>, y : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  9253. <div class="method">
  9254. <div class="description">
  9255. <p>Generate a step function by comparing two values.</p>
  9256. </div>
  9257. <table class="params">
  9258. <tbody>
  9259. <tr>
  9260. <td class="name">
  9261. <strong>x</strong>
  9262. </td>
  9263. <td class="description last">
  9264. <p>The y parameter.</p>
  9265. </td>
  9266. </tr>
  9267. <tr>
  9268. <td class="name">
  9269. <strong>y</strong>
  9270. </td>
  9271. <td class="description last">
  9272. <p>The x parameter.</p>
  9273. </td>
  9274. </tr>
  9275. </tbody>
  9276. </table>
  9277. </div>
  9278. <h3 class="name name-method" id="stepElement" translate="no">.<a href="#stepElement">stepElement</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span>, edge : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  9279. <div class="method">
  9280. <div class="description">
  9281. <p>Alias for <code>step()</code> with a different parameter order.</p>
  9282. </div>
  9283. <table class="params">
  9284. <tbody>
  9285. <tr>
  9286. <td class="name">
  9287. <strong>x</strong>
  9288. </td>
  9289. <td class="description last">
  9290. <p>The source value for interpolation.</p>
  9291. </td>
  9292. </tr>
  9293. <tr>
  9294. <td class="name">
  9295. <strong>edge</strong>
  9296. </td>
  9297. <td class="description last">
  9298. <p>The edge value.</p>
  9299. </td>
  9300. </tr>
  9301. </tbody>
  9302. </table>
  9303. </div>
  9304. <h3 class="name name-method" id="stereoPass" translate="no">.<a href="#stereoPass">stereoPass</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span><span class="type-signature"> : <a href="StereoPassNode.html">StereoPassNode</a></span> </h3>
  9305. <div class="method">
  9306. <div class="description">
  9307. <p>TSL function for creating a stereo pass node for stereoscopic rendering.</p>
  9308. </div>
  9309. <table class="params">
  9310. <tbody>
  9311. <tr>
  9312. <td class="name">
  9313. <strong>scene</strong>
  9314. </td>
  9315. <td class="description last">
  9316. <p>The scene to render.</p>
  9317. </td>
  9318. </tr>
  9319. <tr>
  9320. <td class="name">
  9321. <strong>camera</strong>
  9322. </td>
  9323. <td class="description last">
  9324. <p>The camera to render the scene with.</p>
  9325. </td>
  9326. </tr>
  9327. </tbody>
  9328. </table>
  9329. </div>
  9330. <h3 class="name name-method" id="storage" translate="no">.<a href="#storage">storage</a><span class="signature">( value : <span class="param-type"><a href="StorageBufferAttribute.html">StorageBufferAttribute</a> | <a href="StorageInstancedBufferAttribute.html">StorageInstancedBufferAttribute</a> | <a href="BufferAttribute.html">BufferAttribute</a></span>, type : <span class="param-type">string | Struct</span>, count : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="StorageBufferNode.html">StorageBufferNode</a></span> </h3>
  9331. <div class="method">
  9332. <div class="description">
  9333. <p>TSL function for creating a storage buffer node.</p>
  9334. </div>
  9335. <table class="params">
  9336. <tbody>
  9337. <tr>
  9338. <td class="name">
  9339. <strong>value</strong>
  9340. </td>
  9341. <td class="description last">
  9342. <p>The buffer data.</p>
  9343. </td>
  9344. </tr>
  9345. <tr>
  9346. <td class="name">
  9347. <strong>type</strong>
  9348. </td>
  9349. <td class="description last">
  9350. <p>The buffer type (e.g. <code>'vec3'</code>).</p>
  9351. <p>Default is <code>null</code>.</p>
  9352. </td>
  9353. </tr>
  9354. <tr>
  9355. <td class="name">
  9356. <strong>count</strong>
  9357. </td>
  9358. <td class="description last">
  9359. <p>The buffer count.</p>
  9360. <p>Default is <code>0</code>.</p>
  9361. </td>
  9362. </tr>
  9363. </tbody>
  9364. </table>
  9365. </div>
  9366. <h3 class="name name-method" id="storageBarrier" translate="no">.<a href="#storageBarrier">storageBarrier</a><span class="signature">()</span><span class="type-signature"> : <a href="BarrierNode.html">BarrierNode</a></span> </h3>
  9367. <div class="method">
  9368. <div class="description">
  9369. <p>TSL function for creating a storage barrier. All invocations must
  9370. wait for each access to variables within the 'storage' address space
  9371. to complete before the barrier can be passed.</p>
  9372. </div>
  9373. </div>
  9374. <h3 class="name name-method" id="storageElement" translate="no">.<a href="#storageElement">storageElement</a><span class="signature">( storageBufferNode : <span class="param-type"><a href="StorageBufferNode.html">StorageBufferNode</a></span>, indexNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="StorageArrayElementNode.html">StorageArrayElementNode</a></span> </h3>
  9375. <div class="method">
  9376. <div class="description">
  9377. <p>TSL function for creating a storage element node.</p>
  9378. </div>
  9379. <table class="params">
  9380. <tbody>
  9381. <tr>
  9382. <td class="name">
  9383. <strong>storageBufferNode</strong>
  9384. </td>
  9385. <td class="description last">
  9386. <p>The storage buffer node.</p>
  9387. </td>
  9388. </tr>
  9389. <tr>
  9390. <td class="name">
  9391. <strong>indexNode</strong>
  9392. </td>
  9393. <td class="description last">
  9394. <p>The index node that defines the element access.</p>
  9395. </td>
  9396. </tr>
  9397. </tbody>
  9398. </table>
  9399. </div>
  9400. <h3 class="name name-method" id="storageTexture" translate="no">.<a href="#storageTexture">storageTexture</a><span class="signature">( value : <span class="param-type"><a href="StorageTexture.html">StorageTexture</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3)></span>, storeNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="StorageTextureNode.html">StorageTextureNode</a></span> </h3>
  9401. <div class="method">
  9402. <div class="description">
  9403. <p>TSL function for creating a storage texture node.</p>
  9404. </div>
  9405. <table class="params">
  9406. <tbody>
  9407. <tr>
  9408. <td class="name">
  9409. <strong>value</strong>
  9410. </td>
  9411. <td class="description last">
  9412. <p>The storage texture.</p>
  9413. </td>
  9414. </tr>
  9415. <tr>
  9416. <td class="name">
  9417. <strong>uvNode</strong>
  9418. </td>
  9419. <td class="description last">
  9420. <p>The uv node.</p>
  9421. </td>
  9422. </tr>
  9423. <tr>
  9424. <td class="name">
  9425. <strong>storeNode</strong>
  9426. </td>
  9427. <td class="description last">
  9428. <p>The value node that should be stored in the texture.</p>
  9429. <p>Default is <code>null</code>.</p>
  9430. </td>
  9431. </tr>
  9432. </tbody>
  9433. </table>
  9434. </div>
  9435. <h3 class="name name-method" id="struct" translate="no">.<a href="#struct">struct</a><span class="signature">( membersLayout : <span class="param-type">Object</span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : function</span> </h3>
  9436. <div class="method">
  9437. <div class="description">
  9438. <p>TSL function for creating a struct node.</p>
  9439. </div>
  9440. <table class="params">
  9441. <tbody>
  9442. <tr>
  9443. <td class="name">
  9444. <strong>membersLayout</strong>
  9445. </td>
  9446. <td class="description last">
  9447. <p>The layout of the struct members.</p>
  9448. </td>
  9449. </tr>
  9450. <tr>
  9451. <td class="name">
  9452. <strong>name</strong>
  9453. </td>
  9454. <td class="description last">
  9455. <p>The name of the struct.</p>
  9456. <p>Default is <code>null</code>.</p>
  9457. </td>
  9458. </tr>
  9459. </tbody>
  9460. </table>
  9461. <dl class="details">
  9462. <dt class="tag-returns"><strong>Returns:</strong> The struct function.</dt>
  9463. </dl>
  9464. </div>
  9465. <h3 class="name name-method" id="sub" translate="no">.<a href="#sub">sub</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span>, &hellip;params : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  9466. <div class="method">
  9467. <div class="description">
  9468. <p>Returns the subtraction of two or more value.</p>
  9469. </div>
  9470. <table class="params">
  9471. <tbody>
  9472. <tr>
  9473. <td class="name">
  9474. <strong>a</strong>
  9475. </td>
  9476. <td class="description last">
  9477. <p>The first input.</p>
  9478. </td>
  9479. </tr>
  9480. <tr>
  9481. <td class="name">
  9482. <strong>b</strong>
  9483. </td>
  9484. <td class="description last">
  9485. <p>The second input.</p>
  9486. </td>
  9487. </tr>
  9488. <tr>
  9489. <td class="name">
  9490. <strong>params</strong>
  9491. </td>
  9492. <td class="description last">
  9493. <p>Additional input parameters.</p>
  9494. </td>
  9495. </tr>
  9496. </tbody>
  9497. </table>
  9498. </div>
  9499. <h3 class="name name-method" id="subBuild" translate="no">.<a href="#subBuild">subBuild</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span>, type : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  9500. <div class="method">
  9501. <div class="description">
  9502. <p>Creates a new sub-build node.</p>
  9503. </div>
  9504. <table class="params">
  9505. <tbody>
  9506. <tr>
  9507. <td class="name">
  9508. <strong>node</strong>
  9509. </td>
  9510. <td class="description last">
  9511. <p>The node to be built in the sub-build.</p>
  9512. </td>
  9513. </tr>
  9514. <tr>
  9515. <td class="name">
  9516. <strong>name</strong>
  9517. </td>
  9518. <td class="description last">
  9519. <p>The name of the sub-build.</p>
  9520. </td>
  9521. </tr>
  9522. <tr>
  9523. <td class="name">
  9524. <strong>type</strong>
  9525. </td>
  9526. <td class="description last">
  9527. <p>The type of the node, if known.</p>
  9528. <p>Default is <code>null</code>.</p>
  9529. </td>
  9530. </tr>
  9531. </tbody>
  9532. </table>
  9533. <dl class="details">
  9534. <dt class="tag-returns"><strong>Returns:</strong> A node object wrapping the SubBuildNode instance.</dt>
  9535. </dl>
  9536. </div>
  9537. <h3 class="name name-method" id="subgroupAdd" translate="no">.<a href="#subgroupAdd">subgroupAdd</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9538. <div class="method">
  9539. <div class="description">
  9540. <p>A reduction that adds e among all active invocations and returns that result.</p>
  9541. </div>
  9542. <table class="params">
  9543. <tbody>
  9544. <tr>
  9545. <td class="name">
  9546. <strong>e</strong>
  9547. </td>
  9548. <td class="description last">
  9549. <p>The value provided to the reduction by the current invocation.</p>
  9550. </td>
  9551. </tr>
  9552. </tbody>
  9553. </table>
  9554. <dl class="details">
  9555. <dt class="tag-returns"><strong>Returns:</strong> The accumulated result of the reduction operation.</dt>
  9556. </dl>
  9557. </div>
  9558. <h3 class="name name-method" id="subgroupAll" translate="no">.<a href="#subgroupAll">subgroupAll</a><span class="signature">()</span><span class="type-signature"> : bool</span> </h3>
  9559. <div class="method">
  9560. <div class="description">
  9561. <p>Returns true if e is true for all active invocations in the subgroup.</p>
  9562. </div>
  9563. <dl class="details">
  9564. <dt class="tag-returns"><strong>Returns:</strong> The result of the computation.</dt>
  9565. </dl>
  9566. </div>
  9567. <h3 class="name name-method" id="subgroupAnd" translate="no">.<a href="#subgroupAnd">subgroupAnd</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9568. <div class="method">
  9569. <div class="description">
  9570. <p>A reduction that performs a bitwise and of e among all active invocations and returns that result.</p>
  9571. </div>
  9572. <table class="params">
  9573. <tbody>
  9574. <tr>
  9575. <td class="name">
  9576. <strong>e</strong>
  9577. </td>
  9578. <td class="description last">
  9579. <p>The value provided to the reduction by the current invocation.</p>
  9580. </td>
  9581. </tr>
  9582. </tbody>
  9583. </table>
  9584. <dl class="details">
  9585. <dt class="tag-returns"><strong>Returns:</strong> The result of the reduction operation.</dt>
  9586. </dl>
  9587. </div>
  9588. <h3 class="name name-method" id="subgroupAny" translate="no">.<a href="#subgroupAny">subgroupAny</a><span class="signature">()</span><span class="type-signature"> : bool</span> </h3>
  9589. <div class="method">
  9590. <div class="description">
  9591. <p>Returns true if e is true for any active invocation in the subgroup</p>
  9592. </div>
  9593. <dl class="details">
  9594. <dt class="tag-returns"><strong>Returns:</strong> The result of the computation.</dt>
  9595. </dl>
  9596. </div>
  9597. <h3 class="name name-method" id="subgroupBallot" translate="no">.<a href="#subgroupBallot">subgroupBallot</a><span class="signature">( pred : <span class="param-type">bool</span> )</span><span class="type-signature"> : vec4..&lt;u32></span> </h3>
  9598. <div class="method">
  9599. <div class="description">
  9600. <p>Returns a set of bitfields where the bit corresponding to subgroup_invocation_id
  9601. is 1 if pred is true for that active invocation and 0 otherwise.</p>
  9602. </div>
  9603. <table class="params">
  9604. <tbody>
  9605. <tr>
  9606. <td class="name">
  9607. <strong>pred</strong>
  9608. </td>
  9609. <td class="description last">
  9610. <p>A boolean that sets the bit corresponding to the invocations subgroup invocation id.</p>
  9611. </td>
  9612. </tr>
  9613. </tbody>
  9614. </table>
  9615. <dl class="details">
  9616. <dt class="tag-returns"><strong>Returns:</strong> <ul>
  9617. <li>A bitfield corresponding to the pred value of each subgroup invocation.</li>
  9618. </ul></dt>
  9619. </dl>
  9620. </div>
  9621. <h3 class="name name-method" id="subgroupBroadcast" translate="no">.<a href="#subgroupBroadcast">subgroupBroadcast</a><span class="signature">( e : <span class="param-type">number</span>, id : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9622. <div class="method">
  9623. <div class="description">
  9624. <p>Broadcasts e from the invocation whose subgroup_invocation_id matches id, to all active invocations.</p>
  9625. </div>
  9626. <table class="params">
  9627. <tbody>
  9628. <tr>
  9629. <td class="name">
  9630. <strong>e</strong>
  9631. </td>
  9632. <td class="description last">
  9633. <p>The value to broadcast from subgroup invocation 'id'.</p>
  9634. </td>
  9635. </tr>
  9636. <tr>
  9637. <td class="name">
  9638. <strong>id</strong>
  9639. </td>
  9640. <td class="description last">
  9641. <p>The subgroup invocation to broadcast from.</p>
  9642. </td>
  9643. </tr>
  9644. </tbody>
  9645. </table>
  9646. <dl class="details">
  9647. <dt class="tag-returns"><strong>Returns:</strong> The broadcast value.</dt>
  9648. </dl>
  9649. </div>
  9650. <h3 class="name name-method" id="subgroupBroadcastFirst" translate="no">.<a href="#subgroupBroadcastFirst">subgroupBroadcastFirst</a><span class="signature">( e : <span class="param-type">number</span>, id : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9651. <div class="method">
  9652. <div class="description">
  9653. <p>Broadcasts e from the active invocation with the lowest subgroup_invocation_id in the subgroup to all other active invocations.</p>
  9654. </div>
  9655. <table class="params">
  9656. <tbody>
  9657. <tr>
  9658. <td class="name">
  9659. <strong>e</strong>
  9660. </td>
  9661. <td class="description last">
  9662. <p>The value to broadcast from the lowest subgroup invocation.</p>
  9663. </td>
  9664. </tr>
  9665. <tr>
  9666. <td class="name">
  9667. <strong>id</strong>
  9668. </td>
  9669. <td class="description last">
  9670. <p>The subgroup invocation to broadcast from.</p>
  9671. </td>
  9672. </tr>
  9673. </tbody>
  9674. </table>
  9675. <dl class="details">
  9676. <dt class="tag-returns"><strong>Returns:</strong> The broadcast value.</dt>
  9677. </dl>
  9678. </div>
  9679. <h3 class="name name-method" id="subgroupElect" translate="no">.<a href="#subgroupElect">subgroupElect</a><span class="signature">()</span><span class="type-signature"> : bool</span> </h3>
  9680. <div class="method">
  9681. <div class="description">
  9682. <p>Returns true if this invocation has the lowest subgroup_invocation_id
  9683. among active invocations in the subgroup.</p>
  9684. </div>
  9685. <dl class="details">
  9686. <dt class="tag-returns"><strong>Returns:</strong> The result of the computation.</dt>
  9687. </dl>
  9688. </div>
  9689. <h3 class="name name-method" id="subgroupExclusiveAdd" translate="no">.<a href="#subgroupExclusiveAdd">subgroupExclusiveAdd</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9690. <div class="method">
  9691. <div class="description">
  9692. <p>An exclusive scan that returns the sum of e for all active invocations with subgroup_invocation_id less than this invocation.</p>
  9693. </div>
  9694. <table class="params">
  9695. <tbody>
  9696. <tr>
  9697. <td class="name">
  9698. <strong>e</strong>
  9699. </td>
  9700. <td class="description last">
  9701. <p>The value provided to the exclusive scan by the current invocation.</p>
  9702. </td>
  9703. </tr>
  9704. </tbody>
  9705. </table>
  9706. <dl class="details">
  9707. <dt class="tag-returns"><strong>Returns:</strong> The accumulated result of the exclusive scan operation.</dt>
  9708. </dl>
  9709. </div>
  9710. <h3 class="name name-method" id="subgroupExclusiveMul" translate="no">.<a href="#subgroupExclusiveMul">subgroupExclusiveMul</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9711. <div class="method">
  9712. <div class="description">
  9713. <p>An exclusive scan that returns the product of e for all active invocations with subgroup_invocation_id less than this invocation.</p>
  9714. </div>
  9715. <table class="params">
  9716. <tbody>
  9717. <tr>
  9718. <td class="name">
  9719. <strong>e</strong>
  9720. </td>
  9721. <td class="description last">
  9722. <p>The value provided to the exclusive scan by the current invocation.</p>
  9723. </td>
  9724. </tr>
  9725. </tbody>
  9726. </table>
  9727. <dl class="details">
  9728. <dt class="tag-returns"><strong>Returns:</strong> The accumulated result of the exclusive scan operation.</dt>
  9729. </dl>
  9730. </div>
  9731. <h3 class="name name-method" id="subgroupInclusiveAdd" translate="no">.<a href="#subgroupInclusiveAdd">subgroupInclusiveAdd</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9732. <div class="method">
  9733. <div class="description">
  9734. <p>An inclusive scan returning the sum of e for all active invocations with subgroup_invocation_id less than or equal to this invocation.</p>
  9735. </div>
  9736. <table class="params">
  9737. <tbody>
  9738. <tr>
  9739. <td class="name">
  9740. <strong>e</strong>
  9741. </td>
  9742. <td class="description last">
  9743. <p>The value provided to the inclusive scan by the current invocation.</p>
  9744. </td>
  9745. </tr>
  9746. </tbody>
  9747. </table>
  9748. <dl class="details">
  9749. <dt class="tag-returns"><strong>Returns:</strong> The accumulated result of the inclusive scan operation.</dt>
  9750. </dl>
  9751. </div>
  9752. <h3 class="name name-method" id="subgroupInclusiveMul" translate="no">.<a href="#subgroupInclusiveMul">subgroupInclusiveMul</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9753. <div class="method">
  9754. <div class="description">
  9755. <p>An inclusive scan returning the product of e for all active invocations with subgroup_invocation_id less than or equal to this invocation.</p>
  9756. </div>
  9757. <table class="params">
  9758. <tbody>
  9759. <tr>
  9760. <td class="name">
  9761. <strong>e</strong>
  9762. </td>
  9763. <td class="description last">
  9764. <p>The value provided to the inclusive scan by the current invocation.</p>
  9765. </td>
  9766. </tr>
  9767. </tbody>
  9768. </table>
  9769. <dl class="details">
  9770. <dt class="tag-returns"><strong>Returns:</strong> The accumulated result of the inclusive scan operation.</dt>
  9771. </dl>
  9772. </div>
  9773. <h3 class="name name-method" id="subgroupMax" translate="no">.<a href="#subgroupMax">subgroupMax</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9774. <div class="method">
  9775. <div class="description">
  9776. <p>A reduction that performs a max of e among all active invocations and returns that result.</p>
  9777. </div>
  9778. <table class="params">
  9779. <tbody>
  9780. <tr>
  9781. <td class="name">
  9782. <strong>e</strong>
  9783. </td>
  9784. <td class="description last">
  9785. <p>The value provided to the reduction by the current invocation.</p>
  9786. </td>
  9787. </tr>
  9788. </tbody>
  9789. </table>
  9790. <dl class="details">
  9791. <dt class="tag-returns"><strong>Returns:</strong> The result of the reduction operation.</dt>
  9792. </dl>
  9793. </div>
  9794. <h3 class="name name-method" id="subgroupMin" translate="no">.<a href="#subgroupMin">subgroupMin</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9795. <div class="method">
  9796. <div class="description">
  9797. <p>A reduction that performs a min of e among all active invocations and returns that result.</p>
  9798. </div>
  9799. <table class="params">
  9800. <tbody>
  9801. <tr>
  9802. <td class="name">
  9803. <strong>e</strong>
  9804. </td>
  9805. <td class="description last">
  9806. <p>The value provided to the reduction by the current invocation.</p>
  9807. </td>
  9808. </tr>
  9809. </tbody>
  9810. </table>
  9811. <dl class="details">
  9812. <dt class="tag-returns"><strong>Returns:</strong> The result of the reduction operation.</dt>
  9813. </dl>
  9814. </div>
  9815. <h3 class="name name-method" id="subgroupMul" translate="no">.<a href="#subgroupMul">subgroupMul</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9816. <div class="method">
  9817. <div class="description">
  9818. <p>A reduction that multiplies e among all active invocations and returns that result.</p>
  9819. </div>
  9820. <table class="params">
  9821. <tbody>
  9822. <tr>
  9823. <td class="name">
  9824. <strong>e</strong>
  9825. </td>
  9826. <td class="description last">
  9827. <p>The value provided to the reduction by the current invocation.</p>
  9828. </td>
  9829. </tr>
  9830. </tbody>
  9831. </table>
  9832. <dl class="details">
  9833. <dt class="tag-returns"><strong>Returns:</strong> The accumulated result of the reduction operation.</dt>
  9834. </dl>
  9835. </div>
  9836. <h3 class="name name-method" id="subgroupOr" translate="no">.<a href="#subgroupOr">subgroupOr</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9837. <div class="method">
  9838. <div class="description">
  9839. <p>A reduction that performs a bitwise or of e among all active invocations and returns that result.</p>
  9840. </div>
  9841. <table class="params">
  9842. <tbody>
  9843. <tr>
  9844. <td class="name">
  9845. <strong>e</strong>
  9846. </td>
  9847. <td class="description last">
  9848. <p>The value provided to the reduction by the current invocation.</p>
  9849. </td>
  9850. </tr>
  9851. </tbody>
  9852. </table>
  9853. <dl class="details">
  9854. <dt class="tag-returns"><strong>Returns:</strong> The result of the reduction operation.</dt>
  9855. </dl>
  9856. </div>
  9857. <h3 class="name name-method" id="subgroupShuffle" translate="no">.<a href="#subgroupShuffle">subgroupShuffle</a><span class="signature">( v : <span class="param-type">number</span>, id : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9858. <div class="method">
  9859. <div class="description">
  9860. <p>Returns v from the active invocation whose subgroup_invocation_id matches id</p>
  9861. </div>
  9862. <table class="params">
  9863. <tbody>
  9864. <tr>
  9865. <td class="name">
  9866. <strong>v</strong>
  9867. </td>
  9868. <td class="description last">
  9869. <p>The value to return from subgroup invocation id^mask.</p>
  9870. </td>
  9871. </tr>
  9872. <tr>
  9873. <td class="name">
  9874. <strong>id</strong>
  9875. </td>
  9876. <td class="description last">
  9877. <p>The subgroup invocation which returns the value v.</p>
  9878. </td>
  9879. </tr>
  9880. </tbody>
  9881. </table>
  9882. <dl class="details">
  9883. <dt class="tag-returns"><strong>Returns:</strong> The broadcast value.</dt>
  9884. </dl>
  9885. </div>
  9886. <h3 class="name name-method" id="subgroupShuffleDown" translate="no">.<a href="#subgroupShuffleDown">subgroupShuffleDown</a><span class="signature">( v : <span class="param-type">number</span>, delta : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9887. <div class="method">
  9888. <div class="description">
  9889. <p>Returns v from the active invocation whose subgroup_invocation_id matches subgroup_invocation_id + delta</p>
  9890. </div>
  9891. <table class="params">
  9892. <tbody>
  9893. <tr>
  9894. <td class="name">
  9895. <strong>v</strong>
  9896. </td>
  9897. <td class="description last">
  9898. <p>The value to return from subgroup invocation id^mask.</p>
  9899. </td>
  9900. </tr>
  9901. <tr>
  9902. <td class="name">
  9903. <strong>delta</strong>
  9904. </td>
  9905. <td class="description last">
  9906. <p>A value that offsets the current subgroup invocation.</p>
  9907. </td>
  9908. </tr>
  9909. </tbody>
  9910. </table>
  9911. <dl class="details">
  9912. <dt class="tag-returns"><strong>Returns:</strong> The broadcast value.</dt>
  9913. </dl>
  9914. </div>
  9915. <h3 class="name name-method" id="subgroupShuffleUp" translate="no">.<a href="#subgroupShuffleUp">subgroupShuffleUp</a><span class="signature">( v : <span class="param-type">number</span>, delta : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9916. <div class="method">
  9917. <div class="description">
  9918. <p>Returns v from the active invocation whose subgroup_invocation_id matches subgroup_invocation_id - delta</p>
  9919. </div>
  9920. <table class="params">
  9921. <tbody>
  9922. <tr>
  9923. <td class="name">
  9924. <strong>v</strong>
  9925. </td>
  9926. <td class="description last">
  9927. <p>The value to return from subgroup invocation id^mask.</p>
  9928. </td>
  9929. </tr>
  9930. <tr>
  9931. <td class="name">
  9932. <strong>delta</strong>
  9933. </td>
  9934. <td class="description last">
  9935. <p>A value that offsets the current in.</p>
  9936. </td>
  9937. </tr>
  9938. </tbody>
  9939. </table>
  9940. <dl class="details">
  9941. <dt class="tag-returns"><strong>Returns:</strong> The broadcast value.</dt>
  9942. </dl>
  9943. </div>
  9944. <h3 class="name name-method" id="subgroupShuffleXor" translate="no">.<a href="#subgroupShuffleXor">subgroupShuffleXor</a><span class="signature">( v : <span class="param-type">number</span>, mask : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9945. <div class="method">
  9946. <div class="description">
  9947. <p>Returns v from the active invocation whose subgroup_invocation_id matches subgroup_invocation_id ^ mask.</p>
  9948. </div>
  9949. <table class="params">
  9950. <tbody>
  9951. <tr>
  9952. <td class="name">
  9953. <strong>v</strong>
  9954. </td>
  9955. <td class="description last">
  9956. <p>The value to return from subgroup invocation id^mask.</p>
  9957. </td>
  9958. </tr>
  9959. <tr>
  9960. <td class="name">
  9961. <strong>mask</strong>
  9962. </td>
  9963. <td class="description last">
  9964. <p>A bitmask that determines the target invocation via a XOR operation.</p>
  9965. </td>
  9966. </tr>
  9967. </tbody>
  9968. </table>
  9969. <dl class="details">
  9970. <dt class="tag-returns"><strong>Returns:</strong> The broadcast value.</dt>
  9971. </dl>
  9972. </div>
  9973. <h3 class="name name-method" id="subgroupXor" translate="no">.<a href="#subgroupXor">subgroupXor</a><span class="signature">( e : <span class="param-type">number</span> )</span><span class="type-signature"> : number</span> </h3>
  9974. <div class="method">
  9975. <div class="description">
  9976. <p>A reduction that performs a bitwise xor of e among all active invocations and returns that result.</p>
  9977. </div>
  9978. <table class="params">
  9979. <tbody>
  9980. <tr>
  9981. <td class="name">
  9982. <strong>e</strong>
  9983. </td>
  9984. <td class="description last">
  9985. <p>The value provided to the reduction by the current invocation.</p>
  9986. </td>
  9987. </tr>
  9988. </tbody>
  9989. </table>
  9990. <dl class="details">
  9991. <dt class="tag-returns"><strong>Returns:</strong> The result of the reduction operation.</dt>
  9992. </dl>
  9993. </div>
  9994. <h3 class="name name-method" id="tan" translate="no">.<a href="#tan">tan</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  9995. <div class="method">
  9996. <div class="description">
  9997. <p>Returns the tangent of the parameter.</p>
  9998. </div>
  9999. <table class="params">
  10000. <tbody>
  10001. <tr>
  10002. <td class="name">
  10003. <strong>x</strong>
  10004. </td>
  10005. <td class="description last">
  10006. <p>The parameter.</p>
  10007. </td>
  10008. </tr>
  10009. </tbody>
  10010. </table>
  10011. </div>
  10012. <h3 class="name name-method" id="texture" translate="no">.<a href="#texture">texture</a><span class="signature">( value : <span class="param-type"><a href="Texture.html">Texture</a> | <a href="TextureNode.html">TextureNode</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3)></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, biasNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  10013. <div class="method">
  10014. <div class="description">
  10015. <p>TSL function for creating a texture node or sample a texture node already existing.</p>
  10016. </div>
  10017. <table class="params">
  10018. <tbody>
  10019. <tr>
  10020. <td class="name">
  10021. <strong>value</strong>
  10022. </td>
  10023. <td class="description last">
  10024. <p>The texture.</p>
  10025. <p>Default is <code>EmptyTexture</code>.</p>
  10026. </td>
  10027. </tr>
  10028. <tr>
  10029. <td class="name">
  10030. <strong>uvNode</strong>
  10031. </td>
  10032. <td class="description last">
  10033. <p>The uv node.</p>
  10034. <p>Default is <code>null</code>.</p>
  10035. </td>
  10036. </tr>
  10037. <tr>
  10038. <td class="name">
  10039. <strong>levelNode</strong>
  10040. </td>
  10041. <td class="description last">
  10042. <p>The level node.</p>
  10043. <p>Default is <code>null</code>.</p>
  10044. </td>
  10045. </tr>
  10046. <tr>
  10047. <td class="name">
  10048. <strong>biasNode</strong>
  10049. </td>
  10050. <td class="description last">
  10051. <p>The bias node.</p>
  10052. <p>Default is <code>null</code>.</p>
  10053. </td>
  10054. </tr>
  10055. </tbody>
  10056. </table>
  10057. </div>
  10058. <h3 class="name name-method" id="texture3D" translate="no">.<a href="#texture3D">texture3D</a><span class="signature">( value : <span class="param-type"><a href="Data3DTexture.html">Data3DTexture</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span> )</span><span class="type-signature"> : <a href="Texture3DNode.html">Texture3DNode</a></span> </h3>
  10059. <div class="method">
  10060. <div class="description">
  10061. <p>TSL function for creating a 3D texture node.</p>
  10062. </div>
  10063. <table class="params">
  10064. <tbody>
  10065. <tr>
  10066. <td class="name">
  10067. <strong>value</strong>
  10068. </td>
  10069. <td class="description last">
  10070. <p>The 3D texture.</p>
  10071. </td>
  10072. </tr>
  10073. <tr>
  10074. <td class="name">
  10075. <strong>uvNode</strong>
  10076. </td>
  10077. <td class="description last">
  10078. <p>The uv node.</p>
  10079. <p>Default is <code>null</code>.</p>
  10080. </td>
  10081. </tr>
  10082. <tr>
  10083. <td class="name">
  10084. <strong>levelNode</strong>
  10085. </td>
  10086. <td class="description last">
  10087. <p>The level node.</p>
  10088. <p>Default is <code>null</code>.</p>
  10089. </td>
  10090. </tr>
  10091. </tbody>
  10092. </table>
  10093. </div>
  10094. <h3 class="name name-method" id="texture3DLevel" translate="no">.<a href="#texture3DLevel">texture3DLevel</a><span class="signature">( value : <span class="param-type"><a href="Texture.html">Texture</a> | <a href="TextureNode.html">TextureNode</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span> )</span><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  10095. <div class="method">
  10096. <div class="description">
  10097. <p>TSL function for creating a texture node that fetches/loads texels without interpolation.</p>
  10098. </div>
  10099. <table class="params">
  10100. <tbody>
  10101. <tr>
  10102. <td class="name">
  10103. <strong>value</strong>
  10104. </td>
  10105. <td class="description last">
  10106. <p>The texture.</p>
  10107. <p>Default is <code>EmptyTexture</code>.</p>
  10108. </td>
  10109. </tr>
  10110. <tr>
  10111. <td class="name">
  10112. <strong>uvNode</strong>
  10113. </td>
  10114. <td class="description last">
  10115. <p>The uv node.</p>
  10116. <p>Default is <code>null</code>.</p>
  10117. </td>
  10118. </tr>
  10119. <tr>
  10120. <td class="name">
  10121. <strong>levelNode</strong>
  10122. </td>
  10123. <td class="description last">
  10124. <p>The level node.</p>
  10125. <p>Default is <code>null</code>.</p>
  10126. </td>
  10127. </tr>
  10128. </tbody>
  10129. </table>
  10130. </div>
  10131. <h3 class="name name-method" id="texture3DLoad" translate="no">.<a href="#texture3DLoad">texture3DLoad</a><span class="signature">( value : <span class="param-type"><a href="Texture.html">Texture</a> | <a href="TextureNode.html">TextureNode</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, biasNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  10132. <div class="method">
  10133. <div class="description">
  10134. <p>TSL function for creating a texture node that fetches/loads texels without interpolation.</p>
  10135. </div>
  10136. <table class="params">
  10137. <tbody>
  10138. <tr>
  10139. <td class="name">
  10140. <strong>value</strong>
  10141. </td>
  10142. <td class="description last">
  10143. <p>The texture.</p>
  10144. <p>Default is <code>EmptyTexture</code>.</p>
  10145. </td>
  10146. </tr>
  10147. <tr>
  10148. <td class="name">
  10149. <strong>uvNode</strong>
  10150. </td>
  10151. <td class="description last">
  10152. <p>The uv node.</p>
  10153. <p>Default is <code>null</code>.</p>
  10154. </td>
  10155. </tr>
  10156. <tr>
  10157. <td class="name">
  10158. <strong>levelNode</strong>
  10159. </td>
  10160. <td class="description last">
  10161. <p>The level node.</p>
  10162. <p>Default is <code>null</code>.</p>
  10163. </td>
  10164. </tr>
  10165. <tr>
  10166. <td class="name">
  10167. <strong>biasNode</strong>
  10168. </td>
  10169. <td class="description last">
  10170. <p>The bias node.</p>
  10171. <p>Default is <code>null</code>.</p>
  10172. </td>
  10173. </tr>
  10174. </tbody>
  10175. </table>
  10176. </div>
  10177. <h3 class="name name-method" id="textureBarrier" translate="no">.<a href="#textureBarrier">textureBarrier</a><span class="signature">()</span><span class="type-signature"> : <a href="BarrierNode.html">BarrierNode</a></span> </h3>
  10178. <div class="method">
  10179. <div class="description">
  10180. <p>TSL function for creating a texture barrier. All invocations must
  10181. wait for each access to variables within the 'texture' address space
  10182. to complete before the barrier can be passed.</p>
  10183. </div>
  10184. </div>
  10185. <h3 class="name name-method" id="textureBase" translate="no">.<a href="#textureBase">textureBase</a><span class="signature">( value : <span class="param-type"><a href="Texture.html">Texture</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3)></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, biasNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  10186. <div class="method">
  10187. <div class="description">
  10188. <p>TSL function for creating a texture node.</p>
  10189. </div>
  10190. <table class="params">
  10191. <tbody>
  10192. <tr>
  10193. <td class="name">
  10194. <strong>value</strong>
  10195. </td>
  10196. <td class="description last">
  10197. <p>The texture.</p>
  10198. </td>
  10199. </tr>
  10200. <tr>
  10201. <td class="name">
  10202. <strong>uvNode</strong>
  10203. </td>
  10204. <td class="description last">
  10205. <p>The uv node.</p>
  10206. <p>Default is <code>null</code>.</p>
  10207. </td>
  10208. </tr>
  10209. <tr>
  10210. <td class="name">
  10211. <strong>levelNode</strong>
  10212. </td>
  10213. <td class="description last">
  10214. <p>The level node.</p>
  10215. <p>Default is <code>null</code>.</p>
  10216. </td>
  10217. </tr>
  10218. <tr>
  10219. <td class="name">
  10220. <strong>biasNode</strong>
  10221. </td>
  10222. <td class="description last">
  10223. <p>The bias node.</p>
  10224. <p>Default is <code>null</code>.</p>
  10225. </td>
  10226. </tr>
  10227. </tbody>
  10228. </table>
  10229. </div>
  10230. <h3 class="name name-method" id="textureBicubic" translate="no">.<a href="#textureBicubic">textureBicubic</a><span class="signature">( textureNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, strength : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  10231. <div class="method">
  10232. <div class="description">
  10233. <p>Applies mipped bicubic texture filtering to the given texture node.</p>
  10234. </div>
  10235. <table class="params">
  10236. <tbody>
  10237. <tr>
  10238. <td class="name">
  10239. <strong>textureNode</strong>
  10240. </td>
  10241. <td class="description last">
  10242. <p>The texture node that should be filtered.</p>
  10243. </td>
  10244. </tr>
  10245. <tr>
  10246. <td class="name">
  10247. <strong>strength</strong>
  10248. </td>
  10249. <td class="description last">
  10250. <p>Defines the strength of the bicubic filtering.</p>
  10251. </td>
  10252. </tr>
  10253. </tbody>
  10254. </table>
  10255. <dl class="details">
  10256. <dt class="tag-returns"><strong>Returns:</strong> The filtered texture sample.</dt>
  10257. </dl>
  10258. </div>
  10259. <h3 class="name name-method" id="textureBicubicLevel" translate="no">.<a href="#textureBicubicLevel">textureBicubicLevel</a><span class="signature">( textureNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, lodNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  10260. <div class="method">
  10261. <div class="description">
  10262. <p>Applies mipped bicubic texture filtering to the given texture node.</p>
  10263. </div>
  10264. <table class="params">
  10265. <tbody>
  10266. <tr>
  10267. <td class="name">
  10268. <strong>textureNode</strong>
  10269. </td>
  10270. <td class="description last">
  10271. <p>The texture node that should be filtered.</p>
  10272. </td>
  10273. </tr>
  10274. <tr>
  10275. <td class="name">
  10276. <strong>lodNode</strong>
  10277. </td>
  10278. <td class="description last">
  10279. <p>Defines the LOD to sample from.</p>
  10280. </td>
  10281. </tr>
  10282. </tbody>
  10283. </table>
  10284. <dl class="details">
  10285. <dt class="tag-returns"><strong>Returns:</strong> The filtered texture sample.</dt>
  10286. </dl>
  10287. </div>
  10288. <h3 class="name name-method" id="textureLoad" translate="no">.<a href="#textureLoad">textureLoad</a><span class="signature">( value : <span class="param-type"><a href="Texture.html">Texture</a> | <a href="TextureNode.html">TextureNode</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3)></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, biasNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  10289. <div class="method">
  10290. <div class="description">
  10291. <p>TSL function for creating a texture node that fetches/loads texels without interpolation.</p>
  10292. </div>
  10293. <table class="params">
  10294. <tbody>
  10295. <tr>
  10296. <td class="name">
  10297. <strong>value</strong>
  10298. </td>
  10299. <td class="description last">
  10300. <p>The texture.</p>
  10301. <p>Default is <code>EmptyTexture</code>.</p>
  10302. </td>
  10303. </tr>
  10304. <tr>
  10305. <td class="name">
  10306. <strong>uvNode</strong>
  10307. </td>
  10308. <td class="description last">
  10309. <p>The uv node.</p>
  10310. <p>Default is <code>null</code>.</p>
  10311. </td>
  10312. </tr>
  10313. <tr>
  10314. <td class="name">
  10315. <strong>levelNode</strong>
  10316. </td>
  10317. <td class="description last">
  10318. <p>The level node.</p>
  10319. <p>Default is <code>null</code>.</p>
  10320. </td>
  10321. </tr>
  10322. <tr>
  10323. <td class="name">
  10324. <strong>biasNode</strong>
  10325. </td>
  10326. <td class="description last">
  10327. <p>The bias node.</p>
  10328. <p>Default is <code>null</code>.</p>
  10329. </td>
  10330. </tr>
  10331. </tbody>
  10332. </table>
  10333. </div>
  10334. <h3 class="name name-method" id="textureSize" translate="no">.<a href="#textureSize">textureSize</a><span class="signature">( textureNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span> )</span><span class="type-signature"> : <a href="TextureSizeNode.html">TextureSizeNode</a></span> </h3>
  10335. <div class="method">
  10336. <div class="description">
  10337. <p>TSL function for creating a texture size node.</p>
  10338. </div>
  10339. <table class="params">
  10340. <tbody>
  10341. <tr>
  10342. <td class="name">
  10343. <strong>textureNode</strong>
  10344. </td>
  10345. <td class="description last">
  10346. <p>A texture node which size should be retrieved.</p>
  10347. </td>
  10348. </tr>
  10349. <tr>
  10350. <td class="name">
  10351. <strong>levelNode</strong>
  10352. </td>
  10353. <td class="description last">
  10354. <p>A level node which defines the requested mip.</p>
  10355. <p>Default is <code>null</code>.</p>
  10356. </td>
  10357. </tr>
  10358. </tbody>
  10359. </table>
  10360. </div>
  10361. <h3 class="name name-method" id="textureStore" translate="no">.<a href="#textureStore">textureStore</a><span class="signature">( value : <span class="param-type"><a href="StorageTexture.html">StorageTexture</a></span>, uvNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3)></span>, storeNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="StorageTextureNode.html">StorageTextureNode</a></span> </h3>
  10362. <div class="method">
  10363. <div class="description">
  10364. <p>TODO: Explain difference to <code>storageTexture()</code>.</p>
  10365. </div>
  10366. <table class="params">
  10367. <tbody>
  10368. <tr>
  10369. <td class="name">
  10370. <strong>value</strong>
  10371. </td>
  10372. <td class="description last">
  10373. <p>The storage texture.</p>
  10374. </td>
  10375. </tr>
  10376. <tr>
  10377. <td class="name">
  10378. <strong>uvNode</strong>
  10379. </td>
  10380. <td class="description last">
  10381. <p>The uv node.</p>
  10382. </td>
  10383. </tr>
  10384. <tr>
  10385. <td class="name">
  10386. <strong>storeNode</strong>
  10387. </td>
  10388. <td class="description last">
  10389. <p>The value node that should be stored in the texture.</p>
  10390. <p>Default is <code>null</code>.</p>
  10391. </td>
  10392. </tr>
  10393. </tbody>
  10394. </table>
  10395. </div>
  10396. <h3 class="name name-method" id="tiledLights" translate="no">.<a href="#tiledLights">tiledLights</a><span class="signature">( maxLights : <span class="param-type">number</span>, tileSize : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="TiledLightsNode.html">TiledLightsNode</a></span> </h3>
  10397. <div class="method">
  10398. <div class="description">
  10399. <p>TSL function that creates a tiled lights node.</p>
  10400. </div>
  10401. <table class="params">
  10402. <tbody>
  10403. <tr>
  10404. <td class="name">
  10405. <strong>maxLights</strong>
  10406. </td>
  10407. <td class="description last">
  10408. <p>The maximum number of lights.</p>
  10409. <p>Default is <code>1024</code>.</p>
  10410. </td>
  10411. </tr>
  10412. <tr>
  10413. <td class="name">
  10414. <strong>tileSize</strong>
  10415. </td>
  10416. <td class="description last">
  10417. <p>The tile size.</p>
  10418. <p>Default is <code>32</code>.</p>
  10419. </td>
  10420. </tr>
  10421. </tbody>
  10422. </table>
  10423. <dl class="details">
  10424. <dt class="tag-returns"><strong>Returns:</strong> The tiled lights node.</dt>
  10425. </dl>
  10426. </div>
  10427. <h3 class="name name-method" id="toneMapping" translate="no">.<a href="#toneMapping">toneMapping</a><span class="signature">( mapping : <span class="param-type">number</span>, exposure : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span>, color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3> | <a href="Color.html">Color</a></span> )</span><span class="type-signature"> : <a href="ToneMappingNode.html">ToneMappingNode</a>.&lt;vec3></span> </h3>
  10428. <div class="method">
  10429. <div class="description">
  10430. <p>TSL function for creating a tone mapping node.</p>
  10431. </div>
  10432. <table class="params">
  10433. <tbody>
  10434. <tr>
  10435. <td class="name">
  10436. <strong>mapping</strong>
  10437. </td>
  10438. <td class="description last">
  10439. <p>The tone mapping type.</p>
  10440. </td>
  10441. </tr>
  10442. <tr>
  10443. <td class="name">
  10444. <strong>exposure</strong>
  10445. </td>
  10446. <td class="description last">
  10447. <p>The tone mapping exposure.</p>
  10448. </td>
  10449. </tr>
  10450. <tr>
  10451. <td class="name">
  10452. <strong>color</strong>
  10453. </td>
  10454. <td class="description last">
  10455. <p>The color node to process.</p>
  10456. </td>
  10457. </tr>
  10458. </tbody>
  10459. </table>
  10460. </div>
  10461. <h3 class="name name-method" id="toonOutlinePass" translate="no">.<a href="#toonOutlinePass">toonOutlinePass</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, color : <span class="param-type"><a href="Color.html">Color</a></span>, thickness : <span class="param-type">number</span>, alpha : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="ToonOutlinePassNode.html">ToonOutlinePassNode</a></span> </h3>
  10462. <div class="method">
  10463. <div class="description">
  10464. <p>TSL function for creating a toon outline pass node.</p>
  10465. </div>
  10466. <table class="params">
  10467. <tbody>
  10468. <tr>
  10469. <td class="name">
  10470. <strong>scene</strong>
  10471. </td>
  10472. <td class="description last">
  10473. <p>A reference to the scene.</p>
  10474. </td>
  10475. </tr>
  10476. <tr>
  10477. <td class="name">
  10478. <strong>camera</strong>
  10479. </td>
  10480. <td class="description last">
  10481. <p>A reference to the camera.</p>
  10482. </td>
  10483. </tr>
  10484. <tr>
  10485. <td class="name">
  10486. <strong>color</strong>
  10487. </td>
  10488. <td class="description last">
  10489. <p>Defines the outline's color.</p>
  10490. </td>
  10491. </tr>
  10492. <tr>
  10493. <td class="name">
  10494. <strong>thickness</strong>
  10495. </td>
  10496. <td class="description last">
  10497. <p>Defines the outline's thickness.</p>
  10498. <p>Default is <code>0.003</code>.</p>
  10499. </td>
  10500. </tr>
  10501. <tr>
  10502. <td class="name">
  10503. <strong>alpha</strong>
  10504. </td>
  10505. <td class="description last">
  10506. <p>Defines the outline's alpha.</p>
  10507. <p>Default is <code>1</code>.</p>
  10508. </td>
  10509. </tr>
  10510. </tbody>
  10511. </table>
  10512. </div>
  10513. <h3 class="name name-method" id="traa" translate="no">.<a href="#traa">traa</a><span class="signature">( beautyNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, depthNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, velocityNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span> )</span><span class="type-signature"> : <a href="TRAANode.html">TRAANode</a></span> </h3>
  10514. <div class="method">
  10515. <div class="description">
  10516. <p>TSL function for creating a TRAA node for Temporal Reprojection Anti-Aliasing.</p>
  10517. </div>
  10518. <table class="params">
  10519. <tbody>
  10520. <tr>
  10521. <td class="name">
  10522. <strong>beautyNode</strong>
  10523. </td>
  10524. <td class="description last">
  10525. <p>The texture node that represents the input of the effect.</p>
  10526. </td>
  10527. </tr>
  10528. <tr>
  10529. <td class="name">
  10530. <strong>depthNode</strong>
  10531. </td>
  10532. <td class="description last">
  10533. <p>A node that represents the scene's depth.</p>
  10534. </td>
  10535. </tr>
  10536. <tr>
  10537. <td class="name">
  10538. <strong>velocityNode</strong>
  10539. </td>
  10540. <td class="description last">
  10541. <p>A node that represents the scene's velocity.</p>
  10542. </td>
  10543. </tr>
  10544. <tr>
  10545. <td class="name">
  10546. <strong>camera</strong>
  10547. </td>
  10548. <td class="description last">
  10549. <p>The camera the scene is rendered with.</p>
  10550. </td>
  10551. </tr>
  10552. </tbody>
  10553. </table>
  10554. </div>
  10555. <h3 class="name name-method" id="transformDirection" translate="no">.<a href="#transformDirection">transformDirection</a><span class="signature">( direction : <span class="param-type"><a href="Node.html">Node</a>.&lt;(vec2|vec3|vec4)></span>, matrix : <span class="param-type"><a href="Node.html">Node</a>.&lt;(mat2|mat3|mat4)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  10556. <div class="method">
  10557. <div class="description">
  10558. <p>Transforms the direction of a vector by a matrix and then normalizes the result.</p>
  10559. </div>
  10560. <table class="params">
  10561. <tbody>
  10562. <tr>
  10563. <td class="name">
  10564. <strong>direction</strong>
  10565. </td>
  10566. <td class="description last">
  10567. <p>The direction vector.</p>
  10568. </td>
  10569. </tr>
  10570. <tr>
  10571. <td class="name">
  10572. <strong>matrix</strong>
  10573. </td>
  10574. <td class="description last">
  10575. <p>The transformation matrix.</p>
  10576. </td>
  10577. </tr>
  10578. </tbody>
  10579. </table>
  10580. </div>
  10581. <h3 class="name name-method" id="transformNormal" translate="no">.<a href="#transformNormal">transformNormal</a><span class="signature">( normal : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, matrix : <span class="param-type"><a href="Node.html">Node</a>.&lt;mat3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  10582. <div class="method">
  10583. <div class="description">
  10584. <p>Transforms the normal with the given matrix.</p>
  10585. </div>
  10586. <table class="params">
  10587. <tbody>
  10588. <tr>
  10589. <td class="name">
  10590. <strong>normal</strong>
  10591. </td>
  10592. <td class="description last">
  10593. <p>The normal.</p>
  10594. </td>
  10595. </tr>
  10596. <tr>
  10597. <td class="name">
  10598. <strong>matrix</strong>
  10599. </td>
  10600. <td class="description last">
  10601. <p>The matrix.</p>
  10602. <p>Default is <code>modelWorldMatrix</code>.</p>
  10603. </td>
  10604. </tr>
  10605. </tbody>
  10606. </table>
  10607. <dl class="details">
  10608. <dt class="tag-returns"><strong>Returns:</strong> The transformed normal.</dt>
  10609. </dl>
  10610. </div>
  10611. <h3 class="name name-method" id="transformNormalToView" translate="no">.<a href="#transformNormalToView">transformNormalToView</a><span class="signature">( normal : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  10612. <div class="method">
  10613. <div class="description">
  10614. <p>Transforms the given normal from local to view space.</p>
  10615. </div>
  10616. <table class="params">
  10617. <tbody>
  10618. <tr>
  10619. <td class="name">
  10620. <strong>normal</strong>
  10621. </td>
  10622. <td class="description last">
  10623. <p>The normal.</p>
  10624. </td>
  10625. </tr>
  10626. <tr>
  10627. <td class="name">
  10628. <strong>builder</strong>
  10629. </td>
  10630. <td class="description last">
  10631. <p>The current node builder.</p>
  10632. </td>
  10633. </tr>
  10634. </tbody>
  10635. </table>
  10636. <dl class="details">
  10637. <dt class="tag-returns"><strong>Returns:</strong> The transformed normal.</dt>
  10638. </dl>
  10639. </div>
  10640. <h3 class="name name-method" id="transition" translate="no">.<a href="#transition">transition</a><span class="signature">( nodeA : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, nodeB : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, mixTextureNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span>, mixRatio : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span>, threshold : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span>, useTexture : <span class="param-type"><a href="Node.html">Node</a>.&lt;float> | number</span> )</span><span class="type-signature"> : <a href="TransitionNode.html">TransitionNode</a></span> </h3>
  10641. <div class="method">
  10642. <div class="description">
  10643. <p>TSL function for creating a transition node for post processing.</p>
  10644. </div>
  10645. <table class="params">
  10646. <tbody>
  10647. <tr>
  10648. <td class="name">
  10649. <strong>nodeA</strong>
  10650. </td>
  10651. <td class="description last">
  10652. <p>A texture node that represents the beauty pass of the first scene.</p>
  10653. </td>
  10654. </tr>
  10655. <tr>
  10656. <td class="name">
  10657. <strong>nodeB</strong>
  10658. </td>
  10659. <td class="description last">
  10660. <p>A texture node that represents the beauty pass of the second scene.</p>
  10661. </td>
  10662. </tr>
  10663. <tr>
  10664. <td class="name">
  10665. <strong>mixTextureNode</strong>
  10666. </td>
  10667. <td class="description last">
  10668. <p>A texture that defines how the transition effect should look like.</p>
  10669. </td>
  10670. </tr>
  10671. <tr>
  10672. <td class="name">
  10673. <strong>mixRatio</strong>
  10674. </td>
  10675. <td class="description last">
  10676. <p>The interpolation factor that controls the mix.</p>
  10677. </td>
  10678. </tr>
  10679. <tr>
  10680. <td class="name">
  10681. <strong>threshold</strong>
  10682. </td>
  10683. <td class="description last">
  10684. <p>Can be used to tweak the linear interpolation.</p>
  10685. </td>
  10686. </tr>
  10687. <tr>
  10688. <td class="name">
  10689. <strong>useTexture</strong>
  10690. </td>
  10691. <td class="description last">
  10692. <p>Whether <code>mixTextureNode</code> should influence the transition or not.</p>
  10693. </td>
  10694. </tr>
  10695. </tbody>
  10696. </table>
  10697. </div>
  10698. <h3 class="name name-method" id="transpose" translate="no">.<a href="#transpose">transpose</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a>.&lt;(mat2|mat3|mat4)></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  10699. <div class="method">
  10700. <div class="description">
  10701. <p>Returns the transpose of a matrix.</p>
  10702. </div>
  10703. <table class="params">
  10704. <tbody>
  10705. <tr>
  10706. <td class="name">
  10707. <strong>x</strong>
  10708. </td>
  10709. <td class="description last">
  10710. <p>The parameter.</p>
  10711. </td>
  10712. </tr>
  10713. </tbody>
  10714. </table>
  10715. </div>
  10716. <h3 class="name name-method" id="triNoise3D" translate="no">.<a href="#triNoise3D">triNoise3D</a><span class="signature">( position : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, speed : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, time : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  10717. <div class="method">
  10718. <div class="description">
  10719. <p>Generates a noise value from the given position, speed and time parameters.</p>
  10720. </div>
  10721. <table class="params">
  10722. <tbody>
  10723. <tr>
  10724. <td class="name">
  10725. <strong>position</strong>
  10726. </td>
  10727. <td class="description last">
  10728. <p>The position.</p>
  10729. </td>
  10730. </tr>
  10731. <tr>
  10732. <td class="name">
  10733. <strong>speed</strong>
  10734. </td>
  10735. <td class="description last">
  10736. <p>The speed.</p>
  10737. </td>
  10738. </tr>
  10739. <tr>
  10740. <td class="name">
  10741. <strong>time</strong>
  10742. </td>
  10743. <td class="description last">
  10744. <p>The time.</p>
  10745. </td>
  10746. </tr>
  10747. </tbody>
  10748. </table>
  10749. <dl class="details">
  10750. <dt class="tag-returns"><strong>Returns:</strong> The generated noise.</dt>
  10751. </dl>
  10752. </div>
  10753. <h3 class="name name-method" id="triplanarTexture" translate="no">.<a href="#triplanarTexture">triplanarTexture</a><span class="signature">( textureXNode : <span class="param-type"><a href="Node.html">Node</a></span>, textureYNode : <span class="param-type"><a href="Node.html">Node</a></span>, textureZNode : <span class="param-type"><a href="Node.html">Node</a></span>, scaleNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, positionNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, normalNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  10754. <div class="method">
  10755. <div class="description">
  10756. <p>TSL function for creating a triplanar textures node.</p>
  10757. </div>
  10758. <table class="params">
  10759. <tbody>
  10760. <tr>
  10761. <td class="name">
  10762. <strong>textureXNode</strong>
  10763. </td>
  10764. <td class="description last">
  10765. <p>First texture node.</p>
  10766. </td>
  10767. </tr>
  10768. <tr>
  10769. <td class="name">
  10770. <strong>textureYNode</strong>
  10771. </td>
  10772. <td class="description last">
  10773. <p>Second texture node. When not set, the shader will sample from <code>textureXNode</code> instead.</p>
  10774. <p>Default is <code>null</code>.</p>
  10775. </td>
  10776. </tr>
  10777. <tr>
  10778. <td class="name">
  10779. <strong>textureZNode</strong>
  10780. </td>
  10781. <td class="description last">
  10782. <p>Third texture node. When not set, the shader will sample from <code>textureXNode</code> instead.</p>
  10783. <p>Default is <code>null</code>.</p>
  10784. </td>
  10785. </tr>
  10786. <tr>
  10787. <td class="name">
  10788. <strong>scaleNode</strong>
  10789. </td>
  10790. <td class="description last">
  10791. <p>The scale node.</p>
  10792. <p>Default is <code>float(1)</code>.</p>
  10793. </td>
  10794. </tr>
  10795. <tr>
  10796. <td class="name">
  10797. <strong>positionNode</strong>
  10798. </td>
  10799. <td class="description last">
  10800. <p>Vertex positions in local space.</p>
  10801. <p>Default is <code>positionLocal</code>.</p>
  10802. </td>
  10803. </tr>
  10804. <tr>
  10805. <td class="name">
  10806. <strong>normalNode</strong>
  10807. </td>
  10808. <td class="description last">
  10809. <p>Normals in local space.</p>
  10810. <p>Default is <code>normalLocal</code>.</p>
  10811. </td>
  10812. </tr>
  10813. </tbody>
  10814. </table>
  10815. </div>
  10816. <h3 class="name name-method" id="triplanarTextures" translate="no">.<a href="#triplanarTextures">triplanarTextures</a><span class="signature">( textureXNode : <span class="param-type"><a href="Node.html">Node</a></span>, textureYNode : <span class="param-type"><a href="Node.html">Node</a></span>, textureZNode : <span class="param-type"><a href="Node.html">Node</a></span>, scaleNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, positionNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, normalNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  10817. <div class="method">
  10818. <div class="description">
  10819. <p>TSL function for creating a triplanar textures node.</p>
  10820. <p>Can be used for triplanar texture mapping.</p>
  10821. <pre><code class="language-js">material.colorNode = triplanarTexture( texture( diffuseMap ) );
  10822. </code></pre>
  10823. </div>
  10824. <table class="params">
  10825. <tbody>
  10826. <tr>
  10827. <td class="name">
  10828. <strong>textureXNode</strong>
  10829. </td>
  10830. <td class="description last">
  10831. <p>First texture node.</p>
  10832. </td>
  10833. </tr>
  10834. <tr>
  10835. <td class="name">
  10836. <strong>textureYNode</strong>
  10837. </td>
  10838. <td class="description last">
  10839. <p>Second texture node. When not set, the shader will sample from <code>textureXNode</code> instead.</p>
  10840. <p>Default is <code>null</code>.</p>
  10841. </td>
  10842. </tr>
  10843. <tr>
  10844. <td class="name">
  10845. <strong>textureZNode</strong>
  10846. </td>
  10847. <td class="description last">
  10848. <p>Third texture node. When not set, the shader will sample from <code>textureXNode</code> instead.</p>
  10849. <p>Default is <code>null</code>.</p>
  10850. </td>
  10851. </tr>
  10852. <tr>
  10853. <td class="name">
  10854. <strong>scaleNode</strong>
  10855. </td>
  10856. <td class="description last">
  10857. <p>The scale node.</p>
  10858. <p>Default is <code>float(1)</code>.</p>
  10859. </td>
  10860. </tr>
  10861. <tr>
  10862. <td class="name">
  10863. <strong>positionNode</strong>
  10864. </td>
  10865. <td class="description last">
  10866. <p>Vertex positions in local space.</p>
  10867. <p>Default is <code>positionLocal</code>.</p>
  10868. </td>
  10869. </tr>
  10870. <tr>
  10871. <td class="name">
  10872. <strong>normalNode</strong>
  10873. </td>
  10874. <td class="description last">
  10875. <p>Normals in local space.</p>
  10876. <p>Default is <code>normalLocal</code>.</p>
  10877. </td>
  10878. </tr>
  10879. </tbody>
  10880. </table>
  10881. </div>
  10882. <h3 class="name name-method" id="trunc" translate="no">.<a href="#trunc">trunc</a><span class="signature">( x : <span class="param-type"><a href="Node.html">Node</a> | number</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  10883. <div class="method">
  10884. <div class="description">
  10885. <p>Truncates the parameter, removing the fractional part.</p>
  10886. </div>
  10887. <table class="params">
  10888. <tbody>
  10889. <tr>
  10890. <td class="name">
  10891. <strong>x</strong>
  10892. </td>
  10893. <td class="description last">
  10894. <p>The parameter.</p>
  10895. </td>
  10896. </tr>
  10897. </tbody>
  10898. </table>
  10899. </div>
  10900. <h3 class="name name-method" id="uintBitsToFloat" translate="no">.<a href="#uintBitsToFloat">uintBitsToFloat</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;uint></span> )</span><span class="type-signature"> : <a href="BitcastNode.html">BitcastNode</a></span> </h3>
  10901. <div class="method">
  10902. <div class="description">
  10903. <p>Bitcast an unsigned integer or a vector of unsigned integers to a corresponding float type with the same element size.</p>
  10904. </div>
  10905. <table class="params">
  10906. <tbody>
  10907. <tr>
  10908. <td class="name">
  10909. <strong>value</strong>
  10910. </td>
  10911. <td class="description last">
  10912. <p>The unsigned integer or vector of unsigned integers to bitcast.</p>
  10913. </td>
  10914. </tr>
  10915. </tbody>
  10916. </table>
  10917. </div>
  10918. <h3 class="name name-method" id="uniform" translate="no">.<a href="#uniform">uniform</a><span class="signature">( value : <span class="param-type"><a href="global.html#any">any</a> | string</span>, type : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a></span> </h3>
  10919. <div class="method">
  10920. <div class="description">
  10921. <p>TSL function for creating a uniform node.</p>
  10922. </div>
  10923. <table class="params">
  10924. <tbody>
  10925. <tr>
  10926. <td class="name">
  10927. <strong>value</strong>
  10928. </td>
  10929. <td class="description last">
  10930. <p>The value of this uniform or your type. Usually a JS primitive or three.js object (vector, matrix, color, texture).</p>
  10931. </td>
  10932. </tr>
  10933. <tr>
  10934. <td class="name">
  10935. <strong>type</strong>
  10936. </td>
  10937. <td class="description last">
  10938. <p>The node type. If no explicit type is defined, the node tries to derive the type from its value.</p>
  10939. </td>
  10940. </tr>
  10941. </tbody>
  10942. </table>
  10943. </div>
  10944. <h3 class="name name-method" id="uniformArray" translate="no">.<a href="#uniformArray">uniformArray</a><span class="signature">( values : <span class="param-type">Array.&lt;<a href="global.html#any">any</a>></span>, nodeType : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="UniformArrayNode.html">UniformArrayNode</a></span> </h3>
  10945. <div class="method">
  10946. <div class="description">
  10947. <p>TSL function for creating an uniform array node.</p>
  10948. </div>
  10949. <table class="params">
  10950. <tbody>
  10951. <tr>
  10952. <td class="name">
  10953. <strong>values</strong>
  10954. </td>
  10955. <td class="description last">
  10956. <p>Array-like data.</p>
  10957. </td>
  10958. </tr>
  10959. <tr>
  10960. <td class="name">
  10961. <strong>nodeType</strong>
  10962. </td>
  10963. <td class="description last">
  10964. <p>The data type of the array elements.</p>
  10965. </td>
  10966. </tr>
  10967. </tbody>
  10968. </table>
  10969. </div>
  10970. <h3 class="name name-method" id="uniformCubeTexture" translate="no">.<a href="#uniformCubeTexture">uniformCubeTexture</a><span class="signature">( value : <span class="param-type"><a href="CubeTexture.html">CubeTexture</a></span> )</span><span class="type-signature"> : <a href="CubeTextureNode.html">CubeTextureNode</a></span> </h3>
  10971. <div class="method">
  10972. <div class="description">
  10973. <p>TSL function for creating a uniform cube texture node.</p>
  10974. </div>
  10975. <table class="params">
  10976. <tbody>
  10977. <tr>
  10978. <td class="name">
  10979. <strong>value</strong>
  10980. </td>
  10981. <td class="description last">
  10982. <p>The cube texture.</p>
  10983. <p>Default is <code>EmptyTexture</code>.</p>
  10984. </td>
  10985. </tr>
  10986. </tbody>
  10987. </table>
  10988. </div>
  10989. <h3 class="name name-method" id="uniformFlow" translate="no">.<a href="#uniformFlow">uniformFlow</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="ContextNode.html">ContextNode</a></span> </h3>
  10990. <div class="method">
  10991. <div class="description">
  10992. <p>TSL function for defining a uniformFlow context value for a given node.</p>
  10993. </div>
  10994. <table class="params">
  10995. <tbody>
  10996. <tr>
  10997. <td class="name">
  10998. <strong>node</strong>
  10999. </td>
  11000. <td class="description last">
  11001. <p>The node whose dependencies should all execute within a uniform control-flow path.</p>
  11002. </td>
  11003. </tr>
  11004. </tbody>
  11005. </table>
  11006. </div>
  11007. <h3 class="name name-method" id="uniformGroup" translate="no">.<a href="#uniformGroup">uniformGroup</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="UniformGroupNode.html">UniformGroupNode</a></span> </h3>
  11008. <div class="method">
  11009. <div class="description">
  11010. <p>TSL function for creating a uniform group node with the given name.</p>
  11011. </div>
  11012. <table class="params">
  11013. <tbody>
  11014. <tr>
  11015. <td class="name">
  11016. <strong>name</strong>
  11017. </td>
  11018. <td class="description last">
  11019. <p>The name of the uniform group node.</p>
  11020. </td>
  11021. </tr>
  11022. </tbody>
  11023. </table>
  11024. </div>
  11025. <h3 class="name name-method" id="uniformTexture" translate="no">.<a href="#uniformTexture">uniformTexture</a><span class="signature">( value : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  11026. <div class="method">
  11027. <div class="description">
  11028. <p>TSL function for creating a uniform texture node.</p>
  11029. </div>
  11030. <table class="params">
  11031. <tbody>
  11032. <tr>
  11033. <td class="name">
  11034. <strong>value</strong>
  11035. </td>
  11036. <td class="description last">
  11037. <p>The texture.</p>
  11038. </td>
  11039. </tr>
  11040. </tbody>
  11041. </table>
  11042. </div>
  11043. <h3 class="name name-method" id="unpackHalf2x16" translate="no">.<a href="#unpackHalf2x16">unpackHalf2x16</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;uint></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  11044. <div class="method">
  11045. <div class="description">
  11046. <p>Unpacks a 32-bit unsigned integer into two 16-bit values, interpreted as 16-bit floating-point numbers. Returns a vec2 with both values.</p>
  11047. </div>
  11048. <table class="params">
  11049. <tbody>
  11050. <tr>
  11051. <td class="name">
  11052. <strong>value</strong>
  11053. </td>
  11054. <td class="description last">
  11055. <p>The unsigned integer to be unpacked</p>
  11056. </td>
  11057. </tr>
  11058. </tbody>
  11059. </table>
  11060. </div>
  11061. <h3 class="name name-method" id="unpackNormal" translate="no">.<a href="#unpackNormal">unpackNormal</a><span class="signature">( xy : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  11062. <div class="method">
  11063. <div class="description">
  11064. <p>Unpacks a tangent space normal, reconstructing the Z component by projecting the X,Y coordinates onto the hemisphere.
  11065. The X,Y coordinates are expected to be in the [-1, 1] range.</p>
  11066. </div>
  11067. <table class="params">
  11068. <tbody>
  11069. <tr>
  11070. <td class="name">
  11071. <strong>xy</strong>
  11072. </td>
  11073. <td class="description last">
  11074. <p>The X,Y coordinates of the normal.</p>
  11075. </td>
  11076. </tr>
  11077. </tbody>
  11078. </table>
  11079. <dl class="details">
  11080. <dt class="tag-returns"><strong>Returns:</strong> The resulting normal.</dt>
  11081. </dl>
  11082. </div>
  11083. <h3 class="name name-method" id="unpackSnorm2x16" translate="no">.<a href="#unpackSnorm2x16">unpackSnorm2x16</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;uint></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  11084. <div class="method">
  11085. <div class="description">
  11086. <p>Unpacks a 32-bit unsigned integer into two 16-bit values, interpreted as normalized signed integers. Returns a vec2 with both values.</p>
  11087. </div>
  11088. <table class="params">
  11089. <tbody>
  11090. <tr>
  11091. <td class="name">
  11092. <strong>value</strong>
  11093. </td>
  11094. <td class="description last">
  11095. <p>The unsigned integer to be unpacked</p>
  11096. </td>
  11097. </tr>
  11098. </tbody>
  11099. </table>
  11100. </div>
  11101. <h3 class="name name-method" id="unpackUnorm2x16" translate="no">.<a href="#unpackUnorm2x16">unpackUnorm2x16</a><span class="signature">( value : <span class="param-type"><a href="Node.html">Node</a>.&lt;uint></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  11102. <div class="method">
  11103. <div class="description">
  11104. <p>Unpacks a 32-bit unsigned integer into two 16-bit values, interpreted as normalized unsigned integers. Returns a vec2 with both values.</p>
  11105. </div>
  11106. <table class="params">
  11107. <tbody>
  11108. <tr>
  11109. <td class="name">
  11110. <strong>value</strong>
  11111. </td>
  11112. <td class="description last">
  11113. <p>The unsigned integer to be unpacked</p>
  11114. </td>
  11115. </tr>
  11116. </tbody>
  11117. </table>
  11118. </div>
  11119. <h3 class="name name-method" id="unpremultiplyAlpha" translate="no">.<a href="#unpremultiplyAlpha">unpremultiplyAlpha</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec4></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  11120. <div class="method">
  11121. <div class="description">
  11122. <p>Unpremultiplies the RGB channels of a color by its alpha channel.</p>
  11123. <p>This function is useful for converting a premultiplied alpha color
  11124. back into a non-premultiplied alpha format, where the RGB values are
  11125. divided by the alpha value. Unpremultiplied alpha is often used in graphics
  11126. rendering for certain operations, such as compositing and image processing.</p>
  11127. </div>
  11128. <table class="params">
  11129. <tbody>
  11130. <tr>
  11131. <td class="name">
  11132. <strong>color</strong>
  11133. </td>
  11134. <td class="description last">
  11135. <p>The input color with premultiplied alpha.</p>
  11136. </td>
  11137. </tr>
  11138. </tbody>
  11139. </table>
  11140. <dl class="details">
  11141. <dt class="tag-returns"><strong>Returns:</strong> The color with non-premultiplied alpha.</dt>
  11142. </dl>
  11143. </div>
  11144. <h3 class="name name-method" id="userData" translate="no">.<a href="#userData">userData</a><span class="signature">( name : <span class="param-type">string</span>, inputType : <span class="param-type">string</span>, userData : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="UserDataNode.html">UserDataNode</a></span> </h3>
  11145. <div class="method">
  11146. <div class="description">
  11147. <p>TSL function for creating a user data node.</p>
  11148. </div>
  11149. <table class="params">
  11150. <tbody>
  11151. <tr>
  11152. <td class="name">
  11153. <strong>name</strong>
  11154. </td>
  11155. <td class="description last">
  11156. <p>The property name that should be referenced by the node.</p>
  11157. </td>
  11158. </tr>
  11159. <tr>
  11160. <td class="name">
  11161. <strong>inputType</strong>
  11162. </td>
  11163. <td class="description last">
  11164. <p>The node data type of the reference.</p>
  11165. </td>
  11166. </tr>
  11167. <tr>
  11168. <td class="name">
  11169. <strong>userData</strong>
  11170. </td>
  11171. <td class="description last">
  11172. <p>A reference to the <code>userData</code> object. If not provided, the <code>userData</code> property of the 3D object that uses the node material is evaluated.</p>
  11173. </td>
  11174. </tr>
  11175. </tbody>
  11176. </table>
  11177. </div>
  11178. <h3 class="name name-method" id="uv" translate="no">.<a href="#uv">uv</a><span class="signature">( index : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AttributeNode.html">AttributeNode</a>.&lt;vec2></span> </h3>
  11179. <div class="method">
  11180. <div class="description">
  11181. <p>TSL function for creating an uv attribute node with the given index.</p>
  11182. </div>
  11183. <table class="params">
  11184. <tbody>
  11185. <tr>
  11186. <td class="name">
  11187. <strong>index</strong>
  11188. </td>
  11189. <td class="description last">
  11190. <p>The uv index.</p>
  11191. <p>Default is <code>0</code>.</p>
  11192. </td>
  11193. </tr>
  11194. </tbody>
  11195. </table>
  11196. <dl class="details">
  11197. <dt class="tag-returns"><strong>Returns:</strong> The uv attribute node.</dt>
  11198. </dl>
  11199. </div>
  11200. <h3 class="name name-method" id="varying" translate="no">.<a href="#varying">varying</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="VaryingNode.html">VaryingNode</a></span> </h3>
  11201. <div class="method">
  11202. <div class="description">
  11203. <p>TSL function for creating a varying node.</p>
  11204. </div>
  11205. <table class="params">
  11206. <tbody>
  11207. <tr>
  11208. <td class="name">
  11209. <strong>node</strong>
  11210. </td>
  11211. <td class="description last">
  11212. <p>The node for which a varying should be created.</p>
  11213. </td>
  11214. </tr>
  11215. <tr>
  11216. <td class="name">
  11217. <strong>name</strong>
  11218. </td>
  11219. <td class="description last">
  11220. <p>The name of the varying in the shader.</p>
  11221. </td>
  11222. </tr>
  11223. </tbody>
  11224. </table>
  11225. </div>
  11226. <h3 class="name name-method" id="varyingProperty" translate="no">.<a href="#varyingProperty">varyingProperty</a><span class="signature">( type : <span class="param-type">string</span>, name : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="PropertyNode.html">PropertyNode</a></span> </h3>
  11227. <div class="method">
  11228. <div class="description">
  11229. <p>TSL function for creating a varying property node.</p>
  11230. </div>
  11231. <table class="params">
  11232. <tbody>
  11233. <tr>
  11234. <td class="name">
  11235. <strong>type</strong>
  11236. </td>
  11237. <td class="description last">
  11238. <p>The type of the node.</p>
  11239. </td>
  11240. </tr>
  11241. <tr>
  11242. <td class="name">
  11243. <strong>name</strong>
  11244. </td>
  11245. <td class="description last">
  11246. <p>The name of the varying in the shader.</p>
  11247. <p>Default is <code>null</code>.</p>
  11248. </td>
  11249. </tr>
  11250. </tbody>
  11251. </table>
  11252. </div>
  11253. <h3 class="name name-method" id="vertexColor" translate="no">.<a href="#vertexColor">vertexColor</a><span class="signature">( index : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="VertexColorNode.html">VertexColorNode</a></span> </h3>
  11254. <div class="method">
  11255. <div class="description">
  11256. <p>TSL function for creating a reference node.</p>
  11257. </div>
  11258. <table class="params">
  11259. <tbody>
  11260. <tr>
  11261. <td class="name">
  11262. <strong>index</strong>
  11263. </td>
  11264. <td class="description last">
  11265. <p>The attribute index.</p>
  11266. <p>Default is <code>0</code>.</p>
  11267. </td>
  11268. </tr>
  11269. </tbody>
  11270. </table>
  11271. </div>
  11272. <h3 class="name name-method" id="vertexStage" translate="no">.<a href="#vertexStage">vertexStage</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="VaryingNode.html">VaryingNode</a></span> </h3>
  11273. <div class="method">
  11274. <div class="description">
  11275. <p>Computes a node in the vertex stage.</p>
  11276. </div>
  11277. <table class="params">
  11278. <tbody>
  11279. <tr>
  11280. <td class="name">
  11281. <strong>node</strong>
  11282. </td>
  11283. <td class="description last">
  11284. <p>The node which should be executed in the vertex stage.</p>
  11285. </td>
  11286. </tr>
  11287. </tbody>
  11288. </table>
  11289. </div>
  11290. <h3 class="name name-method" id="vibrance" translate="no">.<a href="#vibrance">vibrance</a><span class="signature">( color : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span>, adjustment : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  11291. <div class="method">
  11292. <div class="description">
  11293. <p>Selectively enhance the intensity of less saturated RGB colors. Can result
  11294. in a more natural and visually appealing image with enhanced color depth
  11295. compared to ColorAdjustment#saturation.</p>
  11296. </div>
  11297. <table class="params">
  11298. <tbody>
  11299. <tr>
  11300. <td class="name">
  11301. <strong>color</strong>
  11302. </td>
  11303. <td class="description last">
  11304. <p>The input color.</p>
  11305. </td>
  11306. </tr>
  11307. <tr>
  11308. <td class="name">
  11309. <strong>adjustment</strong>
  11310. </td>
  11311. <td class="description last">
  11312. <p>Controls the intensity of the vibrance effect.</p>
  11313. <p>Default is <code>1</code>.</p>
  11314. </td>
  11315. </tr>
  11316. </tbody>
  11317. </table>
  11318. <dl class="details">
  11319. <dt class="tag-returns"><strong>Returns:</strong> The updated color.</dt>
  11320. </dl>
  11321. </div>
  11322. <h3 class="name name-method" id="viewZToLogarithmicDepth" translate="no">.<a href="#viewZToLogarithmicDepth">viewZToLogarithmicDepth</a><span class="signature">( viewZ : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, near : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, far : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  11323. <div class="method">
  11324. <div class="description">
  11325. <p>TSL function for converting a viewZ value to a logarithmic depth value.</p>
  11326. </div>
  11327. <table class="params">
  11328. <tbody>
  11329. <tr>
  11330. <td class="name">
  11331. <strong>viewZ</strong>
  11332. </td>
  11333. <td class="description last">
  11334. <p>The viewZ node.</p>
  11335. </td>
  11336. </tr>
  11337. <tr>
  11338. <td class="name">
  11339. <strong>near</strong>
  11340. </td>
  11341. <td class="description last">
  11342. <p>The camera's near value.</p>
  11343. </td>
  11344. </tr>
  11345. <tr>
  11346. <td class="name">
  11347. <strong>far</strong>
  11348. </td>
  11349. <td class="description last">
  11350. <p>The camera's far value.</p>
  11351. </td>
  11352. </tr>
  11353. </tbody>
  11354. </table>
  11355. </div>
  11356. <h3 class="name name-method" id="viewZToOrthographicDepth" translate="no">.<a href="#viewZToOrthographicDepth">viewZToOrthographicDepth</a><span class="signature">( viewZ : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, near : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, far : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  11357. <div class="method">
  11358. <div class="description">
  11359. <p>TSL function for converting a viewZ value to an orthographic depth value.</p>
  11360. </div>
  11361. <table class="params">
  11362. <tbody>
  11363. <tr>
  11364. <td class="name">
  11365. <strong>viewZ</strong>
  11366. </td>
  11367. <td class="description last">
  11368. <p>The viewZ node.</p>
  11369. </td>
  11370. </tr>
  11371. <tr>
  11372. <td class="name">
  11373. <strong>near</strong>
  11374. </td>
  11375. <td class="description last">
  11376. <p>The camera's near value.</p>
  11377. </td>
  11378. </tr>
  11379. <tr>
  11380. <td class="name">
  11381. <strong>far</strong>
  11382. </td>
  11383. <td class="description last">
  11384. <p>The camera's far value.</p>
  11385. </td>
  11386. </tr>
  11387. </tbody>
  11388. </table>
  11389. </div>
  11390. <h3 class="name name-method" id="viewZToPerspectiveDepth" translate="no">.<a href="#viewZToPerspectiveDepth">viewZToPerspectiveDepth</a><span class="signature">( viewZ : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, near : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, far : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  11391. <div class="method">
  11392. <div class="description">
  11393. <p>TSL function for converting a viewZ value to a perspective depth value.</p>
  11394. <p>Note: {link https://twitter.com/gonnavis/status/1377183786949959682}.</p>
  11395. </div>
  11396. <table class="params">
  11397. <tbody>
  11398. <tr>
  11399. <td class="name">
  11400. <strong>viewZ</strong>
  11401. </td>
  11402. <td class="description last">
  11403. <p>The viewZ node.</p>
  11404. </td>
  11405. </tr>
  11406. <tr>
  11407. <td class="name">
  11408. <strong>near</strong>
  11409. </td>
  11410. <td class="description last">
  11411. <p>The camera's near value.</p>
  11412. </td>
  11413. </tr>
  11414. <tr>
  11415. <td class="name">
  11416. <strong>far</strong>
  11417. </td>
  11418. <td class="description last">
  11419. <p>The camera's far value.</p>
  11420. </td>
  11421. </tr>
  11422. </tbody>
  11423. </table>
  11424. </div>
  11425. <h3 class="name name-method" id="viewportDepthTexture" translate="no">.<a href="#viewportDepthTexture">viewportDepthTexture</a><span class="signature">( uvNode : <span class="param-type"><a href="Node.html">Node</a></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="ViewportDepthTextureNode.html">ViewportDepthTextureNode</a></span> </h3>
  11426. <div class="method">
  11427. <div class="description">
  11428. <p>TSL function for a viewport depth texture node.</p>
  11429. </div>
  11430. <table class="params">
  11431. <tbody>
  11432. <tr>
  11433. <td class="name">
  11434. <strong>uvNode</strong>
  11435. </td>
  11436. <td class="description last">
  11437. <p>The uv node.</p>
  11438. <p>Default is <code>screenUV</code>.</p>
  11439. </td>
  11440. </tr>
  11441. <tr>
  11442. <td class="name">
  11443. <strong>levelNode</strong>
  11444. </td>
  11445. <td class="description last">
  11446. <p>The level node.</p>
  11447. <p>Default is <code>null</code>.</p>
  11448. </td>
  11449. </tr>
  11450. </tbody>
  11451. </table>
  11452. </div>
  11453. <h3 class="name name-method" id="viewportMipTexture" translate="no">.<a href="#viewportMipTexture">viewportMipTexture</a><span class="signature">( uvNode : <span class="param-type"><a href="Node.html">Node</a></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a></span>, framebufferTexture : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span><span class="type-signature"> : <a href="ViewportTextureNode.html">ViewportTextureNode</a></span> </h3>
  11454. <div class="method">
  11455. <div class="description">
  11456. <p>TSL function for creating a viewport texture node with enabled mipmap generation.</p>
  11457. </div>
  11458. <table class="params">
  11459. <tbody>
  11460. <tr>
  11461. <td class="name">
  11462. <strong>uvNode</strong>
  11463. </td>
  11464. <td class="description last">
  11465. <p>The uv node.</p>
  11466. <p>Default is <code>screenUV</code>.</p>
  11467. </td>
  11468. </tr>
  11469. <tr>
  11470. <td class="name">
  11471. <strong>levelNode</strong>
  11472. </td>
  11473. <td class="description last">
  11474. <p>The level node.</p>
  11475. <p>Default is <code>null</code>.</p>
  11476. </td>
  11477. </tr>
  11478. <tr>
  11479. <td class="name">
  11480. <strong>framebufferTexture</strong>
  11481. </td>
  11482. <td class="description last">
  11483. <p>A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically.</p>
  11484. <p>Default is <code>null</code>.</p>
  11485. </td>
  11486. </tr>
  11487. </tbody>
  11488. </table>
  11489. </div>
  11490. <h3 class="name name-method" id="viewportSafeUV" translate="no">.<a href="#viewportSafeUV">viewportSafeUV</a><span class="signature">( uv : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec2></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> </h3>
  11491. <div class="method">
  11492. <div class="description">
  11493. <p>A special version of a screen uv function that involves a depth comparison
  11494. when computing the final uvs. The function mitigates visual errors when
  11495. using viewport texture nodes for refraction purposes. Without this function
  11496. objects in front of a refractive surface might appear on the refractive surface
  11497. which is incorrect.</p>
  11498. </div>
  11499. <table class="params">
  11500. <tbody>
  11501. <tr>
  11502. <td class="name">
  11503. <strong>uv</strong>
  11504. </td>
  11505. <td class="description last">
  11506. <p>Optional uv coordinates. By default <code>screenUV</code> is used.</p>
  11507. </td>
  11508. </tr>
  11509. </tbody>
  11510. </table>
  11511. <dl class="details">
  11512. <dt class="tag-returns"><strong>Returns:</strong> The update uv coordinates.</dt>
  11513. </dl>
  11514. </div>
  11515. <h3 class="name name-method" id="viewportSharedTexture" translate="no">.<a href="#viewportSharedTexture">viewportSharedTexture</a><span class="signature">( uvNode : <span class="param-type"><a href="Node.html">Node</a></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="ViewportSharedTextureNode.html">ViewportSharedTextureNode</a></span> </h3>
  11516. <div class="method">
  11517. <div class="description">
  11518. <p>TSL function for creating a shared viewport texture node.</p>
  11519. </div>
  11520. <table class="params">
  11521. <tbody>
  11522. <tr>
  11523. <td class="name">
  11524. <strong>uvNode</strong>
  11525. </td>
  11526. <td class="description last">
  11527. <p>The uv node.</p>
  11528. <p>Default is <code>screenUV</code>.</p>
  11529. </td>
  11530. </tr>
  11531. <tr>
  11532. <td class="name">
  11533. <strong>levelNode</strong>
  11534. </td>
  11535. <td class="description last">
  11536. <p>The level node.</p>
  11537. <p>Default is <code>null</code>.</p>
  11538. </td>
  11539. </tr>
  11540. </tbody>
  11541. </table>
  11542. </div>
  11543. <h3 class="name name-method" id="viewportTexture" translate="no">.<a href="#viewportTexture">viewportTexture</a><span class="signature">( uvNode : <span class="param-type"><a href="Node.html">Node</a></span>, levelNode : <span class="param-type"><a href="Node.html">Node</a></span>, framebufferTexture : <span class="param-type"><a href="Texture.html">Texture</a></span> )</span><span class="type-signature"> : <a href="ViewportTextureNode.html">ViewportTextureNode</a></span> </h3>
  11544. <div class="method">
  11545. <div class="description">
  11546. <p>TSL function for creating a viewport texture node.</p>
  11547. </div>
  11548. <table class="params">
  11549. <tbody>
  11550. <tr>
  11551. <td class="name">
  11552. <strong>uvNode</strong>
  11553. </td>
  11554. <td class="description last">
  11555. <p>The uv node.</p>
  11556. <p>Default is <code>screenUV</code>.</p>
  11557. </td>
  11558. </tr>
  11559. <tr>
  11560. <td class="name">
  11561. <strong>levelNode</strong>
  11562. </td>
  11563. <td class="description last">
  11564. <p>The level node.</p>
  11565. <p>Default is <code>null</code>.</p>
  11566. </td>
  11567. </tr>
  11568. <tr>
  11569. <td class="name">
  11570. <strong>framebufferTexture</strong>
  11571. </td>
  11572. <td class="description last">
  11573. <p>A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically.</p>
  11574. <p>Default is <code>null</code>.</p>
  11575. </td>
  11576. </tr>
  11577. </tbody>
  11578. </table>
  11579. </div>
  11580. <h3 class="name name-method" id="vogelDiskSample" translate="no">.<a href="#vogelDiskSample">vogelDiskSample</a><span class="signature">( sampleIndex : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, samplesCount : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, phi : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> </h3>
  11581. <div class="method">
  11582. <div class="description">
  11583. <p>Vogel disk sampling for uniform circular distribution.</p>
  11584. <p>This function generates sample points distributed uniformly on a disk using the golden angle,
  11585. resulting in an efficient low-discrepancy sequence for sampling. The rotation parameter (phi)
  11586. allows randomizing the pattern per-pixel when combined with IGN.</p>
  11587. </div>
  11588. <table class="params">
  11589. <tbody>
  11590. <tr>
  11591. <td class="name">
  11592. <strong>sampleIndex</strong>
  11593. </td>
  11594. <td class="description last">
  11595. <p>The index of the current sample (0-based).</p>
  11596. </td>
  11597. </tr>
  11598. <tr>
  11599. <td class="name">
  11600. <strong>samplesCount</strong>
  11601. </td>
  11602. <td class="description last">
  11603. <p>The total number of samples.</p>
  11604. </td>
  11605. </tr>
  11606. <tr>
  11607. <td class="name">
  11608. <strong>phi</strong>
  11609. </td>
  11610. <td class="description last">
  11611. <p>Rotation angle in radians (typically from IGN * 2π).</p>
  11612. </td>
  11613. </tr>
  11614. </tbody>
  11615. </table>
  11616. <dl class="details">
  11617. <dt class="tag-returns"><strong>Returns:</strong> A 2D point on the unit disk.</dt>
  11618. </dl>
  11619. </div>
  11620. <h3 class="name name-method" id="wgsl" translate="no">.<a href="#wgsl">wgsl</a><span class="signature">( src : <span class="param-type">string</span>, includes : <span class="param-type">Array.&lt;<a href="Node.html">Node</a>></span> )</span><span class="type-signature"> : <a href="CodeNode.html">CodeNode</a></span> </h3>
  11621. <div class="method">
  11622. <div class="description">
  11623. <p>TSL function for creating a WGSL code node.</p>
  11624. </div>
  11625. <table class="params">
  11626. <tbody>
  11627. <tr>
  11628. <td class="name">
  11629. <strong>src</strong>
  11630. </td>
  11631. <td class="description last">
  11632. <p>The native code.</p>
  11633. </td>
  11634. </tr>
  11635. <tr>
  11636. <td class="name">
  11637. <strong>includes</strong>
  11638. </td>
  11639. <td class="description last">
  11640. <p>An array of includes.</p>
  11641. </td>
  11642. </tr>
  11643. </tbody>
  11644. </table>
  11645. </div>
  11646. <h3 class="name name-method" id="workgroupArray" translate="no">.<a href="#workgroupArray">workgroupArray</a><span class="signature">( type : <span class="param-type">string</span>, count : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="WorkgroupInfoNode.html">WorkgroupInfoNode</a></span> </h3>
  11647. <div class="method">
  11648. <div class="description">
  11649. <p>TSL function for creating a workgroup info node.
  11650. Creates a new 'workgroup' scoped array buffer.</p>
  11651. </div>
  11652. <table class="params">
  11653. <tbody>
  11654. <tr>
  11655. <td class="name">
  11656. <strong>type</strong>
  11657. </td>
  11658. <td class="description last">
  11659. <p>The data type of a 'workgroup' scoped buffer element.</p>
  11660. </td>
  11661. </tr>
  11662. <tr>
  11663. <td class="name">
  11664. <strong>count</strong>
  11665. </td>
  11666. <td class="description last">
  11667. <p>The number of elements in the buffer.</p>
  11668. <p>Default is <code>0</code>.</p>
  11669. </td>
  11670. </tr>
  11671. </tbody>
  11672. </table>
  11673. </div>
  11674. <h3 class="name name-method" id="workgroupBarrier" translate="no">.<a href="#workgroupBarrier">workgroupBarrier</a><span class="signature">()</span><span class="type-signature"> : <a href="BarrierNode.html">BarrierNode</a></span> </h3>
  11675. <div class="method">
  11676. <div class="description">
  11677. <p>TSL function for creating a workgroup barrier. All compute shader
  11678. invocations must wait for each invocation within a workgroup to
  11679. complete before the barrier can be surpassed.</p>
  11680. </div>
  11681. </div>
  11682. <h3 class="name name-method" id="workingToColorSpace" translate="no">.<a href="#workingToColorSpace">workingToColorSpace</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, targetColorSpace : <span class="param-type">string</span> )</span><span class="type-signature"> : <a href="ColorSpaceNode.html">ColorSpaceNode</a></span> </h3>
  11683. <div class="method">
  11684. <div class="description">
  11685. <p>TSL function for converting a given color node from the current working color space to the given color space.</p>
  11686. </div>
  11687. <table class="params">
  11688. <tbody>
  11689. <tr>
  11690. <td class="name">
  11691. <strong>node</strong>
  11692. </td>
  11693. <td class="description last">
  11694. <p>Represents the node to convert.</p>
  11695. </td>
  11696. </tr>
  11697. <tr>
  11698. <td class="name">
  11699. <strong>targetColorSpace</strong>
  11700. </td>
  11701. <td class="description last">
  11702. <p>The target color space.</p>
  11703. </td>
  11704. </tr>
  11705. </tbody>
  11706. </table>
  11707. </div>
  11708. <h3 class="name name-method" id="xor" translate="no">.<a href="#xor">xor</a><span class="signature">( a : <span class="param-type"><a href="Node.html">Node</a></span>, b : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="OperatorNode.html">OperatorNode</a></span> </h3>
  11709. <div class="method">
  11710. <div class="description">
  11711. <p>Performs logical XOR on two nodes.</p>
  11712. </div>
  11713. <table class="params">
  11714. <tbody>
  11715. <tr>
  11716. <td class="name">
  11717. <strong>a</strong>
  11718. </td>
  11719. <td class="description last">
  11720. <p>The first input.</p>
  11721. </td>
  11722. </tr>
  11723. <tr>
  11724. <td class="name">
  11725. <strong>b</strong>
  11726. </td>
  11727. <td class="description last">
  11728. <p>The second input.</p>
  11729. </td>
  11730. </tr>
  11731. </tbody>
  11732. </table>
  11733. </div>
  11734. <h2 class="subsection-title">Type Definitions</h2>
  11735. <div class="member">
  11736. <h3 class="name" id="ConstantsInterpolationSamplingMode" translate="no">.<a href="#ConstantsInterpolationSamplingMode">ConstantsInterpolationSamplingMode</a> </h3>
  11737. <div class="description">
  11738. <p>Represents the different interpolation sampling modes.</p>
  11739. </div>
  11740. <table class="props">
  11741. <tbody>
  11742. <tr>
  11743. <td class="name">
  11744. <strong>NORMAL</strong>
  11745. <br>
  11746. <span class="param-type">string</span>
  11747. </td>
  11748. <td class="description last">
  11749. <p>Normal sampling mode.</p>
  11750. </td>
  11751. </tr>
  11752. <tr>
  11753. <td class="name">
  11754. <strong>CENTROID</strong>
  11755. <br>
  11756. <span class="param-type">string</span>
  11757. </td>
  11758. <td class="description last">
  11759. <p>Centroid sampling mode.</p>
  11760. </td>
  11761. </tr>
  11762. <tr>
  11763. <td class="name">
  11764. <strong>SAMPLE</strong>
  11765. <br>
  11766. <span class="param-type">string</span>
  11767. </td>
  11768. <td class="description last">
  11769. <p>Sample-specific sampling mode.</p>
  11770. </td>
  11771. </tr>
  11772. <tr>
  11773. <td class="name">
  11774. <strong>FIRST</strong>
  11775. <br>
  11776. <span class="param-type">string</span>
  11777. </td>
  11778. <td class="description last">
  11779. <p>Flat interpolation using the first vertex.</p>
  11780. </td>
  11781. </tr>
  11782. <tr>
  11783. <td class="name">
  11784. <strong>EITHER</strong>
  11785. <br>
  11786. <span class="param-type">string</span>
  11787. </td>
  11788. <td class="description last">
  11789. <p>Flat interpolation using either vertex.</p>
  11790. </td>
  11791. </tr>
  11792. </tbody>
  11793. </table>
  11794. </div>
  11795. <div class="member">
  11796. <h3 class="name" id="ConstantsInterpolationSamplingType" translate="no">.<a href="#ConstantsInterpolationSamplingType">ConstantsInterpolationSamplingType</a> </h3>
  11797. <div class="description">
  11798. <p>Represents the different interpolation sampling types.</p>
  11799. </div>
  11800. <table class="props">
  11801. <tbody>
  11802. <tr>
  11803. <td class="name">
  11804. <strong>PERSPECTIVE</strong>
  11805. <br>
  11806. <span class="param-type">string</span>
  11807. </td>
  11808. <td class="description last">
  11809. <p>Perspective-correct interpolation.</p>
  11810. </td>
  11811. </tr>
  11812. <tr>
  11813. <td class="name">
  11814. <strong>LINEAR</strong>
  11815. <br>
  11816. <span class="param-type">string</span>
  11817. </td>
  11818. <td class="description last">
  11819. <p>Linear interpolation.</p>
  11820. </td>
  11821. </tr>
  11822. <tr>
  11823. <td class="name">
  11824. <strong>FLAT</strong>
  11825. <br>
  11826. <span class="param-type">string</span>
  11827. </td>
  11828. <td class="description last">
  11829. <p>Flat interpolation.</p>
  11830. </td>
  11831. </tr>
  11832. </tbody>
  11833. </table>
  11834. </div>
  11835. <div class="member">
  11836. <h3 class="name" id="ConstantsMouse" translate="no">.<a href="#ConstantsMouse">ConstantsMouse</a> </h3>
  11837. <div class="description">
  11838. <p>This type represents mouse buttons and interaction types in context of controls.</p>
  11839. </div>
  11840. <table class="props">
  11841. <tbody>
  11842. <tr>
  11843. <td class="name">
  11844. <strong>MIDDLE</strong>
  11845. <br>
  11846. <span class="param-type">number</span>
  11847. </td>
  11848. <td class="description last">
  11849. <p>The left mouse button.</p>
  11850. </td>
  11851. </tr>
  11852. <tr>
  11853. <td class="name">
  11854. <strong>LEFT</strong>
  11855. <br>
  11856. <span class="param-type">number</span>
  11857. </td>
  11858. <td class="description last">
  11859. <p>The middle mouse button.</p>
  11860. </td>
  11861. </tr>
  11862. <tr>
  11863. <td class="name">
  11864. <strong>RIGHT</strong>
  11865. <br>
  11866. <span class="param-type">number</span>
  11867. </td>
  11868. <td class="description last">
  11869. <p>The right mouse button.</p>
  11870. </td>
  11871. </tr>
  11872. <tr>
  11873. <td class="name">
  11874. <strong>ROTATE</strong>
  11875. <br>
  11876. <span class="param-type">number</span>
  11877. </td>
  11878. <td class="description last">
  11879. <p>A rotate interaction.</p>
  11880. </td>
  11881. </tr>
  11882. <tr>
  11883. <td class="name">
  11884. <strong>DOLLY</strong>
  11885. <br>
  11886. <span class="param-type">number</span>
  11887. </td>
  11888. <td class="description last">
  11889. <p>A dolly interaction.</p>
  11890. </td>
  11891. </tr>
  11892. <tr>
  11893. <td class="name">
  11894. <strong>PAN</strong>
  11895. <br>
  11896. <span class="param-type">number</span>
  11897. </td>
  11898. <td class="description last">
  11899. <p>A pan interaction.</p>
  11900. </td>
  11901. </tr>
  11902. </tbody>
  11903. </table>
  11904. </div>
  11905. <div class="member">
  11906. <h3 class="name" id="ConstantsTimestampQuery" translate="no">.<a href="#ConstantsTimestampQuery">ConstantsTimestampQuery</a> </h3>
  11907. <div class="description">
  11908. <p>This type represents the different timestamp query types.</p>
  11909. </div>
  11910. <table class="props">
  11911. <tbody>
  11912. <tr>
  11913. <td class="name">
  11914. <strong>COMPUTE</strong>
  11915. <br>
  11916. <span class="param-type">string</span>
  11917. </td>
  11918. <td class="description last">
  11919. <p>A <code>compute</code> timestamp query.</p>
  11920. </td>
  11921. </tr>
  11922. <tr>
  11923. <td class="name">
  11924. <strong>RENDER</strong>
  11925. <br>
  11926. <span class="param-type">string</span>
  11927. </td>
  11928. <td class="description last">
  11929. <p>A <code>render</code> timestamp query.</p>
  11930. </td>
  11931. </tr>
  11932. </tbody>
  11933. </table>
  11934. </div>
  11935. <div class="member">
  11936. <h3 class="name" id="ConstantsTouch" translate="no">.<a href="#ConstantsTouch">ConstantsTouch</a> </h3>
  11937. <div class="description">
  11938. <p>This type represents touch interaction types in context of controls.</p>
  11939. </div>
  11940. <table class="props">
  11941. <tbody>
  11942. <tr>
  11943. <td class="name">
  11944. <strong>ROTATE</strong>
  11945. <br>
  11946. <span class="param-type">number</span>
  11947. </td>
  11948. <td class="description last">
  11949. <p>A rotate interaction.</p>
  11950. </td>
  11951. </tr>
  11952. <tr>
  11953. <td class="name">
  11954. <strong>PAN</strong>
  11955. <br>
  11956. <span class="param-type">number</span>
  11957. </td>
  11958. <td class="description last">
  11959. <p>A pan interaction.</p>
  11960. </td>
  11961. </tr>
  11962. <tr>
  11963. <td class="name">
  11964. <strong>DOLLY_PAN</strong>
  11965. <br>
  11966. <span class="param-type">number</span>
  11967. </td>
  11968. <td class="description last">
  11969. <p>The dolly-pan interaction.</p>
  11970. </td>
  11971. </tr>
  11972. <tr>
  11973. <td class="name">
  11974. <strong>DOLLY_ROTATE</strong>
  11975. <br>
  11976. <span class="param-type">number</span>
  11977. </td>
  11978. <td class="description last">
  11979. <p>A dolly-rotate interaction.</p>
  11980. </td>
  11981. </tr>
  11982. </tbody>
  11983. </table>
  11984. </div>
  11985. <div class="member">
  11986. <h3 class="name" id="DebugConfig" translate="no">.<a href="#DebugConfig">DebugConfig</a> </h3>
  11987. <div class="description">
  11988. <p>Debug configuration.</p>
  11989. </div>
  11990. <table class="props">
  11991. <tbody>
  11992. <tr>
  11993. <td class="name">
  11994. <strong>checkShaderErrors</strong>
  11995. <br>
  11996. <span class="param-type">boolean</span>
  11997. </td>
  11998. <td class="description last">
  11999. <p>Whether shader errors should be checked or not.</p>
  12000. </td>
  12001. </tr>
  12002. <tr>
  12003. <td class="name">
  12004. <strong>onShaderError</strong>
  12005. <br>
  12006. <span class="param-type">function</span>
  12007. </td>
  12008. <td class="description last">
  12009. <p>A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now.</p>
  12010. </td>
  12011. </tr>
  12012. <tr>
  12013. <td class="name">
  12014. <strong>getShaderAsync</strong>
  12015. <br>
  12016. <span class="param-type">function</span>
  12017. </td>
  12018. <td class="description last">
  12019. <p>Allows the get the raw shader code for the given scene, camera and 3D object.</p>
  12020. </td>
  12021. </tr>
  12022. </tbody>
  12023. </table>
  12024. </div>
  12025. <div class="member">
  12026. <h3 class="name" id="ShadowMapConfig" translate="no">.<a href="#ShadowMapConfig">ShadowMapConfig</a> </h3>
  12027. <div class="description">
  12028. <p>Shadow map configuration</p>
  12029. </div>
  12030. <table class="props">
  12031. <tbody>
  12032. <tr>
  12033. <td class="name">
  12034. <strong>enabled</strong>
  12035. <br>
  12036. <span class="param-type">boolean</span>
  12037. </td>
  12038. <td class="description last">
  12039. <p>Whether to globally enable shadows or not.</p>
  12040. </td>
  12041. </tr>
  12042. <tr>
  12043. <td class="name">
  12044. <strong>transmitted</strong>
  12045. <br>
  12046. <span class="param-type">boolean</span>
  12047. </td>
  12048. <td class="description last">
  12049. <p>Whether to enable light transmission through non-opaque materials.</p>
  12050. </td>
  12051. </tr>
  12052. <tr>
  12053. <td class="name">
  12054. <strong>type</strong>
  12055. <br>
  12056. <span class="param-type">number</span>
  12057. </td>
  12058. <td class="description last">
  12059. <p>The shadow map type.</p>
  12060. </td>
  12061. </tr>
  12062. </tbody>
  12063. </table>
  12064. </div>
  12065. <div class="member">
  12066. <h3 class="name" id="XRConfig" translate="no">.<a href="#XRConfig">XRConfig</a> </h3>
  12067. <div class="description">
  12068. <p>XR configuration.</p>
  12069. </div>
  12070. <table class="props">
  12071. <tbody>
  12072. <tr>
  12073. <td class="name">
  12074. <strong>enabled</strong>
  12075. <br>
  12076. <span class="param-type">boolean</span>
  12077. </td>
  12078. <td class="description last">
  12079. <p>Whether to globally enable XR or not.</p>
  12080. </td>
  12081. </tr>
  12082. </tbody>
  12083. </table>
  12084. </div>
  12085. <h3 class="name name-method" id="onAnimationCallback" translate="no">.<a href="#onAnimationCallback">onAnimationCallback</a><span class="signature">( time : <span class="param-type">DOMHighResTimeStamp</span>, frame : <span class="param-type">XRFrame</span> )</span> </h3>
  12086. <div class="method">
  12087. <div class="description">
  12088. <p>Animation loop parameter of <code>renderer.setAnimationLoop()</code>.</p>
  12089. </div>
  12090. <table class="params">
  12091. <tbody>
  12092. <tr>
  12093. <td class="name">
  12094. <strong>time</strong>
  12095. </td>
  12096. <td class="description last">
  12097. <p>A timestamp indicating the end time of the previous frame's rendering.</p>
  12098. </td>
  12099. </tr>
  12100. <tr>
  12101. <td class="name">
  12102. <strong>frame</strong>
  12103. </td>
  12104. <td class="description last">
  12105. <p>A reference to the current XR frame. Only relevant when using XR rendering.</p>
  12106. </td>
  12107. </tr>
  12108. </tbody>
  12109. </table>
  12110. </div>
  12111. <h3 class="name name-method" id="onErrorCallback" translate="no">.<a href="#onErrorCallback">onErrorCallback</a><span class="signature">( error : <span class="param-type">Error</span> )</span> </h3>
  12112. <div class="method">
  12113. <div class="description">
  12114. <p>Callback for onError in loaders.</p>
  12115. </div>
  12116. <table class="params">
  12117. <tbody>
  12118. <tr>
  12119. <td class="name">
  12120. <strong>error</strong>
  12121. </td>
  12122. <td class="description last">
  12123. <p>The error which occurred during the loading process.</p>
  12124. </td>
  12125. </tr>
  12126. </tbody>
  12127. </table>
  12128. </div>
  12129. <h3 class="name name-method" id="onProgressCallback" translate="no">.<a href="#onProgressCallback">onProgressCallback</a><span class="signature">( event : <span class="param-type">ProgressEvent</span> )</span> </h3>
  12130. <div class="method">
  12131. <div class="description">
  12132. <p>Callback for onProgress in loaders.</p>
  12133. </div>
  12134. <table class="params">
  12135. <tbody>
  12136. <tr>
  12137. <td class="name">
  12138. <strong>event</strong>
  12139. </td>
  12140. <td class="description last">
  12141. <p>An instance of <code>ProgressEvent</code> that represents the current loading status.</p>
  12142. </td>
  12143. </tr>
  12144. </tbody>
  12145. </table>
  12146. </div>
  12147. <h3 class="name name-method" id="renderObjectFunction" translate="no">.<a href="#renderObjectFunction">renderObjectFunction</a><span class="signature">( object : <span class="param-type"><a href="Object3D.html">Object3D</a></span>, scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, geometry : <span class="param-type"><a href="BufferGeometry.html">BufferGeometry</a></span>, material : <span class="param-type"><a href="Material.html">Material</a></span>, group : <span class="param-type">Object</span>, lightsNode : <span class="param-type"><a href="LightsNode.html">LightsNode</a></span>, clippingContext : <span class="param-type"><a href="ClippingContext.html">ClippingContext</a></span>, passId : <span class="param-type">string</span> )</span> </h3>
  12148. <div class="method">
  12149. <div class="description">
  12150. <p>Callback for <a href="Renderer.html#setRenderObjectFunction">Renderer#setRenderObjectFunction</a>.</p>
  12151. </div>
  12152. <table class="params">
  12153. <tbody>
  12154. <tr>
  12155. <td class="name">
  12156. <strong>object</strong>
  12157. </td>
  12158. <td class="description last">
  12159. <p>The 3D object.</p>
  12160. </td>
  12161. </tr>
  12162. <tr>
  12163. <td class="name">
  12164. <strong>scene</strong>
  12165. </td>
  12166. <td class="description last">
  12167. <p>The scene the 3D object belongs to.</p>
  12168. </td>
  12169. </tr>
  12170. <tr>
  12171. <td class="name">
  12172. <strong>camera</strong>
  12173. </td>
  12174. <td class="description last">
  12175. <p>The camera the object should be rendered with.</p>
  12176. </td>
  12177. </tr>
  12178. <tr>
  12179. <td class="name">
  12180. <strong>geometry</strong>
  12181. </td>
  12182. <td class="description last">
  12183. <p>The object's geometry.</p>
  12184. </td>
  12185. </tr>
  12186. <tr>
  12187. <td class="name">
  12188. <strong>material</strong>
  12189. </td>
  12190. <td class="description last">
  12191. <p>The object's material.</p>
  12192. </td>
  12193. </tr>
  12194. <tr>
  12195. <td class="name">
  12196. <strong>group</strong>
  12197. </td>
  12198. <td class="description last">
  12199. <p>Only relevant for objects using multiple materials. This represents a group entry from the respective <code>BufferGeometry</code>.</p>
  12200. </td>
  12201. </tr>
  12202. <tr>
  12203. <td class="name">
  12204. <strong>lightsNode</strong>
  12205. </td>
  12206. <td class="description last">
  12207. <p>The current lights node.</p>
  12208. </td>
  12209. </tr>
  12210. <tr>
  12211. <td class="name">
  12212. <strong>clippingContext</strong>
  12213. </td>
  12214. <td class="description last">
  12215. <p>The clipping context.</p>
  12216. </td>
  12217. </tr>
  12218. <tr>
  12219. <td class="name">
  12220. <strong>passId</strong>
  12221. </td>
  12222. <td class="description last">
  12223. <p>An optional ID for identifying the pass.</p>
  12224. <p>Default is <code>null</code>.</p>
  12225. </td>
  12226. </tr>
  12227. </tbody>
  12228. </table>
  12229. </div>
  12230. <h3 class="name name-method" id="traverseCallback" translate="no">.<a href="#traverseCallback">traverseCallback</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span> </h3>
  12231. <div class="method">
  12232. <div class="description">
  12233. <p>Callback for <a href="Node.html#traverse">Node#traverse</a>.</p>
  12234. </div>
  12235. <table class="params">
  12236. <tbody>
  12237. <tr>
  12238. <td class="name">
  12239. <strong>node</strong>
  12240. </td>
  12241. <td class="description last">
  12242. <p>The current node.</p>
  12243. </td>
  12244. </tr>
  12245. </tbody>
  12246. </table>
  12247. </div>
  12248. </article>
  12249. </section>
  12250. <script src="../scripts/linenumber.js"></script>
  12251. <script src="../scripts/page.js"></script>
  12252. </body>
  12253. </html>
粤ICP备19079148号