enbsunsprite.fx 153 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804
  1. // K ENB Extensive Shaders
  2. // Extensive Sunsprite Shader
  3. // Code modifications by KYO aka Oyama w/some help from Boris ;)
  4. // Sunglare Technique Vertex Codes by Matso
  5. // Initial Lens Distortion Code by IceLaGlace
  6. // Sunglare and Lens Textures by --JawZ--
  7. // Copyright (c) 2007-2013 Boris Vorontsov
  8. // Hexagons and High Dispersion Sunglare
  9. //
  10. // KYO : * DISABLE * USE_SUNGLARE below if using another .tga texture
  11. //====================================================================================================
  12. // Internal parameters covering all Techniques
  13. //====================================================================================================
  14. #define fLensIntensity 0.865 //Will affect all Lenses and all Draw Techniques at once
  15. #define fLensScaleFactor 0.288 //Will affect all Lenses and all Draw techniques at once
  16. //1.0, 0.75, 0.66, 0.5, 0.25, 0.33, 0.322, so on
  17. //====================================================================================================
  18. // Usefull Constants
  19. //====================================================================================================
  20. #define PI 3.1415926535897932384626433832795
  21. //====================================================================================================
  22. // Enable / Disable full lines of lenses a/o Sunglare
  23. // 1 to enable, 0 to disable
  24. // Choose 1 PRIMARY method *ONLY* at a time
  25. //====================================================================================================
  26. #define USE_PRIMARY 1 //11 Lenses w/Color variations
  27. #define USE_PRIMARY_ALT 0 //18 Lenses w/Color Variations
  28. #define USE_PRIMARY_ALT_2 0 //4 Lenses w/Color Variations
  29. #define USE_SUNGLARE 1 //3 Lenses w/Color Variations //* disable for other .tga textures *
  30. #define USE_SECONDARY 1 //11 Lenses
  31. #define USE_SECONDARY_2 0 //11 Lenses
  32. #define USE_THIRDARY 0 //11 Lenses
  33. #define USE_THIRDARY_2 0 //11 Lenses
  34. #define USE_FOURTH 1 //3 Lenses w/Color Variations
  35. #define USE_FOURTH_2 1 //3 Lenses w/Color Variations
  36. //====================================================================================================
  37. // Enable / Disable Time-Related Sunglare Dispersion Rays Length
  38. // 1 to enable, 0 to disable
  39. //====================================================================================================
  40. #define USE_DISPERSION_BOOST 0
  41. #define fBoost_Sunglare 1.0
  42. //====================================================================================================
  43. // Enable / Disable Lens Distortions w/Chromatic Aberration on Edges
  44. // Pointless for Sunglare
  45. // 1 to enable, 0 to disable
  46. // Positive Distortions will "compact" Lenses'Edges, making them "rounder"
  47. // Negative Distortions will "enlarge" Lenses'Edges, making them "harder"
  48. // Doing so, positive will decrease size, negative will increase
  49. // Compensate both effects via LensSize
  50. // If using positive distortion, increase LensSize to compensate
  51. // If using negative distortion, decrease LensSize to compensate
  52. //====================================================================================================
  53. #define USE_LENS_DISTORTIONS_PRIMARY 1
  54. #define USE_LENS_DISTORTIONS_PRIMARY_ALT 1
  55. #define USE_LENS_DISTORTIONS_PRIMARY_ALT_2 1
  56. #define USE_LENS_DISTORTIONS_SECONDARY 1
  57. #define USE_LENS_DISTORTIONS_SECONDARY_2 1
  58. #define USE_LENS_DISTORTIONS_THIRDARY 1
  59. #define USE_LENS_DISTORTIONS_THIRDARY_2 1
  60. #define USE_LENS_DISTORTIONS_FOURTH 1
  61. #define USE_LENS_DISTORTIONS_FOURTH_2 1
  62. #define USE_CHROMA_FORMULA_PRIMARY 7 //[Choose from 1 to 7]
  63. #define USE_CHROMA_FORMULA_PRIMARY_ALT 1 //[Choose from 1 to 7]
  64. #define USE_CHROMA_FORMULA_PRIMARY_ALT_2 1 //[Choose from 1 to 7]
  65. #define USE_CHROMA_FORMULA_SECONDARY 7 //[Choose from 1 to 7]
  66. #define USE_CHROMA_FORMULA_SECONDARY_2 7 //[Choose from 1 to 7]
  67. #define USE_CHROMA_FORMULA_THIRDARY 1 //[Choose from 1 to 7]
  68. #define USE_CHROMA_FORMULA_THIRDARY_2 1 //[Choose from 1 to 7]
  69. #define USE_CHROMA_FORMULA_FOURTH 1 //[Choose from 1 to 7]
  70. #define USE_CHROMA_FORMULA_FOURTH_2 2 //[Choose from 1 to 7]
  71. //====================================================================================================
  72. // PRIMARY
  73. #define fChromaticAmount_Primary 0.275
  74. #define fLensSize_Primary 0.775 // 0.5 = Original Size
  75. #define fLensDistortion_Primary 2.0
  76. #define fLensDistortionCubic_Primary 0.0
  77. //====================================================================
  78. // PRIMARY_ALT
  79. #define fChromaticAmount_Primary_Alt 0.35
  80. #define fLensSize_Primary_Alt 0.75
  81. #define fLensDistortion_Primary_Alt 2.0
  82. #define fLensDistortionCubic_Primary_Alt 0.0
  83. //====================================================================
  84. // PRIMARY_ALT_2
  85. #define fChromaticAmount_Primary_Alt_2 0.25
  86. #define fLensSize_Primary_Alt_2 0.7
  87. #define fLensDistortion_Primary_Alt_2 1.75
  88. #define fLensDistortionCubic_Primary_Alt_2 0.2
  89. //====================================================================
  90. // SECONDARY
  91. #define fChromaticAmount_Secondary 0.25
  92. #define fLensSize_Secondary 0.5
  93. #define fLensDistortion_Secondary 0.0
  94. #define fLensDistortionCubic_Secondary 0.0
  95. //====================================================================
  96. // SECONDARY_2
  97. #define fChromaticAmount_Secondary_2 0.25
  98. #define fLensSize_Secondary_2 0.5
  99. #define fLensDistortion_Secondary_2 0.0
  100. #define fLensDistortionCubic_Secondary_2 0.0
  101. //====================================================================
  102. // THIRDARY
  103. #define fChromaticAmount_Thirdary 0.25
  104. #define fLensSize_Thirdary 0.5
  105. #define fLensDistortion_Thirdary 0.0
  106. #define fLensDistortionCubic_Thirdary 0.0
  107. //====================================================================
  108. // THIRDARY_2
  109. #define fChromaticAmount_Thirdary_2 0.25
  110. #define fLensSize_Thirdary_2 0.5
  111. #define fLensDistortion_Thirdary_2 0.0
  112. #define fLensDistortionCubic_Thirdary_2 0.0
  113. //====================================================================
  114. // FOURTH
  115. #define fChromaticAmount_Fourth 0.25
  116. #define fLensSize_Fourth 0.7
  117. #define fLensDistortion_Fourth 2.0
  118. #define fLensDistortionCubic_Fourth 0.0
  119. //====================================================================
  120. // FOURTH_2
  121. #define fChromaticAmount_Fourth_2 0.25
  122. #define fLensSize_Fourth_2 0.75
  123. #define fLensDistortion_Fourth_2 2.1
  124. #define fLensDistortionCubic_Fourth_2 0.0
  125. //====================================================================================================
  126. // Enable / Disable RGB Variations
  127. // RGB components vary accordingly to R/G/B multipliers below in Individual Parameters
  128. // 1 to enable, 0 to disable
  129. //====================================================================================================
  130. #define USE_RGB_VARIATIONS_PRIMARY 1
  131. #define USE_RGB_VARIATIONS_PRIMARY_ALT 1
  132. #define USE_RGB_VARIATIONS_PRIMARY_ALT_2 1
  133. #define USE_RGB_VARIATIONS_SUNGLARE 1
  134. #define USE_RGB_VARIATIONS_FOURTH 1
  135. #define USE_RGB_VARIATIONS_FOURTH_2 1
  136. //====================================================================================================
  137. // Enable / Disable Time-Related Variable Scales
  138. // 1 to enable, 0 to disable
  139. // Higher is Faster
  140. //====================================================================================================
  141. #define USE_SCALE_VARIATIONS__PRIMARY 1
  142. #define fScaleTimeFactor_Primary 60.0
  143. #define USE_SCALE_VARIATIONS__PRIMARY_ALT 1
  144. #define fScaleTimeFactor_Primary_Alt 80.0
  145. #define USE_SCALE_VARIATIONS__PRIMARY_ALT_2 1
  146. #define fScaleTimeFactor_Primary_Alt_2 60.0
  147. #define USE_SCALE_VARIATIONS__SUNGLARE 1
  148. #define fScaleTimeFactor_Sunglare 60.0
  149. #define USE_SCALE_VARIATIONS__SECONDARY 1
  150. #define fScaleTimeFactor_Secondary 70.0
  151. #define USE_SCALE_VARIATIONS__SECONDARY_2 1
  152. #define fScaleTimeFactor_Secondary_2 70.0
  153. #define USE_SCALE_VARIATIONS__THIRDARY 1
  154. #define fScaleTimeFactor_Thirdary 60.0
  155. #define USE_SCALE_VARIATIONS__THIRDARY_2 1
  156. #define fScaleTimeFactor_Thirdary_2 60.0
  157. #define USE_SCALE_VARIATIONS__FOURTH 1
  158. #define fScaleTimeFactor_Fourth 120.0
  159. #define USE_SCALE_VARIATIONS__FOURTH_2 1
  160. #define fScaleTimeFactor_Fourth_2 90.0
  161. //====================================================================================================
  162. // Enable / Disable Time-Related Variable Intensities
  163. // 1 to enable, 0 to disable
  164. // Higher is Faster
  165. // * NOTE * : DON'T USE VARIABLE INTENSITIES AND LIGHT EMULATION AT THE SAME TIME FOR SAME TARGET
  166. //====================================================================================================
  167. #define USE_INTENSITY_VARIATIONS_PRIMARY 1
  168. #define fIntTimeFactor_Primary 60.0
  169. #define USE_INTENSITY_VARIATIONS_PRIMARY_ALT 1
  170. #define fIntTimeFactor_Primary_Alt 60.0
  171. #define USE_INTENSITY_VARIATIONS_PRIMARY_ALT_2 1
  172. #define fIntTimeFactor_Primary_Alt_2 60.0
  173. #define USE_INTENSITY_VARIATIONS_SUNGLARE 0
  174. #define fIntTimeFactor_Sunglare 60.0
  175. #define USE_INTENSITY_VARIATIONS_SECONDARY 0
  176. #define fIntTimeFactor_Secondary 70.0
  177. #define USE_INTENSITY_VARIATIONS_SECONDARY_2 1
  178. #define fIntTimeFactor_Secondary_2 70.0
  179. #define USE_INTENSITY_VARIATIONS_THIRDARY 0
  180. #define fIntTimeFactor_Thirdary 60.0
  181. #define USE_INTENSITY_VARIATIONS_THIRDARY_2 0
  182. #define fIntTimeFactor_Thirdary_2 60.0
  183. #define USE_INTENSITY_VARIATIONS_FOURTH 1
  184. #define fIntTimeFactor_Fourth 80.0
  185. #define USE_INTENSITY_VARIATIONS_FOURTH_2 1
  186. #define fIntTimeFactor_Fourth_2 50.0
  187. //====================================================================================================
  188. // Enable / Disable Light Emulation (Flashes or Pulses)
  189. // 1 to enable, 0 to disable
  190. // Set Low Velocity for Pulses, High Velocity for Flashes
  191. // 0.0 to 1000.0 = Low
  192. // 0.0 to 10000.0 = Medium
  193. // 10000.0 and beyond = High
  194. // * NOTE * : DON'T USE LIGHT EMULATION AND VARIABLE INTENSITIES AT THE SAME TIME FOR SAME TARGET
  195. //====================================================================================================
  196. #define USE_LIGHT_PRIMARY 0
  197. #define USE_LIGHT_PRIMARY_ALT 0
  198. #define USE_LIGHT_PRIMARY_ALT_2 0
  199. #define USE_LIGHT_SUNGLARE 0
  200. #define USE_LIGHT_SECONDARY 1
  201. #define USE_LIGHT_SECONDARY_2 0
  202. #define USE_LIGHT_THIRDARY 1
  203. #define USE_LIGHT_THIRDARY_2 1
  204. #define USE_LIGHT_FOURTH 0
  205. #define USE_LIGHT_FOURTH_2 0
  206. #define fLightVelocity_Primary 2.0
  207. #define fLightVelocity_Primary_Alt 2.0
  208. #define fLightVelocity_Primary_Alt_2 2.0
  209. /**
  210. * Set high value for Velocity here and do NOT intervene on second part
  211. */
  212. #define fLightVelocity_Sunglare 12000.0 + abs(frac(Timer.x * 20000.0)* 2.0 - 1.0)
  213. #define fLightVelocity_Secondary 20.0
  214. #define fLightVelocity_Secondary_2 20.0
  215. #define fLightVelocity_Thirdary 40.0
  216. #define fLightVelocity_Thirdary_2 20.0
  217. #define fLightVelocity_Fourth 40.0
  218. #define fLightVelocity_Fourth_2 20.0
  219. //====================================================================================================
  220. // Enable / Disable Depth-Like Motion, full lines of Lenses
  221. // Motion from Eye to Sun and back
  222. // 1 to enable, 0 to disable
  223. // Higher is Faster
  224. //====================================================================================================
  225. #define USE_MOTION_PRIMARY 1
  226. #define USE_MOTION_PRIMARY_ALT 1
  227. #define USE_MOTION_PRIMARY_ALT_2 1
  228. #define USE_MOTION_SUNGLARE 0
  229. #define USE_MOTION_SECONDARY 1
  230. #define USE_MOTION_SECONDARY_2 1
  231. #define USE_MOTION_THIRDARY 1
  232. #define USE_MOTION_THIRDARY_2 1
  233. #define USE_MOTION_FOURTH 1
  234. #define USE_MOTION_FOURTH_2 1
  235. #define fVelocity_Primary 40.0
  236. #define fVelocity_Primary_Alt 50.0
  237. #define fVelocity_Primary_Alt_2 50.0
  238. #define fVelocity_Sunglare 200.0
  239. #define fVelocity_Secondary 35.0
  240. #define fVelocity_Secondary_2 35.0
  241. #define fVelocity_Thirdary 35.0
  242. #define fVelocity_Thirdary_2 35.0
  243. #define fVelocity_Fourth 50.0
  244. #define fVelocity_Fourth_2 45.0
  245. //====================================================================================================
  246. // Enable / Disable Primary a/o Primary_Alt, Alt_2, etc... Per-Lenses Depth-Like Motion
  247. // 1 to enable, 0 to disable
  248. // Positive = from Sun to Eye, Negative = from Eye to Sun
  249. //====================================================================================================
  250. #define USE_LENSMOTION_PRIMARY 1
  251. #define fMotionVelocity_Lens26 -60.0
  252. #define fMotionVelocity_Lens27 100.0
  253. #define fMotionVelocity_Lens28 -60.0
  254. #define fMotionVelocity_Lens29 60.0
  255. #define fMotionVelocity_Lens30 -60.0
  256. #define fMotionVelocity_Lens31 60.0
  257. #define fMotionVelocity_Lens32 -40.0
  258. #define fMotionVelocity_Lens33 80.0
  259. #define fMotionVelocity_Lens34 -120.0
  260. #define fMotionVelocity_Lens35 100.0
  261. #define fMotionVelocity_Lens36 -100.0
  262. #define USE_LENSMOTION_PRIMARY_ALT 1
  263. #define fMotionVelocity_Lens59 -60.0
  264. #define fMotionVelocity_Lens60 40.0
  265. #define fMotionVelocity_Lens61 -60.0
  266. #define fMotionVelocity_Lens62 80.0
  267. #define fMotionVelocity_Lens63 -100.0
  268. #define fMotionVelocity_Lens64 60.0
  269. #define fMotionVelocity_Lens65 -40.0
  270. #define fMotionVelocity_Lens66 80.0
  271. #define fMotionVelocity_Lens67 -80.0
  272. #define fMotionVelocity_Lens68 80.0
  273. #define fMotionVelocity_Lens69 -100.0
  274. #define fMotionVelocity_Lens70 -60.0
  275. #define fMotionVelocity_Lens71 60.0
  276. #define fMotionVelocity_Lens72 -80.0
  277. #define fMotionVelocity_Lens73 80.0
  278. #define fMotionVelocity_Lens74 -60.0
  279. #define fMotionVelocity_Lens75 80.0
  280. #define fMotionVelocity_Lens76 -60.0
  281. #define USE_LENSMOTION_PRIMARY_ALT_2 1
  282. #define fMotionVelocity_Lens77 -20.0
  283. #define fMotionVelocity_Lens78 20.0
  284. #define fMotionVelocity_Lens79 -20.0
  285. #define fMotionVelocity_Lens80 20.0
  286. //====================================================================================================
  287. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  288. // Internal Techniques Parameters - These affect whole lines
  289. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  290. //====================================================================================================
  291. // Scale multiply / compensate
  292. // Intensity multiply / compensate
  293. // Contrast - More is stronger opacity, also depends on Sun Intensity
  294. // Line Horizontal Position - Negative values will displace to left, Positive to right
  295. // Line Vertical Position - Negative values will displace to down, Positive to up
  296. // 0.0 HPos is neutral, equal to Primaries
  297. //====================================================================================================
  298. // PRIMARY
  299. #define fScalePrimary 0.855
  300. #define fIntensityPrimary 1.0
  301. #define fContrastPrimary 1.0
  302. #define fHPosPrimary 0.0
  303. #define fVPosPrimary 0.0
  304. // PRIMARY_ALT
  305. #define fScalePrimary_Alt 1.145
  306. #define fIntensityPrimary_Alt 0.985 //1.045
  307. #define fContrastPrimary_Alt 0.9 //1.2
  308. #define fHPosPrimary_Alt 0.0
  309. #define fVPosPrimary_Alt 0.25 //1.0 Displace //0.25 Slight Displace
  310. // PRIMARY_ALT_2
  311. #define fScalePrimary_Alt_2 1.2
  312. #define fIntensityPrimary_Alt_2 1.2
  313. #define fContrastPrimary_Alt_2 1.05
  314. #define fHPosPrimary_Alt_2 0.0
  315. #define fVPosPrimary_Alt_2 0.0
  316. //===========================================
  317. // SUNGLARE
  318. #define fScaleSunglare 1.0
  319. #define fIntensitySunglare 0.865
  320. #define fContrastSunglare 1.025 //1.1
  321. #define fHPosSunglare 0.0
  322. #define fVPosSunglare 0.0
  323. //===========================================
  324. // SECONDARY
  325. #define fScaleSecondary 0.235 //0.215
  326. #define fIntensitySecondary 0.725
  327. #define fContrastSecondary 1.1
  328. #define fHPosSecondary 9.0
  329. #define fVPosSecondary -10.0
  330. // SECONDARY_2
  331. #define fScaleSecondary_2 0.215
  332. #define fIntensitySecondary_2 0.745
  333. #define fContrastSecondary_2 1.1
  334. #define fHPosSecondary_2 -9.0
  335. #define fVPosSecondary_2 10.0
  336. //===========================================
  337. // THIRDARY
  338. #define fScaleThirdary 0.245
  339. #define fIntensityThirdary 1.05
  340. #define fContrastThirdary 1.2
  341. #define fHPosThirdary -50.0
  342. #define fVPosThirdary 50.0
  343. // THIRDARY_2
  344. #define fScaleThirdary_2 0.245
  345. #define fIntensityThirdary_2 1.135
  346. #define fContrastThirdary_2 1.2
  347. #define fHPosThirdary_2 50.0
  348. #define fVPosThirdary_2 50.0
  349. //===========================================
  350. // FOURTH
  351. #define fScaleFourth 0.625
  352. #define fIntensityFourth 0.875
  353. #define fContrastFourth 1.0
  354. #define fHPosFourth 2.65
  355. #define fVPosFourth 2.35
  356. // FOURTH_2
  357. #define fScaleFourth_2 1.015
  358. #define fIntensityFourth_2 1.025
  359. #define fContrastFourth_2 1.0
  360. #define fHPosFourth_2 -2.0
  361. #define fVPosFourth_2 -0.5
  362. //====================================================================================================
  363. // Internal Individual Parameters for SECONDARY
  364. // Offset, Scale, Scale Factor, Color RGB, Color Multiplier
  365. // RGB balance will also act as a separate intensity control for each Lens
  366. // 1.0, 1.0, 1.0 is full intensity / opacity
  367. // If color components are below 1.0, Lens is losing opacity
  368. // Counterbalance it by increasing f#_ColorMultiplier over 1.0
  369. //====================================================================================================
  370. //Lens #1
  371. #define f1_LensOffset -0.8 //Sun to Eye
  372. #define f1_LensScale 0.083 //Size
  373. #define f1_LensFactor 1.0 //Multiplier for Size
  374. #define f1_LensColor float3(0.85, 0.85, 0.50) //Color in RGB
  375. #define f1_ColorMultiplier 1.0 //Color Multiplier
  376. //Lens #2
  377. #define f2_LensOffset -0.47
  378. #define f2_LensScale 0.166
  379. #define f2_LensFactor 1.0
  380. #define f2_LensColor float3(1.00, 0.95, 0.35)
  381. #define f2_ColorMultiplier 1.0
  382. //Lens #3
  383. #define f3_LensOffset -0.14
  384. #define f3_LensScale 0.212
  385. #define f3_LensFactor 1.0
  386. #define f3_LensColor float3(1.0, 1.0, 1.0)
  387. #define f3_ColorMultiplier 1.0
  388. //Lens #4
  389. #define f4_LensOffset 0.14
  390. #define f4_LensScale 0.249
  391. #define f4_LensFactor 0.75
  392. #define f4_LensColor float3(0.25, 1.0, 0.75)
  393. #define f4_ColorMultiplier 1.2
  394. //Lens #5
  395. #define f5_LensOffset 0.47
  396. #define f5_LensScale 0.332
  397. #define f5_LensFactor 1.0
  398. #define f5_LensColor float3(1.0, 0.75, 0.25)
  399. #define f5_ColorMultiplier 1.7
  400. //Lens #6
  401. #define f6_LensOffset 0.8
  402. #define f6_LensScale 0.415
  403. #define f6_LensFactor 0.75
  404. #define f6_LensColor float3(0.90, 0.30, 0.75)
  405. #define f6_ColorMultiplier 1.0
  406. //Lens #7
  407. #define f7_LensOffset 1.13
  408. #define f7_LensScale 0.498
  409. #define f7_LensFactor 1.0
  410. #define f7_LensColor float3(1.0, 0.70, 0.30)
  411. #define f7_ColorMultiplier 1.2
  412. //Lens #8
  413. #define f8_LensOffset 1.46
  414. #define f8_LensScale 0.581
  415. #define f8_LensFactor 0.5
  416. #define f8_LensColor float3(0.25, 0.95, 0.45)
  417. #define f8_ColorMultiplier 1.5
  418. //Lens #9
  419. #define f9_LensOffset 1.79
  420. #define f9_LensScale 0.581
  421. #define f9_LensFactor 0.85
  422. #define f9_LensColor float3(1.0, 1.0, 1.0)
  423. #define f9_ColorMultiplier 1.1
  424. //Lens #10
  425. #define f10_LensOffset 2.12
  426. #define f10_LensScale 0.581
  427. #define f10_LensFactor 1.0
  428. #define f10_LensColor float3(0.85, 0.55, 0.85)
  429. #define f10_ColorMultiplier 1.0
  430. //Lens #11
  431. #define f11_LensOffset 2.43
  432. #define f11_LensScale 0.664
  433. #define f11_LensFactor 1.11
  434. #define f11_LensColor float3(0.85, 0.85, 0.32)
  435. #define f11_ColorMultiplier 1.1
  436. //Add or Remove additional Lenses controls here, as done above
  437. //====================================================================================================
  438. // Internal Individual parameters for SUNGLARE
  439. // Time-Related RGB Multipliers
  440. // f#_R is Lens red multiplier, f#_G is green, f#_B is blue
  441. //====================================================================================================
  442. #if (USE_RGB_VARIATIONS_SUNGLARE == 1)
  443. //Lens #12
  444. #define f12_LensScale 0.11
  445. #define f12_LensColor float3(1.0 + abs(frac(Timer.x * f12_R)* 2.0 - 1.0), 0.90 + abs(frac(Timer.x * f12_G)* 2.0 - 1.0), 0.30 + abs(frac(Timer.x * f12_B)* 2.0 - 1.0))
  446. #define f12_ColorMultiplier 1.1
  447. #define f12_R 2000.0
  448. #define f12_G 6000.0
  449. #define f12_B 200.0
  450. //Lens #13
  451. #define f13_LensScale 0.33
  452. #define f13_LensColor float3(0.25 + abs(frac(Timer.x * f13_R)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f13_G)* 2.0 - 1.0), 0.25 + abs(frac(Timer.x * f13_B)* 2.0 - 1.0))
  453. #define f13_ColorMultiplier 1.0
  454. #define f13_R 2000.0
  455. #define f13_G 600.0
  456. #define f13_B 200.0
  457. //Lens #14
  458. #define f14_LensScale 0.66
  459. #define f14_LensColor float3(0.85 + abs(frac(Timer.x * f14_R)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f14_G)* 2.0 - 1.0), 0.30 + abs(frac(Timer.x * f14_B)* 2.0 - 1.0))
  460. #define f14_ColorMultiplier 1.0
  461. #define f14_R 6000.0
  462. #define f14_G 7000.0
  463. #define f14_B 200.0
  464. #else
  465. //Lens #12
  466. #define f12_LensScale 0.11
  467. #define f12_LensColor float3(1.0, 0.90, 0.30)
  468. #define f12_ColorMultiplier 1.1
  469. //Lens #13
  470. #define f13_LensScale 0.33
  471. #define f13_LensColor float3(1.0, 1.0, 1.0)
  472. #define f13_ColorMultiplier 1.0
  473. //Lens #14
  474. #define f14_LensScale 0.66
  475. #define f14_LensColor float3(1.0, 1.0, 1.0)
  476. #define f14_ColorMultiplier 1.0
  477. #endif
  478. //KYO : add a/o remove passes of technique below
  479. //====================================================================================================
  480. // Internal Individual parameters for SECONDARY 2
  481. //====================================================================================================
  482. //Lens #15
  483. #define f15_LensOffset -0.8 //Sun to Eye
  484. #define f15_LensScale 0.083 //Size
  485. #define f15_LensFactor 1.0 //Multiplier for Size
  486. #define f15_LensColor float3(0.75, 0.75, 0.50) //Color in RGB
  487. #define f15_ColorMultiplier 1.0 //Color Multiplier
  488. //Lens #16
  489. #define f16_LensOffset -0.47
  490. #define f16_LensScale 0.166
  491. #define f16_LensFactor 1.0
  492. #define f16_LensColor float3(0.85, 0.65, 0.85)
  493. #define f16_ColorMultiplier 1.0
  494. //Lens #17
  495. #define f17_LensOffset -0.14
  496. #define f17_LensScale 0.212
  497. #define f17_LensFactor 1.0
  498. #define f17_LensColor float3(1.0, 1.0, 1.0)
  499. #define f17_ColorMultiplier 1.0
  500. //Lens #18
  501. #define f18_LensOffset 0.14
  502. #define f18_LensScale 0.249
  503. #define f18_LensFactor 0.75
  504. #define f18_LensColor float3(0.25, 1.0, 0.75)
  505. #define f18_ColorMultiplier 1.0
  506. //Lens #19
  507. #define f19_LensOffset 0.47
  508. #define f19_LensScale 0.332
  509. #define f19_LensFactor 1.0
  510. #define f19_LensColor float3(1.0, 0.85, 0.22)
  511. #define f19_ColorMultiplier 2.0
  512. //Lens #20
  513. #define f20_LensOffset 0.8
  514. #define f20_LensScale 0.415
  515. #define f20_LensFactor 0.75
  516. #define f20_LensColor float3(0.90, 0.30, 0.75)
  517. #define f20_ColorMultiplier 1.0
  518. //Lens #21
  519. #define f21_LensOffset 1.13
  520. #define f21_LensScale 0.498
  521. #define f21_LensFactor 1.0
  522. #define f21_LensColor float3(1.0, 1.0, 1.0)
  523. #define f21_ColorMultiplier 1.0
  524. //Lens #22
  525. #define f22_LensOffset 1.46
  526. #define f22_LensScale 0.581
  527. #define f22_LensFactor 0.5
  528. #define f22_LensColor float3(0.25, 0.95, 0.45)
  529. #define f22_ColorMultiplier 1.5
  530. //Lens #23
  531. #define f23_LensOffset 1.79
  532. #define f23_LensScale 0.581
  533. #define f23_LensFactor 0.85
  534. #define f23_LensColor float3(1.0, 1.0, 1.0)
  535. #define f23_ColorMultiplier 1.0
  536. //Lens #24
  537. #define f24_LensOffset 2.12
  538. #define f24_LensScale 0.581
  539. #define f24_LensFactor 1.0
  540. #define f24_LensColor float3(0.95, 0.55, 0.85)
  541. #define f24_ColorMultiplier 1.0
  542. //Lens #25
  543. #define f25_LensOffset 2.43
  544. #define f25_LensScale 0.664
  545. #define f25_LensFactor 1.11
  546. #define f25_LensColor float3(0.75, 0.75, 0.42)
  547. #define f25_ColorMultiplier 1.0
  548. //KYO : add a/o remove passes of technique below
  549. //====================================================================================================
  550. // Internal Individual parameters for PRIMARY
  551. // Time-Related RGB Multipliers
  552. // f#_R is Lens red multiplier, f#_G is green, f#_B is blue
  553. //====================================================================================================
  554. #if (USE_RGB_VARIATIONS_PRIMARY == 1)
  555. //Lens #26
  556. #define f26_LensOffset -0.8
  557. #define f26_LensScale 0.083
  558. #define f26_LensFactor 0.8
  559. #define f26_LensColor float3(0.95 + abs(frac(Timer.x * f26_R)* 2.0 - 1.0), 0.82 + abs(frac(Timer.x * f26_G)* 2.0 - 1.0), 0.30 + abs(frac(Timer.x * f26_B)* 2.0 - 1.0))
  560. #define f26_ColorMultiplier 1.3
  561. #define f26_R 2000.0
  562. #define f26_G 200.0
  563. #define f26_B 4000.0
  564. //Lens #27
  565. #define f27_LensOffset -0.47
  566. #define f27_LensScale 0.166
  567. #define f27_LensFactor 1.0
  568. #define f27_LensColor float3(0.85 + abs(frac(Timer.x * f27_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f27_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f27_B)* 2.0 - 1.0))
  569. #define f27_ColorMultiplier 1.0
  570. #define f27_R 2000.0
  571. #define f27_G 200.0
  572. #define f27_B 200.0
  573. //Lens #28
  574. #define f28_LensOffset -0.14
  575. #define f28_LensScale 0.212
  576. #define f28_LensFactor 1.0
  577. #define f28_LensColor float3(1.0 + abs(frac(Timer.x * f28_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f28_G)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f28_B)* 2.0 - 1.0))
  578. #define f28_ColorMultiplier 1.0
  579. #define f28_R 200.0
  580. #define f28_G 200.0
  581. #define f28_B 600.0
  582. //Lens #29
  583. #define f29_LensOffset 0.14
  584. #define f29_LensScale 0.249
  585. #define f29_LensFactor 0.75
  586. #define f29_LensColor float3(0.25 + abs(frac(Timer.x * f29_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f29_G)* 2.0 - 1.0), 0.55 + abs(frac(Timer.x * f29_B)* 2.0 - 1.0))
  587. #define f29_ColorMultiplier 1.8
  588. #define f29_R 2000.0
  589. #define f29_G 4000.0
  590. #define f29_B 6000.0
  591. //Lens #30
  592. #define f30_LensOffset 0.47
  593. #define f30_LensScale 0.332
  594. #define f30_LensFactor 1.0
  595. #define f30_LensColor float3(1.0 + abs(frac(Timer.x * f30_R)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f30_G)* 2.0 - 1.0), 0.22 + abs(frac(Timer.x * f30_B)* 2.0 - 1.0))
  596. #define f30_ColorMultiplier 1.5
  597. #define f30_R 2000.0
  598. #define f30_G 4000.0
  599. #define f30_B 200.0
  600. //Lens #31
  601. #define f31_LensOffset 0.8
  602. #define f31_LensScale 0.415
  603. #define f31_LensFactor 0.75
  604. #define f31_LensColor float3(0.60 + abs(frac(Timer.x * f31_R)* 2.0 - 1.0), 0.60 + abs(frac(Timer.x * f31_G)* 2.0 - 1.0), 0.75 + abs(frac(Timer.x * f31_B)* 2.0 - 1.0))
  605. #define f31_ColorMultiplier 1.4
  606. #define f31_R 200.0
  607. #define f31_G 1000.0
  608. #define f31_B 600.0
  609. //Lens #32
  610. #define f32_LensOffset 1.13
  611. #define f32_LensScale 0.498
  612. #define f32_LensFactor 1.0
  613. #define f32_LensColor float3(1.0 + abs(frac(Timer.x * f32_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f32_G)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f32_B)* 2.0 - 1.0))
  614. #define f32_ColorMultiplier 1.0
  615. #define f32_R 200.0
  616. #define f32_G 2000.0
  617. #define f32_B 200.0
  618. //Lens #33
  619. #define f33_LensOffset 1.46
  620. #define f33_LensScale 0.581
  621. #define f33_LensFactor 0.5
  622. #define f33_LensColor float3(0.25 + abs(frac(Timer.x * f33_R)* 2.0 - 1.0), 0.95 + abs(frac(Timer.x * f33_G)* 2.0 - 1.0), 0.35 + abs(frac(Timer.x * f33_B)* 2.0 - 1.0))
  623. #define f33_ColorMultiplier 1.6
  624. #define f33_R 4000.0
  625. #define f33_G 200.0
  626. #define f33_B 200.0
  627. //Lens #34
  628. #define f34_LensOffset 1.79
  629. #define f34_LensScale 0.581
  630. #define f34_LensFactor 0.85
  631. #define f34_LensColor float3(1.0 + abs(frac(Timer.x * f34_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f34_G)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f34_B)* 2.0 - 1.0))
  632. #define f34_ColorMultiplier 1.0
  633. #define f34_R 20.0
  634. #define f34_G 200.0
  635. #define f34_B 20.0
  636. //Lens #35
  637. #define f35_LensOffset 2.12
  638. #define f35_LensScale 0.581
  639. #define f35_LensFactor 1.0
  640. #define f35_LensColor float3(0.7 + abs(frac(Timer.x * f35_R)* 2.0 - 1.0), 0.7 + abs(frac(Timer.x * f35_G)* 2.0 - 1.0), 0.7 + abs(frac(Timer.x * f35_B)* 2.0 - 1.0))
  641. #define f35_ColorMultiplier 1.0
  642. #define f35_R 200.0
  643. #define f35_G 200.0
  644. #define f35_B 200.0
  645. //Lens #36
  646. #define f36_LensOffset 2.43
  647. #define f36_LensScale 0.664
  648. #define f36_LensFactor 1.11
  649. #define f36_LensColor float3(0.95 + abs(frac(Timer.x * f36_R)* 2.0 - 1.0), 0.95 + abs(frac(Timer.x * f36_G)* 2.0 - 1.0), 0.62 + abs(frac(Timer.x * f36_B)* 2.0 - 1.0))
  650. #define f36_ColorMultiplier 1.0
  651. #define f36_R 200.0
  652. #define f36_G 1000.0
  653. #define f36_B 20.0
  654. #else
  655. //Lens #26
  656. #define f26_LensOffset -0.8 //Sun to Eye
  657. #define f26_LensScale 0.083 //Size
  658. #define f26_LensFactor 0.8 //Multiplier for Size
  659. #define f26_LensColor float3(0.95, 0.82, 0.30) //Color in RGB
  660. #define f26_ColorMultiplier 1.5 //Color Multiplier
  661. //Lens #27
  662. #define f27_LensOffset -0.47
  663. #define f27_LensScale 0.166
  664. #define f27_LensFactor 1.0
  665. #define f27_LensColor float3(0.85, 0.65, 0.85)
  666. #define f27_ColorMultiplier 1.0
  667. //Lens #28
  668. #define f28_LensOffset -0.14
  669. #define f28_LensScale 0.212
  670. #define f28_LensFactor 1.0
  671. #define f28_LensColor float3(1.0, 1.0, 1.0)
  672. #define f28_ColorMultiplier 1.0
  673. //Lens #29
  674. #define f29_LensOffset 0.14
  675. #define f29_LensScale 0.249
  676. #define f29_LensFactor 0.75
  677. #define f29_LensColor float3(0.25, 1.0, 0.55)
  678. #define f29_ColorMultiplier 2.0
  679. //Lens #30
  680. #define f30_LensOffset 0.47
  681. #define f30_LensScale 0.332
  682. #define f30_LensFactor 1.0
  683. #define f30_LensColor float3(1.0, 0.85, 0.22)
  684. #define f30_ColorMultiplier 2.5
  685. //Lens #31
  686. #define f31_LensOffset 0.8
  687. #define f31_LensScale 0.415
  688. #define f31_LensFactor 0.75
  689. #define f31_LensColor float3(0.60, 0.60, 0.75)
  690. #define f31_ColorMultiplier 2.0
  691. //Lens #32
  692. #define f32_LensOffset 1.13
  693. #define f32_LensScale 0.498
  694. #define f32_LensFactor 1.0
  695. #define f32_LensColor float3(1.0, 1.0, 1.0)
  696. #define f32_ColorMultiplier 1.0
  697. //Lens #33
  698. #define f33_LensOffset 1.46
  699. #define f33_LensScale 0.581
  700. #define f33_LensFactor 0.5
  701. #define f33_LensColor float3(0.25, 0.95, 0.35)
  702. #define f33_ColorMultiplier 2.3
  703. //Lens #34
  704. #define f34_LensOffset 1.79
  705. #define f34_LensScale 0.581
  706. #define f34_LensFactor 0.85
  707. #define f34_LensColor float3(1.0, 1.0, 1.0)
  708. #define f34_ColorMultiplier 1.0
  709. //Lens #35
  710. #define f35_LensOffset 2.12
  711. #define f35_LensScale 0.581
  712. #define f35_LensFactor 1.0
  713. #define f35_LensColor float3(1.0, 1.0, 1.0)
  714. #define f35_ColorMultiplier 1.0
  715. //Lens #36
  716. #define f36_LensOffset 2.43
  717. #define f36_LensScale 0.664
  718. #define f36_LensFactor 1.11
  719. #define f36_LensColor float3(0.95, 0.95, 0.62)
  720. #define f36_ColorMultiplier 1.2
  721. #endif
  722. //KYO : add a/o remove passes of technique below
  723. //====================================================================================================
  724. // Internal Individual parameters for THIRDARY
  725. //====================================================================================================
  726. //Lens #37
  727. #define f37_LensOffset -0.8 //Sun to Eye
  728. #define f37_LensScale 0.083 //Size
  729. #define f37_LensFactor 1.0 //Multiplier for Size
  730. #define f37_LensColor float3(0.75, 0.75, 0.30) //Color in RGB
  731. #define f37_ColorMultiplier 1.0 //Color Multiplier
  732. //Lens #38
  733. #define f38_LensOffset -0.47
  734. #define f38_LensScale 0.166
  735. #define f38_LensFactor 1.0
  736. #define f38_LensColor float3(0.85, 0.65, 0.85)
  737. #define f38_ColorMultiplier 1.0
  738. //Lens #39
  739. #define f39_LensOffset -0.14
  740. #define f39_LensScale 0.212
  741. #define f39_LensFactor 1.0
  742. #define f39_LensColor float3(1.0, 1.0, 1.0)
  743. #define f39_ColorMultiplier 1.0
  744. //Lens #40
  745. #define f40_LensOffset 0.14
  746. #define f40_LensScale 0.249
  747. #define f40_LensFactor 0.75
  748. #define f40_LensColor float3(0.25, 1.0, 0.75)
  749. #define f40_ColorMultiplier 1.0
  750. //Lens #41
  751. #define f41_LensOffset 0.47
  752. #define f41_LensScale 0.332
  753. #define f41_LensFactor 1.0
  754. #define f41_LensColor float3(0.0, 0.0, 0.75)
  755. #define f41_ColorMultiplier 1.0
  756. //Lens #42
  757. #define f42_LensOffset 0.8
  758. #define f42_LensScale 0.415
  759. #define f42_LensFactor 0.75
  760. #define f42_LensColor float3(0.60, 0.60, 0.75)
  761. #define f42_ColorMultiplier 1.0
  762. //Lens #43
  763. #define f43_LensOffset 1.13
  764. #define f43_LensScale 0.498
  765. #define f43_LensFactor 1.0
  766. #define f43_LensColor float3(1.0, 1.0, 1.0)
  767. #define f43_ColorMultiplier 1.0
  768. //Lens #44
  769. #define f44_LensOffset 1.46
  770. #define f44_LensScale 0.581
  771. #define f44_LensFactor 0.5
  772. #define f44_LensColor float3(0.25, 0.95, 0.35)
  773. #define f44_ColorMultiplier 1.0
  774. //Lens #45
  775. #define f45_LensOffset 1.79
  776. #define f45_LensScale 0.581
  777. #define f45_LensFactor 0.85
  778. #define f45_LensColor float3(1.0, 1.0, 1.0)
  779. #define f45_ColorMultiplier 1.0
  780. //Lens #46
  781. #define f46_LensOffset 2.12
  782. #define f46_LensScale 0.581
  783. #define f46_LensFactor 1.0
  784. #define f46_LensColor float3(1.0, 1.0, 1.0)
  785. #define f46_ColorMultiplier 1.0
  786. //Lens #47
  787. #define f47_LensOffset 2.43
  788. #define f47_LensScale 0.664
  789. #define f47_LensFactor 1.11
  790. #define f47_LensColor float3(0.95, 0.95, 0.62)
  791. #define f47_ColorMultiplier 1.0
  792. //KYO : add a/o remove passes of technique below
  793. //====================================================================================================
  794. // Internal Individual parameters for THIRDARY 2
  795. //====================================================================================================
  796. //Lens #48
  797. #define f48_LensOffset -0.8 //Sun to Eye
  798. #define f48_LensScale 0.083 //Size
  799. #define f48_LensFactor 1.0 //Multiplier for Size
  800. #define f48_LensColor float3(0.75, 0.75, 0.50) //Color in RGB
  801. #define f48_ColorMultiplier 1.0 //Color Multiplier
  802. //Lens #49
  803. #define f49_LensOffset -0.47
  804. #define f49_LensScale 0.166
  805. #define f49_LensFactor 1.0
  806. #define f49_LensColor float3(0.85, 0.65, 0.85)
  807. #define f49_ColorMultiplier 1.0
  808. //Lens #50
  809. #define f50_LensOffset -0.14
  810. #define f50_LensScale 0.212
  811. #define f50_LensFactor 1.0
  812. #define f50_LensColor float3(1.0, 1.0, 1.0)
  813. #define f50_ColorMultiplier 1.0
  814. //Lens #51
  815. #define f51_LensOffset 0.14
  816. #define f51_LensScale 0.249
  817. #define f51_LensFactor 0.75
  818. #define f51_LensColor float3(0.25, 1.0, 0.75)
  819. #define f51_ColorMultiplier 1.0
  820. //Lens #52
  821. #define f52_LensOffset 0.47
  822. #define f52_LensScale 0.332
  823. #define f52_LensFactor 1.0
  824. #define f52_LensColor float3(0.0, 0.0, 0.75)
  825. #define f52_ColorMultiplier 1.0
  826. //Lens #53
  827. #define f53_LensOffset 0.8
  828. #define f53_LensScale 0.415
  829. #define f53_LensFactor 0.75
  830. #define f53_LensColor float3(0.60, 0.60, 0.75)
  831. #define f53_ColorMultiplier 1.0
  832. //Lens #54
  833. #define f54_LensOffset 1.13
  834. #define f54_LensScale 0.498
  835. #define f54_LensFactor 1.0
  836. #define f54_LensColor float3(1.0, 1.0, 1.0)
  837. #define f54_ColorMultiplier 1.0
  838. //Lens #55
  839. #define f55_LensOffset 1.46
  840. #define f55_LensScale 0.581
  841. #define f55_LensFactor 0.5
  842. #define f55_LensColor float3(0.25, 0.95, 0.35)
  843. #define f55_ColorMultiplier 1.0
  844. //Lens #56
  845. #define f56_LensOffset 1.79
  846. #define f56_LensScale 0.581
  847. #define f56_LensFactor 0.85
  848. #define f56_LensColor float3(1.0, 1.0, 1.0)
  849. #define f56_ColorMultiplier 1.0
  850. //Lens #57
  851. #define f57_LensOffset 2.12
  852. #define f57_LensScale 0.581
  853. #define f57_LensFactor 1.0
  854. #define f57_LensColor float3(1.0, 1.0, 1.0)
  855. #define f57_ColorMultiplier 1.0
  856. //Lens #58
  857. #define f58_LensOffset 2.43
  858. #define f58_LensScale 0.664
  859. #define f58_LensFactor 1.11
  860. #define f58_LensColor float3(0.95, 0.95, 0.62)
  861. #define f58_ColorMultiplier 1.0
  862. //KYO : add a/o remove passes of technique below
  863. //====================================================================================================
  864. // Internal Individual parameters for PRIMARY_ALT
  865. // Time-Related Colour Multipliers
  866. // f#_R is Lens red multiplier, f#_G is green, f#_B is blue
  867. //====================================================================================================
  868. #if (USE_RGB_VARIATIONS_PRIMARY_ALT == 1)
  869. //Lens #59
  870. #define f59_LensOffset -0.8
  871. #define f59_LensScale 0.083
  872. #define f59_LensFactor 1.0
  873. #define f59_LensColor float3(0.95 + abs(frac(Timer.x * f59_R)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f59_G)* 2.0 - 1.0), 0.30 + abs(frac(Timer.x * f59_B)* 2.0 - 1.0))
  874. #define f59_ColorMultiplier 1.6
  875. #define f59_R 200.0
  876. #define f59_G 200.0
  877. #define f59_B 1000.0
  878. //Lens #60
  879. #define f60_LensOffset -0.6
  880. #define f60_LensScale 0.103
  881. #define f60_LensFactor 1.0
  882. #define f60_LensColor float3(0.85 + abs(frac(Timer.x * f60_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f60_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f60_B)* 2.0 - 1.0))
  883. #define f60_ColorMultiplier 1.0
  884. #define f60_R 2000.0
  885. #define f60_G 4000.0
  886. #define f60_B 200.0
  887. //Lens #61
  888. #define f61_LensOffset -0.4
  889. #define f61_LensScale 0.123
  890. #define f61_LensFactor 1.0
  891. #define f61_LensColor float3(0.85 + abs(frac(Timer.x * f61_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f61_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f61_B)* 2.0 - 1.0))
  892. #define f61_ColorMultiplier 1.0
  893. #define f61_R 2000.0
  894. #define f61_G 200.0
  895. #define f61_B 6000.0
  896. //Lens #62
  897. #define f62_LensOffset -0.2
  898. #define f62_LensScale 0.143
  899. #define f62_LensFactor 1.0
  900. #define f62_LensColor float3(1.0 + abs(frac(Timer.x * f62_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f62_G)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f62_B)* 2.0 - 1.0))
  901. #define f62_ColorMultiplier 1.0
  902. #define f62_R 2000.0
  903. #define f62_G 5000.0
  904. #define f62_B 200.0
  905. //Lens #63
  906. #define f63_LensOffset 0.0
  907. #define f63_LensScale 0.143
  908. #define f63_LensFactor 1.0
  909. #define f63_LensColor float3(0.85 + abs(frac(Timer.x * f63_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f63_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f63_B)* 2.0 - 1.0))
  910. #define f63_ColorMultiplier 1.0
  911. #define f63_R 2000.0
  912. #define f63_G 600.0
  913. #define f63_B 2000.0
  914. //Lens #64
  915. #define f64_LensOffset 0.2
  916. #define f64_LensScale 0.163
  917. #define f64_LensFactor 1.0
  918. #define f64_LensColor float3(0.2 + abs(frac(Timer.x * f64_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f64_G)* 2.0 - 1.0), 0.55 + abs(frac(Timer.x * f64_B)* 2.0 - 1.0))
  919. #define f64_ColorMultiplier 2.0
  920. #define f64_R 2000.0
  921. #define f64_G 600.0
  922. #define f64_B 2000.0
  923. //Lens #65
  924. #define f65_LensOffset 0.4
  925. #define f65_LensScale 0.183
  926. #define f65_LensFactor 1.0
  927. #define f65_LensColor float3(1.0 + abs(frac(Timer.x * f65_R)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f65_G)* 2.0 - 1.0), 0.22 + abs(frac(Timer.x * f65_B)* 2.0 - 1.0))
  928. #define f65_ColorMultiplier 2.5
  929. #define f65_R 200.0
  930. #define f65_G 6000.0
  931. #define f65_B 2000.0
  932. //Lens #66
  933. #define f66_LensOffset 0.6
  934. #define f66_LensScale 0.203
  935. #define f66_LensFactor 1.0
  936. #define f66_LensColor float3(0.85 + abs(frac(Timer.x * f66_R)* 2.0 - 1.0), 0.60 + abs(frac(Timer.x * f66_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f66_B)* 2.0 - 1.0))
  937. #define f66_ColorMultiplier 1.0
  938. #define f66_R 2000.0
  939. #define f66_G 1000.0
  940. #define f66_B 600.0
  941. //Lens #67
  942. #define f67_LensOffset 0.8
  943. #define f67_LensScale 0.223
  944. #define f67_LensFactor 1.0
  945. #define f67_LensColor float3(0.60 + abs(frac(Timer.x * f67_R)* 2.0 - 1.0), 0.60 + abs(frac(Timer.x * f67_G)* 2.0 - 1.0), 0.75 + abs(frac(Timer.x * f67_B)* 2.0 - 1.0))
  946. #define f67_ColorMultiplier 2.0
  947. #define f67_R 200.0
  948. #define f67_G 6000.0
  949. #define f67_B 200.0
  950. //Lens #68
  951. #define f68_LensOffset 1.0
  952. #define f68_LensScale 0.323
  953. #define f68_LensFactor 1.0
  954. #define f68_LensColor float3(1.0 + abs(frac(Timer.x * f68_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f68_G)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f68_B)* 2.0 - 1.0))
  955. #define f68_ColorMultiplier 1.0
  956. #define f68_R 2000.0
  957. #define f68_G 6000.0
  958. #define f68_B 200.0
  959. //Lens #69
  960. #define f69_LensOffset 1.2
  961. #define f69_LensScale 0.263
  962. #define f69_LensFactor 1.0
  963. #define f69_LensColor float3(0.25 + abs(frac(Timer.x * f69_R)* 2.0 - 1.0), 0.95 + abs(frac(Timer.x * f69_G)* 2.0 - 1.0), 0.35 + abs(frac(Timer.x * f69_B)* 2.0 - 1.0))
  964. #define f69_ColorMultiplier 2.3
  965. #define f69_R 2000.0
  966. #define f69_G 6000.0
  967. #define f69_B 2000.0
  968. //Lens #70
  969. #define f70_LensOffset 1.4
  970. #define f70_LensScale 0.333
  971. #define f70_LensFactor 1.0
  972. #define f70_LensColor float3(0.85 + abs(frac(Timer.x * f70_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f70_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f70_B)* 2.0 - 1.0))
  973. #define f70_ColorMultiplier 1.0
  974. #define f70_R 200.0
  975. #define f70_G 600.0
  976. #define f70_B 2000.0
  977. //Lens #71
  978. #define f71_LensOffset 1.6
  979. #define f71_LensScale 0.303
  980. #define f71_LensFactor 1.0
  981. #define f71_LensColor float3(0.85 + abs(frac(Timer.x * f71_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f71_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f71_B)* 2.0 - 1.0))
  982. #define f71_ColorMultiplier 1.0
  983. #define f71_R 300.0
  984. #define f71_G 600.0
  985. #define f71_B 200.0
  986. //Lens #72
  987. #define f72_LensOffset 1.8
  988. #define f72_LensScale 0.363
  989. #define f72_LensFactor 1.0
  990. #define f72_LensColor float3(1.0 + abs(frac(Timer.x * f72_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f72_G)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f72_B)* 2.0 - 1.0))
  991. #define f72_ColorMultiplier 1.0
  992. #define f72_R 300.0
  993. #define f72_G 6000.0
  994. #define f72_B 2000.0
  995. //Lens #73
  996. #define f73_LensOffset 2.0
  997. #define f73_LensScale 0.343
  998. #define f73_LensFactor 1.0
  999. #define f73_LensColor float3(0.85 + abs(frac(Timer.x * f73_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f73_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f73_B)* 2.0 - 1.0))
  1000. #define f73_ColorMultiplier 1.0
  1001. #define f73_R 3000.0
  1002. #define f73_G 100.0
  1003. #define f73_B 2000.0
  1004. //Lens #74
  1005. #define f74_LensOffset 2.2
  1006. #define f74_LensScale 0.363
  1007. #define f74_LensFactor 1.0
  1008. #define f74_LensColor float3(1.0 + abs(frac(Timer.x * f74_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f74_G)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f74_B)* 2.0 - 1.0))
  1009. #define f74_ColorMultiplier 1.0
  1010. #define f74_R 20.0
  1011. #define f74_G 600.0
  1012. #define f74_B 2000.0
  1013. //Lens #75
  1014. #define f75_LensOffset 2.4
  1015. #define f75_LensScale 0.383
  1016. #define f75_LensFactor 1.0
  1017. #define f75_LensColor float3(0.95 + abs(frac(Timer.x * f75_R)* 2.0 - 1.0), 0.95 + abs(frac(Timer.x * f75_G)* 2.0 - 1.0), 0.62 + abs(frac(Timer.x * f75_B)* 2.0 - 1.0))
  1018. #define f75_ColorMultiplier 1.2
  1019. #define f75_R 2000.0
  1020. #define f75_G 6000.0
  1021. #define f75_B 2000.0
  1022. //Lens #76
  1023. #define f76_LensOffset 2.6
  1024. #define f76_LensScale 0.403
  1025. #define f76_LensFactor 1.0
  1026. #define f76_LensColor float3(0.85 + abs(frac(Timer.x * f76_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f76_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f76_B)* 2.0 - 1.0))
  1027. #define f76_ColorMultiplier 1.0
  1028. #define f76_R 3000.0
  1029. #define f76_G 5000.0
  1030. #define f76_B 200.0
  1031. #else
  1032. //Lens #59
  1033. #define f59_LensOffset -0.8 //Sun to Eye
  1034. #define f59_LensScale 0.083 //Size
  1035. #define f59_LensFactor 1.0 //Multiplier for Size
  1036. #define f59_LensColor float3(0.95, 0.85, 0.30) //Color in RGB
  1037. #define f59_ColorMultiplier 1.6 //Color Multiplier
  1038. //Lens #60
  1039. #define f60_LensOffset -0.6
  1040. #define f60_LensScale 0.103
  1041. #define f60_LensFactor 1.0
  1042. #define f60_LensColor float3(0.85, 0.65, 0.85)
  1043. #define f60_ColorMultiplier 1.0
  1044. //Lens #61
  1045. #define f61_LensOffset -0.4
  1046. #define f61_LensScale 0.123
  1047. #define f61_LensFactor 1.0
  1048. #define f61_LensColor float3(0.85, 0.65, 0.85)
  1049. #define f61_ColorMultiplier 1.0
  1050. //Lens #62
  1051. #define f62_LensOffset -0.2
  1052. #define f62_LensScale 0.143
  1053. #define f62_LensFactor 1.0
  1054. #define f62_LensColor float3(1.0, 1.0, 1.0)
  1055. #define f62_ColorMultiplier 1.0
  1056. //Lens #63
  1057. #define f63_LensOffset 0.0
  1058. #define f63_LensScale 0.143
  1059. #define f63_LensFactor 1.0
  1060. #define f63_LensColor float3(0.85, 0.65, 0.85)
  1061. #define f63_ColorMultiplier 1.0
  1062. //Lens #64
  1063. #define f64_LensOffset 0.2
  1064. #define f64_LensScale 0.163
  1065. #define f64_LensFactor 1.0
  1066. #define f64_LensColor float3(0.25, 1.0, 0.55)
  1067. #define f64_ColorMultiplier 2.0
  1068. //Lens #65
  1069. #define f65_LensOffset 0.4
  1070. #define f65_LensScale 0.183
  1071. #define f65_LensFactor 1.0
  1072. #define f65_LensColor float3(1.0, 0.85, 0.22)
  1073. #define f65_ColorMultiplier 2.5
  1074. //Lens #66
  1075. #define f66_LensOffset 0.6
  1076. #define f66_LensScale 0.203
  1077. #define f66_LensFactor 1.0
  1078. #define f66_LensColor float3(0.85, 0.65, 0.85)
  1079. #define f66_ColorMultiplier 1.0
  1080. //Lens #67
  1081. #define f67_LensOffset 0.8
  1082. #define f67_LensScale 0.223
  1083. #define f67_LensFactor 1.0
  1084. #define f67_LensColor float3(0.60, 0.60, 0.75)
  1085. #define f67_ColorMultiplier 2.0
  1086. //Lens #68
  1087. #define f68_LensOffset 1.0
  1088. #define f68_LensScale 0.243
  1089. #define f68_LensFactor 1.0
  1090. #define f68_LensColor float3(1.0, 1.0, 1.0)
  1091. #define f68_ColorMultiplier 1.0
  1092. //Lens #69
  1093. #define f69_LensOffset 1.2
  1094. #define f69_LensScale 0.263
  1095. #define f69_LensFactor 1.0
  1096. #define f69_LensColor float3(0.25, 0.95, 0.35)
  1097. #define f69_ColorMultiplier 2.3
  1098. //Lens #70
  1099. #define f70_LensOffset 1.4
  1100. #define f70_LensScale 0.283
  1101. #define f70_LensFactor 1.0
  1102. #define f70_LensColor float3(0.85, 0.65, 0.85)
  1103. #define f70_ColorMultiplier 1.0
  1104. //Lens #71
  1105. #define f71_LensOffset 1.6
  1106. #define f71_LensScale 0.303
  1107. #define f71_LensFactor 1.0
  1108. #define f71_LensColor float3(0.85, 0.65, 0.85)
  1109. #define f71_ColorMultiplier 1.0
  1110. //Lens #72
  1111. #define f72_LensOffset 1.8
  1112. #define f72_LensScale 0.323
  1113. #define f72_LensFactor 1.0
  1114. #define f72_LensColor float3(1.0, 1.0, 1.0)
  1115. #define f72_ColorMultiplier 1.0
  1116. //Lens #73
  1117. #define f73_LensOffset 2.0
  1118. #define f73_LensScale 0.343
  1119. #define f73_LensFactor 1.0
  1120. #define f73_LensColor float3(0.85, 0.65, 0.85)
  1121. #define f73_ColorMultiplier 1.0
  1122. //Lens #74
  1123. #define f74_LensOffset 2.2
  1124. #define f74_LensScale 0.363
  1125. #define f74_LensFactor 1.0
  1126. #define f74_LensColor float3(1.0, 1.0, 1.0)
  1127. #define f74_ColorMultiplier 1.0
  1128. //Lens #75
  1129. #define f75_LensOffset 2.4
  1130. #define f75_LensScale 0.383
  1131. #define f75_LensFactor 1.0
  1132. #define f75_LensColor float3(0.95, 0.95, 0.62)
  1133. #define f75_ColorMultiplier 1.2
  1134. //Lens #76
  1135. #define f76_LensOffset 2.6
  1136. #define f76_LensScale 0.403
  1137. #define f76_LensFactor 1.0
  1138. #define f76_LensColor float3(0.85, 0.65, 0.85)
  1139. #define f76_ColorMultiplier 1.0
  1140. #endif
  1141. //KYO : add a/o remove passes of technique below
  1142. //====================================================================================================
  1143. // Internal Individual parameters for PRIMARY_ALT_2
  1144. // Time-Related Colour Multipliers
  1145. // f#_R is Lens red multiplier, f#_G is green, f#_B is blue
  1146. //====================================================================================================
  1147. #if (USE_RGB_VARIATIONS_PRIMARY_ALT_2 == 1)
  1148. //Lens #77
  1149. #define f77_LensOffset -0.5
  1150. #define f77_LensScale 0.1
  1151. #define f77_LensFactor 1.0
  1152. #define f77_LensColor float3(0.95 + abs(frac(Timer.x * f77_R)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f77_G)* 2.0 - 1.0), 0.30 + abs(frac(Timer.x * f77_B)* 2.0 - 1.0))
  1153. #define f77_ColorMultiplier 1.6
  1154. #define f77_R 200.0
  1155. #define f77_G 200.0
  1156. #define f77_B 1000.0
  1157. //Lens #78
  1158. #define f78_LensOffset 0.5
  1159. #define f78_LensScale 0.333
  1160. #define f78_LensFactor 1.0
  1161. #define f78_LensColor float3(0.85 + abs(frac(Timer.x * f78_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f78_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f78_B)* 2.0 - 1.0))
  1162. #define f78_ColorMultiplier 1.0
  1163. #define f78_R 2000.0
  1164. #define f78_G 4000.0
  1165. #define f78_B 200.0
  1166. //Lens #79
  1167. #define f79_LensOffset 1.0
  1168. #define f79_LensScale 0.665
  1169. #define f79_LensFactor 1.0
  1170. #define f79_LensColor float3(0.85 + abs(frac(Timer.x * f79_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f79_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f79_B)* 2.0 - 1.0))
  1171. #define f79_ColorMultiplier 1.0
  1172. #define f79_R 2000.0
  1173. #define f79_G 200.0
  1174. #define f79_B 6000.0
  1175. //Lens #80
  1176. #define f80_LensOffset 1.8
  1177. #define f80_LensScale 0.885
  1178. #define f80_LensFactor 1.0
  1179. #define f80_LensColor float3(1.0 + abs(frac(Timer.x * f80_R)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f80_G)* 2.0 - 1.0), 1.0 + abs(frac(Timer.x * f80_B)* 2.0 - 1.0))
  1180. #define f80_ColorMultiplier 1.0
  1181. #define f80_R 2000.0
  1182. #define f80_G 5000.0
  1183. #define f80_B 200.0
  1184. #else
  1185. //Lens #77
  1186. #define f77_LensOffset -0.5
  1187. #define f77_LensScale 0.1
  1188. #define f77_LensFactor 1.0
  1189. #define f77_LensColor float3(0.95, 0.65, 0.30)
  1190. #define f77_ColorMultiplier 1.6
  1191. //Lens #78
  1192. #define f78_LensOffset 0.5
  1193. #define f78_LensScale 0.333
  1194. #define f78_LensFactor 1.0
  1195. #define f78_LensColor float3(0.85, 0.65, 0.85)
  1196. #define f78_ColorMultiplier 1.0
  1197. //Lens #79
  1198. #define f79_LensOffset 1.0
  1199. #define f79_LensScale 0.665
  1200. #define f79_LensFactor 1.0
  1201. #define f79_LensColor float3(0.85, 0.65, 0.85)
  1202. #define f79_ColorMultiplier 1.0
  1203. //Lens #80
  1204. #define f80_LensOffset 1.8
  1205. #define f80_LensScale 0.885
  1206. #define f80_LensFactor 1.0
  1207. #define f80_LensColor float3(1.0, 1.0, 1.0)
  1208. #define f80_ColorMultiplier 1.0
  1209. #endif
  1210. //KYO : add a/o remove passes of technique below
  1211. //====================================================================================================
  1212. // Internal Individual parameters for FOURTH
  1213. // Time-Related Colour Multipliers
  1214. // f#_R is Lens red multiplier, f#_G is green, f#_B is blue
  1215. //====================================================================================================
  1216. #if (USE_RGB_VARIATIONS_FOURTH == 1)
  1217. //Lens #81
  1218. #define f81_LensOffset -0.5
  1219. #define f81_LensScale 0.1
  1220. #define f81_LensFactor 1.0
  1221. #define f81_LensColor float3(0.95 + abs(frac(Timer.x * f81_R)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f81_G)* 2.0 - 1.0), 0.30 + abs(frac(Timer.x * f81_B)* 2.0 - 1.0))
  1222. #define f81_ColorMultiplier 1.6
  1223. #define f81_R 200.0
  1224. #define f81_G 200.0
  1225. #define f81_B 1000.0
  1226. //Lens #82
  1227. #define f82_LensOffset 0.5
  1228. #define f82_LensScale 0.455
  1229. #define f82_LensFactor 1.0
  1230. #define f82_LensColor float3(0.85 + abs(frac(Timer.x * f82_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f82_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f82_B)* 2.0 - 1.0))
  1231. #define f82_ColorMultiplier 1.0
  1232. #define f82_R 2000.0
  1233. #define f82_G 4000.0
  1234. #define f82_B 200.0
  1235. //Lens #83
  1236. #define f83_LensOffset 1.0
  1237. #define f83_LensScale 0.665
  1238. #define f83_LensFactor 1.5
  1239. #define f83_LensColor float3(0.85 + abs(frac(Timer.x * f83_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f83_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f83_B)* 2.0 - 1.0))
  1240. #define f83_ColorMultiplier 1.3
  1241. #define f83_R 2000.0
  1242. #define f83_G 200.0
  1243. #define f83_B 6000.0
  1244. #else
  1245. //Lens #81
  1246. #define f81_LensOffset -0.5
  1247. #define f81_LensScale 0.1
  1248. #define f81_LensFactor 1.0
  1249. #define f81_LensColor float3(0.95, 0.65, 0.30)
  1250. #define f81_ColorMultiplier 1.6
  1251. //Lens #82
  1252. #define f82_LensOffset 0.5
  1253. #define f82_LensScale 0.455
  1254. #define f82_LensFactor 1.0
  1255. #define f82_LensColor float3(0.85, 0.65, 0.85)
  1256. #define f82_ColorMultiplier 1.0
  1257. //Lens #83
  1258. #define f83_LensOffset 1.5
  1259. #define f83_LensScale 0.665
  1260. #define f83_LensFactor 1.3
  1261. #define f83_LensColor float3(0.85, 0.65, 0.85)
  1262. #define f83_ColorMultiplier 1.0
  1263. #endif
  1264. //KYO : add a/o remove passes of technique below
  1265. //====================================================================================================
  1266. // Internal Individual parameters for FOURTH_2
  1267. // Time-Related Colour Multipliers
  1268. // f#_R is Lens red multiplier, f#_G is green, f#_B is blue
  1269. //====================================================================================================
  1270. #if (USE_RGB_VARIATIONS_FOURTH_2 == 1)
  1271. //Lens #84
  1272. #define f84_LensOffset -0.5
  1273. #define f84_LensScale 0.2
  1274. #define f84_LensFactor 0.85
  1275. #define f84_LensColor float3(0.95 + abs(frac(Timer.x * f84_R)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f84_G)* 2.0 - 1.0), 0.30 + abs(frac(Timer.x * f84_B)* 2.0 - 1.0))
  1276. #define f84_ColorMultiplier 1.2
  1277. #define f84_R 200.0
  1278. #define f84_G 200.0
  1279. #define f84_B 1000.0
  1280. //Lens #85
  1281. #define f85_LensOffset 0.5
  1282. #define f85_LensScale 0.333
  1283. #define f85_LensFactor 1.0
  1284. #define f85_LensColor float3(0.85 + abs(frac(Timer.x * f85_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f85_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f85_B)* 2.0 - 1.0))
  1285. #define f85_ColorMultiplier 1.0
  1286. #define f85_R 2000.0
  1287. #define f85_G 4000.0
  1288. #define f85_B 200.0
  1289. //Lens #86
  1290. #define f86_LensOffset 1.5
  1291. #define f86_LensScale 0.665
  1292. #define f86_LensFactor 1.5
  1293. #define f86_LensColor float3(0.85 + abs(frac(Timer.x * f86_R)* 2.0 - 1.0), 0.65 + abs(frac(Timer.x * f86_G)* 2.0 - 1.0), 0.85 + abs(frac(Timer.x * f86_B)* 2.0 - 1.0))
  1294. #define f86_ColorMultiplier 1.0
  1295. #define f86_R 2000.0
  1296. #define f86_G 200.0
  1297. #define f86_B 6000.0
  1298. #else
  1299. //Lens #84
  1300. #define f84_LensOffset -0.5
  1301. #define f84_LensScale 0.3
  1302. #define f84_LensFactor 0.85
  1303. #define f84_LensColor float3(0.95, 0.65, 0.30)
  1304. #define f84_ColorMultiplier 1.2
  1305. //Lens #85
  1306. #define f85_LensOffset 0.5
  1307. #define f85_LensScale 0.333
  1308. #define f85_LensFactor 1.0
  1309. #define f85_LensColor float3(0.85, 0.65, 0.85)
  1310. #define f85_ColorMultiplier 1.0
  1311. //Lens #86
  1312. #define f86_LensOffset 1.5
  1313. #define f86_LensScale 0.665
  1314. #define f86_LensFactor 1.0
  1315. #define f86_LensColor float3(0.85, 0.65, 0.85)
  1316. #define f86_ColorMultiplier 1.0
  1317. #endif
  1318. //===================================================================================================
  1319. //===================================================================================================
  1320. // External parameters
  1321. //===================================================================================================
  1322. //===================================================================================================
  1323. float4 tempF1; //0,1,2,3
  1324. float4 tempF2; //5,6,7,8
  1325. float4 tempF3; //9,0
  1326. //x=Width, y=1/Width, z=ScreenScaleY, w=1/ScreenScaleY
  1327. float4 ScreenSize;
  1328. //x=generic timer in range 0..1, period of 16777216 ms (4.6 hours), w=frame time elapsed (in seconds)
  1329. float4 Timer;
  1330. //xy=sun position on screen, w=visibility
  1331. float4 LightParameters;
  1332. //textures
  1333. texture2D texColor;
  1334. texture2D texMask;
  1335. sampler2D SamplerColor = sampler_state
  1336. {
  1337. Texture = <texColor>;
  1338. MinFilter = LINEAR;
  1339. MagFilter = LINEAR;
  1340. MipFilter = NONE;
  1341. AddressU = Clamp;
  1342. AddressV = Clamp;
  1343. SRGBTexture=FALSE;
  1344. MaxMipLevel=0;
  1345. MipMapLodBias=0;
  1346. };
  1347. sampler2D SamplerMask = sampler_state
  1348. {
  1349. Texture = <texMask>;
  1350. MinFilter = LINEAR;
  1351. MagFilter = LINEAR;
  1352. MipFilter = NONE;
  1353. AddressU = Clamp;
  1354. AddressV = Clamp;
  1355. SRGBTexture=FALSE;
  1356. MaxMipLevel=0;
  1357. MipMapLodBias=0;
  1358. };
  1359. struct VS_OUTPUT_POST
  1360. {
  1361. float4 vpos : POSITION;
  1362. float2 txcoord : TEXCOORD0;
  1363. };
  1364. struct VS_INPUT_POST
  1365. {
  1366. float3 pos : POSITION;
  1367. float2 txcoord : TEXCOORD0;
  1368. };
  1369. /**
  1370. * Pseudo-random number generator - returns a number generated according to the provided vector
  1371. */
  1372. float Random(float2 co)
  1373. {
  1374. return frac(sin(dot(co.xy, float2(12.9898, 78.233))) * 43758.5453);
  1375. }
  1376. /**
  1377. * Timer Formulas
  1378. */
  1379. /**
  1380. float timepassed=Timer.x* Value;
  1381. timepassed=frac(timepassed_Light) * 2.0 - 1.0;
  1382. timepassed=abs(timepassed_Light);
  1383. -1.0 - 1.0
  1384. float amplitude = 1.0;
  1385. float frequency = 1.0;
  1386. float Value= sin(2 * PI * frequency * Timer.x) * amplitude;
  1387. 0.0 - 1.0
  1388. float amplitude = 1.0;
  1389. float frequency = 1.0;
  1390. float Value = (0.5 * sin(2 * PI * frequency * Timer.x) + 0.5) * amplitude;
  1391. */
  1392. /**
  1393. * Several Lens moving similar to Lens effect
  1394. * Transformed in vertex shader and drawed separately
  1395. * Offset is set in passes of technique
  1396. */
  1397. VS_OUTPUT_POST VS_Secondary(VS_INPUT_POST IN, uniform float offset, uniform float scale)
  1398. {
  1399. VS_OUTPUT_POST OUT;
  1400. #if (USE_MOTION_SECONDARY == 1)
  1401. float timepassed_1=Timer.x* fVelocity_Secondary;
  1402. timepassed_1=frac(timepassed_1) * 2.0 - 1.0;
  1403. timepassed_1=abs(timepassed_1);
  1404. float4 pos = float4(IN.pos.x + fHPosSecondary,IN.pos.y + fVPosSecondary,IN.pos.z,1.0) + timepassed_1;
  1405. #else
  1406. float4 pos = float4(IN.pos.x + fHPosSecondary,IN.pos.y + fVPosSecondary,IN.pos.z,1.0);
  1407. #endif
  1408. pos.y*=ScreenSize.z;
  1409. float timepassed_Scale_Secondary=(Timer.x* (fScaleTimeFactor_Secondary * 8.0));
  1410. timepassed_Scale_Secondary=frac(timepassed_Scale_Secondary) * 2.0 - 1.0;
  1411. timepassed_Scale_Secondary=abs(timepassed_Scale_Secondary);
  1412. //TO DO : create own parameters instead of this, including uv offsets
  1413. float2 shift=LightParameters.xy * offset;
  1414. #if (USE_SCALE_VARIATIONS_SECONDARY == 1)
  1415. pos.xy=pos.xy*((scale * fLensScaleFactor) * (fScaleSecondary + timepassed_Scale_Secondary)) - shift;
  1416. #else
  1417. pos.xy=pos.xy*((scale * fLensScaleFactor) * fScaleSecondary) - shift;
  1418. #endif
  1419. OUT.vpos=pos;
  1420. OUT.txcoord.xy=IN.txcoord.xy;
  1421. return OUT;
  1422. }
  1423. float4 PS_Secondary(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  1424. {
  1425. float4 res;
  1426. float2 coord=IN.txcoord.xy;
  1427. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  1428. sunmask=pow(sunmask, fContrastSecondary);
  1429. clip(sunmask-0.02);
  1430. float timepassed_Scale_Secondary=(Timer.x* (fScaleTimeFactor_Secondary * 8.0));
  1431. timepassed_Scale_Secondary=frac(timepassed_Scale_Secondary) * 2.0 - 1.0;
  1432. timepassed_Scale_Secondary=abs(timepassed_Scale_Secondary);
  1433. float2 invscreensize=ScreenSize.x;
  1434. invscreensize.y=invscreensize.y/ScreenSize.z;
  1435. #if (USE_LENS_DISTORTIONS_SECONDARY == 1)
  1436. #if (USE_CHROMA_FORMULA_SECONDARY == 1)
  1437. float3 eta_Secondary = float3(1.0+fChromaticAmount_Secondary*0.9,1.0+fChromaticAmount_Secondary*0.6,1.0+fChromaticAmount_Secondary*0.3);
  1438. #elif (USE_CHROMA_FORMULA_SECONDARY == 2)
  1439. float3 eta_Secondary = float3(1.0+fChromaticAmount_Secondary*0.6,1.0+fChromaticAmount_Secondary*0.9,1.0+fChromaticAmount_Secondary*0.3);
  1440. #elif (USE_CHROMA_FORMULA_SECONDARY == 3)
  1441. float3 eta_Secondary = float3(1.0+fChromaticAmount_Secondary*0.3,1.0+fChromaticAmount_Secondary*0.6,1.0+fChromaticAmount_Secondary*0.9);
  1442. #elif (USE_CHROMA_FORMULA_SECONDARY == 4)
  1443. float3 eta_Secondary = float3(1.0+fChromaticAmount_Secondary*0.3,1.0+fChromaticAmount_Secondary*0.9,1.0+fChromaticAmount_Secondary*0.6);
  1444. #elif (USE_CHROMA_FORMULA_SECONDARY == 5)
  1445. float3 eta_Secondary = float3(1.0+fChromaticAmount_Secondary*0.3,1.0+fChromaticAmount_Secondary*0.3,1.0+fChromaticAmount_Secondary*0.3);
  1446. #elif (USE_CHROMA_FORMULA_SECONDARY == 6)
  1447. float3 eta_Secondary = float3(1.0+fChromaticAmount_Secondary*0.9,1.0+fChromaticAmount_Secondary*0.3,1.0+fChromaticAmount_Secondary*0.3);
  1448. #elif (USE_CHROMA_FORMULA_SECONDARY == 7)
  1449. float3 eta_Secondary = float3(1.0+fChromaticAmount_Secondary*0.9,1.0+fChromaticAmount_Secondary*0.9,1.0+fChromaticAmount_Secondary*0.3);
  1450. #endif
  1451. float2 center;
  1452. center.x = coord.x-0.5;
  1453. center.y = coord.y-0.5;
  1454. #if (USE_SCALE_VARIATIONS_SECONDARY == 1)
  1455. float LensZoom_Secondary = (1.0 / fLensSize_Secondary) * (fLensScaleFactor * (fScaleSecondary + timepassed_Scale_Secondary)); //Index on Timed-Size Vars
  1456. #else
  1457. float LensZoom_Secondary = 1.0 / fLensSize_Secondary;
  1458. #endif
  1459. float r2 = (IN.txcoord.x-0.5) * (IN.txcoord.x-0.5) + (IN.txcoord.y-0.5) * (IN.txcoord.y-0.5);
  1460. float f = 0;
  1461. if( fLensDistortionCubic_Secondary == 0.0){
  1462. f = 1 + r2 * fLensDistortion_Secondary;
  1463. }else{
  1464. f = 1 + r2 * (fLensDistortion_Secondary + fLensDistortionCubic_Secondary * sqrt(r2));
  1465. };
  1466. float x = (f*LensZoom_Secondary*(coord.x-0.5)+0.5);
  1467. float y = (f*LensZoom_Secondary*(coord.y-0.5)+0.5);
  1468. float2 rCoords = (f*eta_Secondary.r)*LensZoom_Secondary*(center.xy*0.5)+0.5;
  1469. float2 gCoords = (f*eta_Secondary.g)*LensZoom_Secondary*(center.xy*0.5)+0.5;
  1470. float2 bCoords = (f*eta_Secondary.b)*LensZoom_Secondary*(center.xy*0.5)+0.5;
  1471. float4 inputDistord = float4(tex2D(SamplerColor,rCoords).r, tex2D(SamplerColor,gCoords).g, tex2D(SamplerColor,bCoords).b, tex2D(SamplerColor,float2(x,y)).a);
  1472. float4 origcolor = float4(inputDistord.r,inputDistord.g,inputDistord.b,1);
  1473. float4 tcol=origcolor;
  1474. #else
  1475. float4 origcolor=tex2D(SamplerColor, coord.xy);
  1476. #endif
  1477. float amplitudeSecondary = 1.0;
  1478. float frequencySecondary = 1.0;
  1479. float TimeFactorSecondary=(0.5 * sin(2 * PI * frequencySecondary * Timer.x * (8.0 * fIntTimeFactor_Secondary)) + 0.75) * amplitudeSecondary; //+ 0.5 Non-Limiter
  1480. float timepassed_Light=Timer.x* fLightVelocity_Secondary;
  1481. timepassed_Light=frac(timepassed_Light) * 2.0 - 1.0;
  1482. timepassed_Light=abs(timepassed_Light);
  1483. #if (USE_LIGHT_SECONDARY == 1)
  1484. sunmask*=(LightParameters.w + timepassed_Light) * (fLensIntensity * (fIntensitySecondary - timepassed_Light * 1.1));
  1485. #else
  1486. sunmask*=LightParameters.w * (fLensIntensity * fIntensitySecondary);
  1487. #endif
  1488. #if (USE_INTENSITY_VARIATIONS_SECONDARY == 1)
  1489. sunmask*=LightParameters.w* ((fLensIntensity * fIntensitySecondary) * TimeFactorSecondary );
  1490. #else
  1491. sunmask*=LightParameters.w* (fLensIntensity * fIntensitySecondary);
  1492. #endif
  1493. #if (USE_LENS_DISTORTIONS_SECONDARY == 1)
  1494. res.xyz=origcolor.xyz * sunmask;
  1495. #else
  1496. res.xyz=origcolor * sunmask;
  1497. #endif
  1498. float clipper=dot(res.xyz, 0.333);
  1499. clip(clipper-0.0003);//skip draw if black
  1500. res.xyz*=(colorfilter * colormultiplier);
  1501. res.w=1.0;
  1502. return res;
  1503. }
  1504. /**
  1505. * SUNGLARE
  1506. */
  1507. VS_OUTPUT_POST VS_Sunglare(VS_INPUT_POST IN, uniform float scale)
  1508. {
  1509. VS_OUTPUT_POST OUT;
  1510. #if (USE_MOTION_SUNGLARE == 1)
  1511. float timepassed_2=Timer.x* fVelocity_Sunglare;
  1512. timepassed_2=frac(timepassed_2) * 2.0 - 1.0;
  1513. timepassed_2=abs(timepassed_2);
  1514. float4 pos = float4(IN.pos.x + fHPosSunglare,IN.pos.y + fVPosSunglare,IN.pos.z,1.0) + timepassed_2;
  1515. #else
  1516. float4 pos = float4(IN.pos.x + fHPosSunglare,IN.pos.y + fVPosSunglare,IN.pos.z,1.0);
  1517. #endif
  1518. pos.y *= ScreenSize.z;
  1519. #if (USE_DISPERSION_BOOST == 1)
  1520. float timepassed_Dispersion=Timer.x* fBoost_Sunglare;
  1521. timepassed_Dispersion=frac(timepassed_Dispersion) * 2.0 - 1.0;
  1522. timepassed_Dispersion=abs(timepassed_Dispersion);
  1523. float l = length(LightParameters.xy) + timepassed_Dispersion;
  1524. #else
  1525. float l = length(LightParameters.xy);
  1526. #endif
  1527. float timepassed_Scale_Sunglare=(Timer.x* (fScaleTimeFactor_Sunglare * 8.0));
  1528. timepassed_Scale_Sunglare=frac(timepassed_Scale_Sunglare) * 2.0 - 1.0;
  1529. timepassed_Scale_Sunglare=abs(timepassed_Scale_Sunglare);
  1530. float scaleFactor = (2.0 - 1.0 / (l * l + 1.0)) * scale;
  1531. float2 shift = LightParameters.xy;
  1532. #if (USE_SCALE_VARIATIONS_SUNGLARE == 1)
  1533. pos.xy=pos.xy*(scaleFactor * (fScaleSunglare + timepassed_Scale_Sunglare)) + shift;
  1534. #else
  1535. pos.xy=pos.xy * (scaleFactor * fScaleSunglare) + shift;
  1536. #endif
  1537. OUT.vpos = pos;
  1538. OUT.txcoord.xy = IN.txcoord.xy;
  1539. return OUT;
  1540. }
  1541. float4 PS_Sunglare(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  1542. {
  1543. float4 res;
  1544. float2 coord=IN.txcoord.xy;
  1545. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  1546. sunmask=pow(sunmask, fContrastSunglare);
  1547. clip(sunmask-0.02);
  1548. float4 origcolor=tex2D(SamplerColor, coord.xy);
  1549. float amplitudeSunglare = 1.0;
  1550. float frequencySunglare = 1.0;
  1551. float TimeFactorSunglare=(0.5 * sin(2 * PI * frequencySunglare * Timer.x * (8.0 * fIntTimeFactor_Sunglare)) + 0.75) * amplitudeSunglare; //+ 0.5 Non-Limiter
  1552. #if (USE_LIGHT_SUNGLARE == 1)
  1553. float timepassed_Light2=Timer.x* fLightVelocity_Sunglare;
  1554. timepassed_Light2=frac(timepassed_Light2) * 2.0 - 1.0;
  1555. timepassed_Light2=abs(timepassed_Light2);
  1556. float timepassed_Pulse=(Timer.x* timepassed_Light2)* 20.0; //KYO : Timer in Timer :P
  1557. timepassed_Pulse=frac(timepassed_Pulse) * 2.0 - 1.0;
  1558. timepassed_Pulse=abs(timepassed_Pulse);
  1559. sunmask*=(LightParameters.w + timepassed_Light2) * (fLensIntensity * (fIntensitySunglare - timepassed_Light2 * 1.1));
  1560. #else
  1561. sunmask*=LightParameters.w * (fLensIntensity * fIntensitySunglare);
  1562. #endif
  1563. #if (USE_INTENSITY_VARIATIONS_SUNGLARE == 1)
  1564. sunmask*=LightParameters.w* ((fLensIntensity * fIntensitySunglare) * TimeFactorSunglare );
  1565. #else
  1566. sunmask*=LightParameters.w* (fLensIntensity * fIntensitySunglare);
  1567. #endif
  1568. res.xyz=origcolor.a * sunmask;
  1569. float clipper=dot(res.xyz, 0.333);
  1570. clip(clipper-0.0003);//skip draw if black
  1571. res.xyz*=colorfilter * colormultiplier;
  1572. res.w=1.0;
  1573. return res;
  1574. }
  1575. /**
  1576. * SECONDARY_2
  1577. */
  1578. VS_OUTPUT_POST VS_Secondary_2(VS_INPUT_POST IN, uniform float offset, uniform float scale)
  1579. {
  1580. VS_OUTPUT_POST OUT;
  1581. #if (USE_MOTION_SECONDARY_2 == 1)
  1582. float timepassed_3=Timer.x* fVelocity_Secondary_2;
  1583. timepassed_3=frac(timepassed_3) * 2.0 - 1.0;
  1584. timepassed_3=abs(timepassed_3);
  1585. float4 pos = float4(IN.pos.x + fHPosSecondary_2,IN.pos.y + fVPosSecondary_2,IN.pos.z,1.0) + timepassed_3;
  1586. #else
  1587. float4 pos = float4(IN.pos.x + fHPosSecondary_2,IN.pos.y + fVPosSecondary_2,IN.pos.z,1.0);
  1588. #endif
  1589. pos.y*=ScreenSize.z;
  1590. float timepassed_Scale_Secondary_2=(Timer.x* (fScaleTimeFactor_Secondary_2 * 8.0));
  1591. timepassed_Scale_Secondary_2=frac(timepassed_Scale_Secondary_2) * 2.0 - 1.0;
  1592. timepassed_Scale_Secondary_2=abs(timepassed_Scale_Secondary_2);
  1593. //TO DO : create own parameters instead of this, including uv offsets
  1594. float2 shift=LightParameters.xy * offset;
  1595. #if (USE_SCALE_VARIATIONS_SECONDARY_2 == 1)
  1596. pos.xy=pos.xy*((scale * fLensScaleFactor) * (fScaleSecondary_2 + timepassed_Scale_Secondary_2)) - shift;
  1597. #else
  1598. pos.xy=pos.xy*((scale * fLensScaleFactor) * fScaleSecondary_2) - shift;
  1599. #endif
  1600. OUT.vpos=pos;
  1601. OUT.txcoord.xy=IN.txcoord.xy;
  1602. return OUT;
  1603. }
  1604. float4 PS_Secondary_2(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  1605. {
  1606. float4 res;
  1607. float2 coord=IN.txcoord.xy;
  1608. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  1609. sunmask=pow(sunmask, fContrastSecondary_2);
  1610. clip(sunmask-0.02);
  1611. float timepassed_Scale_Secondary_2=(Timer.x* (fScaleTimeFactor_Secondary_2 * 8.0));
  1612. timepassed_Scale_Secondary_2=frac(timepassed_Scale_Secondary_2) * 2.0 - 1.0;
  1613. timepassed_Scale_Secondary_2=abs(timepassed_Scale_Secondary_2);
  1614. float2 invscreensize=ScreenSize.x;
  1615. invscreensize.y=invscreensize.y/ScreenSize.z;
  1616. #if (USE_LENS_DISTORTIONS_SECONDARY_2 == 1)
  1617. #if (USE_CHROMA_FORMULA_SECONDARY_2 == 1)
  1618. float3 eta_Secondary_2 = float3(1.0+fChromaticAmount_Secondary_2*0.9,1.0+fChromaticAmount_Secondary_2*0.6,1.0+fChromaticAmount_Secondary_2*0.3);
  1619. #elif (USE_CHROMA_FORMULA_SECONDARY_2 == 2)
  1620. float3 eta_Secondary_2 = float3(1.0+fChromaticAmount_Secondary_2*0.6,1.0+fChromaticAmount_Secondary_2*0.9,1.0+fChromaticAmount_Secondary_2*0.3);
  1621. #elif (USE_CHROMA_FORMULA_SECONDARY_2 == 3)
  1622. float3 eta_Secondary_2 = float3(1.0+fChromaticAmount_Secondary_2*0.3,1.0+fChromaticAmount_Secondary_2*0.6,1.0+fChromaticAmount_Secondary_2*0.9);
  1623. #elif (USE_CHROMA_FORMULA_SECONDARY_2 == 4)
  1624. float3 eta_Secondary_2 = float3(1.0+fChromaticAmount_Secondary_2*0.3,1.0+fChromaticAmount_Secondary_2*0.9,1.0+fChromaticAmount_Secondary_2*0.6);
  1625. #elif (USE_CHROMA_FORMULA_SECONDARY_2 == 5)
  1626. float3 eta_Secondary_2 = float3(1.0+fChromaticAmount_Secondary_2*0.3,1.0+fChromaticAmount_Secondary_2*0.3,1.0+fChromaticAmount_Secondary_2*0.3);
  1627. #elif (USE_CHROMA_FORMULA_SECONDARY_2 == 6)
  1628. float3 eta_Secondary_2 = float3(1.0+fChromaticAmount_Secondary_2*0.9,1.0+fChromaticAmount_Secondary_2*0.3,1.0+fChromaticAmount_Secondary_2*0.3);
  1629. #elif (USE_CHROMA_FORMULA_SECONDARY_2 == 7)
  1630. float3 eta_Secondary_2 = float3(1.0+fChromaticAmount_Secondary_2*0.9,1.0+fChromaticAmount_Secondary_2*0.9,1.0+fChromaticAmount_Secondary_2*0.3);
  1631. #endif
  1632. float2 center;
  1633. center.x = coord.x-0.5;
  1634. center.y = coord.y-0.5;
  1635. #if (USE_SCALE_VARIATIONS_SECONDARY_2 == 1)
  1636. float LensZoom_Secondary_2 = (1.0 / fLensSize_Secondary_2) * (fLensScaleFactor * (fScaleSecondary_2 + timepassed_Scale_Secondary_2)); //Index on Timed-Size Vars
  1637. #else
  1638. float LensZoom_Secondary_2 = 1.0 / fLensSize_Secondary_2;
  1639. #endif
  1640. float r2 = (IN.txcoord.x-0.5) * (IN.txcoord.x-0.5) + (IN.txcoord.y-0.5) * (IN.txcoord.y-0.5);
  1641. float f = 0;
  1642. if( fLensDistortionCubic_Secondary_2 == 0.0){
  1643. f = 1 + r2 * fLensDistortion_Secondary_2;
  1644. }else{
  1645. f = 1 + r2 * (fLensDistortion_Secondary_2 + fLensDistortionCubic_Secondary_2 * sqrt(r2));
  1646. };
  1647. float x = (f*LensZoom_Secondary_2*(coord.x-0.5)+0.5);
  1648. float y = (f*LensZoom_Secondary_2*(coord.y-0.5)+0.5);
  1649. float2 rCoords = (f*eta_Secondary_2.r)*LensZoom_Secondary_2*(center.xy*0.5)+0.5;
  1650. float2 gCoords = (f*eta_Secondary_2.g)*LensZoom_Secondary_2*(center.xy*0.5)+0.5;
  1651. float2 bCoords = (f*eta_Secondary_2.b)*LensZoom_Secondary_2*(center.xy*0.5)+0.5;
  1652. float4 inputDistord = float4(tex2D(SamplerColor,rCoords).r, tex2D(SamplerColor,gCoords).g, tex2D(SamplerColor,bCoords).b, tex2D(SamplerColor,float2(x,y)).a);
  1653. float4 origcolor = float4(inputDistord.r,inputDistord.g,inputDistord.b,1);
  1654. float4 tcol=origcolor;
  1655. #else
  1656. float4 origcolor=tex2D(SamplerColor, coord.xy);
  1657. #endif
  1658. float amplitudeSecondary_2 = 1.0;
  1659. float frequencySecondary_2 = 1.0;
  1660. float TimeFactorSecondary_2=(0.5 * sin(2 * PI * frequencySecondary_2 * Timer.x * (8.0 * fIntTimeFactor_Secondary_2)) + 0.75) * amplitudeSecondary_2; //+ 0.5 Non-Limiter
  1661. float timepassed_Light3=Timer.x* fLightVelocity_Secondary_2;
  1662. timepassed_Light3=frac(timepassed_Light3) * 2.0 - 1.0;
  1663. timepassed_Light3=abs(timepassed_Light3);
  1664. #if (USE_LIGHT_SECONDARY_2 == 1)
  1665. sunmask*=(LightParameters.w + timepassed_Light3) * (fLensIntensity * (fIntensitySecondary_2 - timepassed_Light3 * 1.1));
  1666. #else
  1667. sunmask*=LightParameters.w * (fLensIntensity * fIntensitySecondary_2);
  1668. #endif
  1669. #if (USE_INTENSITY_VARIATIONS_SECONDARY_2 == 1)
  1670. sunmask*=LightParameters.w* ((fLensIntensity * fIntensitySecondary_2) * TimeFactorSecondary_2 );
  1671. #else
  1672. sunmask*=LightParameters.w* (fLensIntensity * fIntensitySecondary_2);
  1673. #endif
  1674. #if (USE_LENS_DISTORTIONS_SECONDARY_2 == 1)
  1675. res.xyz=origcolor.xyz * sunmask;
  1676. #else
  1677. res.xyz=origcolor * sunmask;
  1678. #endif
  1679. float clipper=dot(res.xyz, 0.333);
  1680. clip(clipper-0.0003);//skip draw if black
  1681. res.xyz*=colorfilter * colormultiplier;
  1682. res.w=1.0;
  1683. return res;
  1684. }
  1685. /**
  1686. * PRIMARY
  1687. */
  1688. VS_OUTPUT_POST VS_Primary(VS_INPUT_POST IN, uniform float offset, uniform float scale)
  1689. {
  1690. VS_OUTPUT_POST OUT;
  1691. #if (USE_MOTION_PRIMARY == 1)
  1692. float timepassed_4=Timer.x* fVelocity_Primary;
  1693. timepassed_4=frac(timepassed_4) * 2.0 - 1.0;
  1694. timepassed_4=abs(timepassed_4);
  1695. float4 pos = float4(IN.pos.x + fHPosPrimary,IN.pos.y + fVPosPrimary,IN.pos.z,1.0) + timepassed_4;
  1696. #else
  1697. float4 pos = float4(IN.pos.x + fHPosPrimary,IN.pos.y + fVPosPrimary,IN.pos.z,1.0);
  1698. #endif
  1699. pos.y*=ScreenSize.z;
  1700. float timepassed_Scale_Primary=(Timer.x* (fScaleTimeFactor_Primary * 8.0));
  1701. timepassed_Scale_Primary=frac(timepassed_Scale_Primary) * 2.0 - 1.0;
  1702. timepassed_Scale_Primary=abs(timepassed_Scale_Primary);
  1703. //TO DO : create own parameters instead of this, including uv offsets
  1704. float2 shift=LightParameters.xy * offset;
  1705. #if (USE_SCALE_VARIATIONS_PRIMARY == 1)
  1706. pos.xy=pos.xy*((scale * fLensScaleFactor) * (fScalePrimary + timepassed_Scale_Primary)) - shift;
  1707. #else
  1708. pos.xy=pos.xy*((scale * fLensScaleFactor) * fScalePrimary) - shift;
  1709. #endif
  1710. OUT.vpos=pos;
  1711. OUT.txcoord.xy=IN.txcoord.xy;
  1712. return OUT;
  1713. }
  1714. float4 PS_Primary(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  1715. {
  1716. float4 res;
  1717. float2 coord=IN.txcoord.xy;
  1718. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  1719. sunmask=pow(sunmask, fContrastPrimary);
  1720. clip(sunmask-0.02);
  1721. float timepassed_Scale_Primary=(Timer.x* (fScaleTimeFactor_Primary * 8.0));
  1722. timepassed_Scale_Primary=frac(timepassed_Scale_Primary) * 2.0 - 1.0;
  1723. timepassed_Scale_Primary=abs(timepassed_Scale_Primary);
  1724. float2 invscreensize=ScreenSize.x;
  1725. invscreensize.y=invscreensize.y/ScreenSize.z;
  1726. #if (USE_LENS_DISTORTIONS_PRIMARY == 1)
  1727. #if (USE_CHROMA_FORMULA_PRIMARY == 1)
  1728. float3 eta_Primary = float3(1.0+fChromaticAmount_Primary*0.9,1.0+fChromaticAmount_Primary*0.6,1.0+fChromaticAmount_Primary*0.3);
  1729. #elif (USE_CHROMA_FORMULA_PRIMARY == 2)
  1730. float3 eta_Primary = float3(1.0+fChromaticAmount_Primary*0.6,1.0+fChromaticAmount_Primary*0.9,1.0+fChromaticAmount_Primary*0.3);
  1731. #elif (USE_CHROMA_FORMULA_PRIMARY == 3)
  1732. float3 eta_Primary = float3(1.0+fChromaticAmount_Primary*0.3,1.0+fChromaticAmount_Primary*0.6,1.0+fChromaticAmount_Primary*0.9);
  1733. #elif (USE_CHROMA_FORMULA_PRIMARY == 4)
  1734. float3 eta_Primary = float3(1.0+fChromaticAmount_Primary*0.3,1.0+fChromaticAmount_Primary*0.9,1.0+fChromaticAmount_Primary*0.6);
  1735. #elif (USE_CHROMA_FORMULA_PRIMARY == 5)
  1736. float3 eta_Primary = float3(1.0+fChromaticAmount_Primary*0.3,1.0+fChromaticAmount_Primary*0.3,1.0+fChromaticAmount_Primary*0.3);
  1737. #elif (USE_CHROMA_FORMULA_PRIMARY == 6)
  1738. float3 eta_Primary = float3(1.0+fChromaticAmount_Primary*0.9,1.0+fChromaticAmount_Primary*0.3,1.0+fChromaticAmount_Primary*0.3);
  1739. #elif (USE_CHROMA_FORMULA_PRIMARY == 7)
  1740. float3 eta_Primary = float3(1.0+fChromaticAmount_Primary*0.9,1.0+fChromaticAmount_Primary*0.9,1.0+fChromaticAmount_Primary*0.3);
  1741. #endif
  1742. float2 center;
  1743. center.x = coord.x-0.5;
  1744. center.y = coord.y-0.5;
  1745. #if (USE_SCALE_VARIATIONS_PRIMARY == 1)
  1746. float LensZoom_Primary = (1.0 / fLensSize_Primary) * (fLensScaleFactor * (fScalePrimary + timepassed_Scale_Primary)); //Index on Timed-Size Vars
  1747. #else
  1748. float LensZoom_Primary = 1.0 / fLensSize_Primary;
  1749. #endif
  1750. float r2 = (IN.txcoord.x-0.5) * (IN.txcoord.x-0.5) + (IN.txcoord.y-0.5) * (IN.txcoord.y-0.5);
  1751. float f = 0;
  1752. if( fLensDistortionCubic_Primary == 0.0){
  1753. f = 1 + r2 * fLensDistortion_Primary;
  1754. }else{
  1755. f = 1 + r2 * (fLensDistortion_Primary + fLensDistortionCubic_Primary * sqrt(r2));
  1756. };
  1757. float x = (f*LensZoom_Primary*(coord.x-0.5)+0.5);
  1758. float y = (f*LensZoom_Primary*(coord.y-0.5)+0.5);
  1759. float2 rCoords = (f*eta_Primary.r)*LensZoom_Primary*(center.xy*0.5)+0.5;
  1760. float2 gCoords = (f*eta_Primary.g)*LensZoom_Primary*(center.xy*0.5)+0.5;
  1761. float2 bCoords = (f*eta_Primary.b)*LensZoom_Primary*(center.xy*0.5)+0.5;
  1762. float4 inputDistord = float4(tex2D(SamplerColor,rCoords).r, tex2D(SamplerColor,gCoords).g, tex2D(SamplerColor,bCoords).b, tex2D(SamplerColor,float2(x,y)).a);
  1763. float4 origcolor = float4(inputDistord.r,inputDistord.g,inputDistord.b,1);
  1764. float4 tcol=origcolor;
  1765. #else
  1766. float4 origcolor=tex2D(SamplerColor, coord.xy);
  1767. #endif
  1768. float amplitudePrimary = 1.0;
  1769. float frequencyPrimary = 1.0;
  1770. float TimeFactorPrimary=(0.5 * sin(2 * PI * frequencyPrimary * Timer.x * (8.0 * fIntTimeFactor_Primary)) + 0.75) * amplitudePrimary; //+ 0.5 Non-Limiter
  1771. float timepassed_Light4=Timer.x* fLightVelocity_Primary;
  1772. timepassed_Light4=frac(timepassed_Light4) * 2.0 - 1.0;
  1773. timepassed_Light4=abs(timepassed_Light4);
  1774. #if (USE_LIGHT_PRIMARY == 1)
  1775. sunmask*=(LightParameters.w + timepassed_Light4) * (fLensIntensity * (fIntensityPrimary - timepassed_Light4 * 1.1));
  1776. #else
  1777. sunmask*=LightParameters.w * (fLensIntensity * fIntensityPrimary);
  1778. #endif
  1779. #if (USE_INTENSITY_VARIATIONS_PRIMARY == 1)
  1780. sunmask*=LightParameters.w* ((fLensIntensity * fIntensityPrimary) * TimeFactorPrimary );
  1781. #else
  1782. sunmask*=LightParameters.w* (fLensIntensity * fIntensityPrimary);
  1783. #endif
  1784. #if (USE_LENS_DISTORTIONS_PRIMARY == 1)
  1785. res.xyz=origcolor.xyz * sunmask;
  1786. #else
  1787. res.xyz=origcolor * sunmask;
  1788. #endif
  1789. float clipper=dot(res.xyz, 0.333);
  1790. clip(clipper-0.0003);//skip draw if black
  1791. res.xyz*=colorfilter * colormultiplier;
  1792. res.w=1.0;
  1793. return res;
  1794. }
  1795. /**
  1796. * THIRDARY
  1797. */
  1798. VS_OUTPUT_POST VS_Thirdary(VS_INPUT_POST IN, uniform float offset, uniform float scale)
  1799. {
  1800. VS_OUTPUT_POST OUT;
  1801. #if (USE_MOTION_THIRDARY == 1)
  1802. float timepassed_5=Timer.x* fVelocity_Thirdary;
  1803. timepassed_5=frac(timepassed_5) * 2.0 - 1.0;
  1804. timepassed_5=abs(timepassed_5);
  1805. float4 pos = float4(IN.pos.x + fHPosThirdary,IN.pos.y + fVPosThirdary,IN.pos.z,1.0) + timepassed_5;
  1806. #else
  1807. float4 pos = float4(IN.pos.x + fHPosThirdary,IN.pos.y + fVPosThirdary,IN.pos.z,1.0);
  1808. #endif
  1809. pos.y*=ScreenSize.z;
  1810. float timepassed_Scale_Thirdary=(Timer.x* (fScaleTimeFactor_Thirdary * 8.0));
  1811. timepassed_Scale_Thirdary=frac(timepassed_Scale_Thirdary) * 2.0 - 1.0;
  1812. timepassed_Scale_Thirdary=abs(timepassed_Scale_Thirdary);
  1813. //TO DO : create own parameters instead of this, including uv offsets
  1814. float2 shift=LightParameters.xy * offset;
  1815. #if (USE_SCALE_VARIATIONS_THIRDARY == 1)
  1816. pos.xy=pos.xy*((scale * fLensScaleFactor) * (fScaleThirdary + timepassed_Scale_Thirdary)) - shift;
  1817. #else
  1818. pos.xy=pos.xy*((scale * fLensScaleFactor) * fScaleThirdary) - shift;
  1819. #endif
  1820. OUT.vpos=pos;
  1821. OUT.txcoord.xy=IN.txcoord.xy;
  1822. return OUT;
  1823. }
  1824. float4 PS_Thirdary(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  1825. {
  1826. float4 res;
  1827. float2 coord=IN.txcoord.xy;
  1828. //read sun visibility as amount of effect
  1829. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  1830. sunmask=pow(sunmask, fContrastThirdary);
  1831. clip(sunmask-0.02);
  1832. float timepassed_Scale_Thirdary=(Timer.x* (fScaleTimeFactor_Thirdary * 8.0));
  1833. timepassed_Scale_Thirdary=frac(timepassed_Scale_Thirdary) * 2.0 - 1.0;
  1834. timepassed_Scale_Thirdary=abs(timepassed_Scale_Thirdary);
  1835. float2 invscreensize=ScreenSize.x;
  1836. invscreensize.y=invscreensize.y/ScreenSize.z;
  1837. #if (USE_LENS_DISTORTIONS_THIRDARY == 1)
  1838. #if (USE_CHROMA_FORMULA_THIRDARY == 1)
  1839. float3 eta_Thirdary = float3(1.0+fChromaticAmount_Thirdary*0.9,1.0+fChromaticAmount_Thirdary*0.6,1.0+fChromaticAmount_Thirdary*0.3);
  1840. #elif (USE_CHROMA_FORMULA_THIRDARY == 2)
  1841. float3 eta_Thirdary = float3(1.0+fChromaticAmount_Thirdary*0.6,1.0+fChromaticAmount_Thirdary*0.9,1.0+fChromaticAmount_Thirdary*0.3);
  1842. #elif (USE_CHROMA_FORMULA_THIRDARY == 3)
  1843. float3 eta_Thirdary = float3(1.0+fChromaticAmount_Thirdary*0.3,1.0+fChromaticAmount_Thirdary*0.6,1.0+fChromaticAmount_Thirdary*0.9);
  1844. #elif (USE_CHROMA_FORMULA_THIRDARY == 4)
  1845. float3 eta_Thirdary = float3(1.0+fChromaticAmount_Thirdary*0.3,1.0+fChromaticAmount_Thirdary*0.9,1.0+fChromaticAmount_Thirdary*0.6);
  1846. #elif (USE_CHROMA_FORMULA_THIRDARY == 5)
  1847. float3 eta_Thirdary = float3(1.0+fChromaticAmount_Thirdary*0.3,1.0+fChromaticAmount_Thirdary*0.3,1.0+fChromaticAmount_Thirdary*0.3);
  1848. #elif (USE_CHROMA_FORMULA_THIRDARY == 6)
  1849. float3 eta_Thirdary = float3(1.0+fChromaticAmount_Thirdary*0.9,1.0+fChromaticAmount_Thirdary*0.3,1.0+fChromaticAmount_Thirdary*0.3);
  1850. #elif (USE_CHROMA_FORMULA_THIRDARY == 7)
  1851. float3 eta_Thirdary = float3(1.0+fChromaticAmount_Thirdary*0.9,1.0+fChromaticAmount_Thirdary*0.9,1.0+fChromaticAmount_Thirdary*0.3);
  1852. #endif
  1853. float2 center;
  1854. center.x = coord.x-0.5;
  1855. center.y = coord.y-0.5;
  1856. #if (USE_SCALE_VARIATIONS_THIRDARY == 1)
  1857. float LensZoom_Thirdary = (1.0 / fLensSize_Thirdary) * (fLensScaleFactor * (fScaleThirdary + timepassed_Scale_Thirdary)); //Index on Timed-Size Vars
  1858. #else
  1859. float LensZoom_Thirdary = 1.0 / fLensSize_Thirdary;
  1860. #endif
  1861. float r2 = (IN.txcoord.x-0.5) * (IN.txcoord.x-0.5) + (IN.txcoord.y-0.5) * (IN.txcoord.y-0.5);
  1862. float f = 0;
  1863. if( fLensDistortionCubic_Thirdary == 0.0){
  1864. f = 1 + r2 * fLensDistortion_Thirdary;
  1865. }else{
  1866. f = 1 + r2 * (fLensDistortion_Thirdary + fLensDistortionCubic_Thirdary * sqrt(r2));
  1867. };
  1868. float x = (f*LensZoom_Thirdary*(coord.x-0.5)+0.5);
  1869. float y = (f*LensZoom_Thirdary*(coord.y-0.5)+0.5);
  1870. float2 rCoords = (f*eta_Thirdary.r)*LensZoom_Thirdary*(center.xy*0.5)+0.5;
  1871. float2 gCoords = (f*eta_Thirdary.g)*LensZoom_Thirdary*(center.xy*0.5)+0.5;
  1872. float2 bCoords = (f*eta_Thirdary.b)*LensZoom_Thirdary*(center.xy*0.5)+0.5;
  1873. float4 inputDistord = float4(tex2D(SamplerColor,rCoords).r, tex2D(SamplerColor,gCoords).g, tex2D(SamplerColor,bCoords).b, tex2D(SamplerColor,float2(x,y)).a);
  1874. float4 origcolor = float4(inputDistord.r,inputDistord.g,inputDistord.b,1);
  1875. float4 tcol=origcolor;
  1876. #else
  1877. float4 origcolor=tex2D(SamplerColor, coord.xy);
  1878. #endif
  1879. float amplitudeThirdary = 1.0;
  1880. float frequencyThirdary = 1.0;
  1881. float TimeFactorThirdary=(0.5 * sin(2 * PI * frequencyThirdary * Timer.x * (8.0 * fIntTimeFactor_Thirdary)) + 0.75) * amplitudeThirdary; //+ 0.5 Non-Limiter
  1882. float timepassed_Light5=Timer.x* fLightVelocity_Thirdary;
  1883. timepassed_Light5=frac(timepassed_Light5) * 2.0 - 1.0;
  1884. timepassed_Light5=abs(timepassed_Light5);
  1885. #if (USE_LIGHT_THIRDARY == 1)
  1886. sunmask*=(LightParameters.w + timepassed_Light5) * (fLensIntensity * (fIntensityThirdary - timepassed_Light5 * 1.1));
  1887. #else
  1888. sunmask*=LightParameters.w * (fLensIntensity * fIntensityThirdary);
  1889. #endif
  1890. #if (USE_INTENSITY_VARIATIONS_THIRDARY == 1)
  1891. sunmask*=LightParameters.w* ((fLensIntensity * fIntensityThirdary) * TimeFactorThirdary );
  1892. #else
  1893. sunmask*=LightParameters.w* (fLensIntensity * fIntensityThirdary);
  1894. #endif
  1895. #if (USE_LENS_DISTORTIONS_THIRDARY == 1)
  1896. res.xyz=origcolor.xyz * sunmask;
  1897. #else
  1898. res.xyz=origcolor * sunmask;
  1899. #endif
  1900. float clipper=dot(res.xyz, 0.333);
  1901. clip(clipper-0.0003);//skip draw if black
  1902. res.xyz*=colorfilter * colormultiplier;
  1903. res.w=1.0;
  1904. return res;
  1905. }
  1906. /**
  1907. * THIRDARY_2
  1908. */
  1909. VS_OUTPUT_POST VS_Thirdary_2(VS_INPUT_POST IN, uniform float offset, uniform float scale)
  1910. {
  1911. VS_OUTPUT_POST OUT;
  1912. #if (USE_MOTION_THIRDARY_2 == 1)
  1913. float timepassed_6=Timer.x* fVelocity_Thirdary_2;
  1914. timepassed_6=frac(timepassed_6) * 2.0 - 1.0;
  1915. timepassed_6=abs(timepassed_6);
  1916. float4 pos = float4(IN.pos.x + fHPosThirdary_2,IN.pos.y + fVPosThirdary_2,IN.pos.z,1.0) + timepassed_6;
  1917. #else
  1918. float4 pos = float4(IN.pos.x + fHPosThirdary_2,IN.pos.y + fVPosThirdary_2,IN.pos.z,1.0);
  1919. #endif
  1920. pos.y*=ScreenSize.z;
  1921. float timepassed_Scale_Thirdary_2=(Timer.x* (fScaleTimeFactor_Thirdary_2 * 8.0));
  1922. timepassed_Scale_Thirdary_2=frac(timepassed_Scale_Thirdary_2) * 2.0 - 1.0;
  1923. timepassed_Scale_Thirdary_2=abs(timepassed_Scale_Thirdary_2);
  1924. //TO DO : create own parameters instead of this, including uv offsets
  1925. float2 shift=LightParameters.xy * offset;
  1926. #if (USE_SCALE_VARIATIONS_THIRDARY_2 == 1)
  1927. pos.xy=pos.xy*((scale * fLensScaleFactor) * (fScaleThirdary_2 + timepassed_Scale_Thirdary_2)) - shift;
  1928. #else
  1929. pos.xy=pos.xy*((scale * fLensScaleFactor) * fScaleThirdary_2) - shift;
  1930. #endif
  1931. OUT.vpos=pos;
  1932. OUT.txcoord.xy=IN.txcoord.xy;
  1933. return OUT;
  1934. }
  1935. float4 PS_Thirdary_2(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  1936. {
  1937. float4 res;
  1938. float2 coord=IN.txcoord.xy;
  1939. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  1940. sunmask=pow(sunmask, fContrastThirdary_2);
  1941. clip(sunmask-0.02);
  1942. float timepassed_Scale_Thirdary_2=(Timer.x* (fScaleTimeFactor_Thirdary_2 * 8.0));
  1943. timepassed_Scale_Thirdary_2=frac(timepassed_Scale_Thirdary_2) * 2.0 - 1.0;
  1944. timepassed_Scale_Thirdary_2=abs(timepassed_Scale_Thirdary_2);
  1945. float2 invscreensize=ScreenSize.x;
  1946. invscreensize.y=invscreensize.y/ScreenSize.z;
  1947. #if (USE_LENS_DISTORTIONS_THIRDARY_2 == 1)
  1948. #if (USE_CHROMA_FORMULA_THIRDARY_2 == 1)
  1949. float3 eta_Thirdary_2 = float3(1.0+fChromaticAmount_Thirdary_2*0.9,1.0+fChromaticAmount_Thirdary_2*0.6,1.0+fChromaticAmount_Thirdary_2*0.3);
  1950. #elif (USE_CHROMA_FORMULA_THIRDARY_2 == 2)
  1951. float3 eta_Thirdary_2 = float3(1.0+fChromaticAmount_Thirdary_2*0.6,1.0+fChromaticAmount_Thirdary_2*0.9,1.0+fChromaticAmount_Thirdary_2*0.3);
  1952. #elif (USE_CHROMA_FORMULA_THIRDARY_2 == 3)
  1953. float3 eta_Thirdary_2 = float3(1.0+fChromaticAmount_Thirdary_2*0.3,1.0+fChromaticAmount_Thirdary_2*0.6,1.0+fChromaticAmount_Thirdary_2*0.9);
  1954. #elif (USE_CHROMA_FORMULA_THIRDARY_2 == 4)
  1955. float3 eta_Thirdary_2 = float3(1.0+fChromaticAmount_Thirdary_2*0.3,1.0+fChromaticAmount_Thirdary_2*0.9,1.0+fChromaticAmount_Thirdary_2*0.6);
  1956. #elif (USE_CHROMA_FORMULA_THIRDARY_2 == 5)
  1957. float3 eta_Thirdary_2 = float3(1.0+fChromaticAmount_Thirdary_2*0.3,1.0+fChromaticAmount_Thirdary_2*0.3,1.0+fChromaticAmount_Thirdary_2*0.3);
  1958. #elif (USE_CHROMA_FORMULA_THIRDARY_2 == 6)
  1959. float3 eta_Thirdary_2 = float3(1.0+fChromaticAmount_Thirdary_2*0.9,1.0+fChromaticAmount_Thirdary_2*0.3,1.0+fChromaticAmount_Thirdary_2*0.3);
  1960. #elif (USE_CHROMA_FORMULA_THIRDARY_2 == 7)
  1961. float3 eta_Thirdary_2 = float3(1.0+fChromaticAmount_Thirdary_2*0.9,1.0+fChromaticAmount_Thirdary_2*0.9,1.0+fChromaticAmount_Thirdary_2*0.3);
  1962. #endif
  1963. float2 center;
  1964. center.x = coord.x-0.5;
  1965. center.y = coord.y-0.5;
  1966. #if (USE_SCALE_VARIATIONS_THIRDARY_2 == 1)
  1967. float LensZoom_Thirdary_2 = (1.0 / fLensSize_Thirdary_2) * (fLensScaleFactor * (fScaleThirdary_2 + timepassed_Scale_Thirdary_2)); //Index on Timed-Size Vars
  1968. #else
  1969. float LensZoom_Thirdary_2 = 1.0 / fLensSize_Thirdary_2;
  1970. #endif
  1971. float r2 = (IN.txcoord.x-0.5) * (IN.txcoord.x-0.5) + (IN.txcoord.y-0.5) * (IN.txcoord.y-0.5);
  1972. float f = 0;
  1973. if( fLensDistortionCubic_Thirdary_2 == 0.0){
  1974. f = 1 + r2 * fLensDistortion_Thirdary_2;
  1975. }else{
  1976. f = 1 + r2 * (fLensDistortion_Thirdary_2 + fLensDistortionCubic_Thirdary_2 * sqrt(r2));
  1977. };
  1978. float x = (f*LensZoom_Thirdary_2*(coord.x-0.5)+0.5);
  1979. float y = (f*LensZoom_Thirdary_2*(coord.y-0.5)+0.5);
  1980. float2 rCoords = (f*eta_Thirdary_2.r)*LensZoom_Thirdary_2*(center.xy*0.5)+0.5;
  1981. float2 gCoords = (f*eta_Thirdary_2.g)*LensZoom_Thirdary_2*(center.xy*0.5)+0.5;
  1982. float2 bCoords = (f*eta_Thirdary_2.b)*LensZoom_Thirdary_2*(center.xy*0.5)+0.5;
  1983. float4 inputDistord = float4(tex2D(SamplerColor,rCoords).r, tex2D(SamplerColor,gCoords).g, tex2D(SamplerColor,bCoords).b, tex2D(SamplerColor,float2(x,y)).a);
  1984. float4 origcolor = float4(inputDistord.r,inputDistord.g,inputDistord.b,1);
  1985. float4 tcol=origcolor;
  1986. #else
  1987. float4 origcolor=tex2D(SamplerColor, coord.xy);
  1988. #endif
  1989. float amplitudeThirdary_2 = 1.0;
  1990. float frequencyThirdary_2 = 1.0;
  1991. float TimeFactorThirdary_2=(0.5 * sin(2 * PI * frequencyThirdary_2 * Timer.x * (8.0 * fIntTimeFactor_Thirdary_2)) + 0.75) * amplitudeThirdary_2; //+ 0.5 Non-Limiter
  1992. float timepassed_Light6=Timer.x* fLightVelocity_Thirdary_2;
  1993. timepassed_Light6=frac(timepassed_Light6) * 2.0 - 1.0;
  1994. timepassed_Light6=abs(timepassed_Light6);
  1995. #if (USE_LIGHT_THIRDARY_2 == 1)
  1996. sunmask*=(LightParameters.w + timepassed_Light6) * (fLensIntensity * (fIntensityThirdary_2 - timepassed_Light6 * 1.1));
  1997. #else
  1998. sunmask*=LightParameters.w * (fLensIntensity * fIntensityThirdary_2);
  1999. #endif
  2000. #if (USE_INTENSITY_VARIATIONS_THIRDARY_2 == 1)
  2001. sunmask*=LightParameters.w* ((fLensIntensity * fIntensityThirdary_2) * TimeFactorThirdary_2 );
  2002. #else
  2003. sunmask*=LightParameters.w* (fLensIntensity * fIntensityThirdary_2);
  2004. #endif
  2005. #if (USE_LENS_DISTORTIONS_THIRDARY_2 == 1)
  2006. res.xyz=origcolor.xyz * sunmask;
  2007. #else
  2008. res.xyz=origcolor * sunmask;
  2009. #endif
  2010. float clipper=dot(res.xyz, 0.333);
  2011. clip(clipper-0.0003);//skip draw if black
  2012. res.xyz*=colorfilter * colormultiplier;
  2013. res.w=1.0;
  2014. return res;
  2015. }
  2016. /**
  2017. * PRIMARY_ALT
  2018. */
  2019. VS_OUTPUT_POST VS_Primary_Alt(VS_INPUT_POST IN, uniform float offset, uniform float scale)
  2020. {
  2021. VS_OUTPUT_POST OUT;
  2022. #if (USE_MOTION_PRIMARY_ALT == 1)
  2023. float timepassed_7=Timer.x* fVelocity_Primary_Alt;
  2024. timepassed_7=frac(timepassed_7) * 2.0 - 1.0;
  2025. timepassed_7=abs(timepassed_7);
  2026. float4 pos = float4(IN.pos.x + fHPosPrimary_Alt,IN.pos.y + fVPosPrimary_Alt,IN.pos.z,1.0) + timepassed_7;
  2027. #else
  2028. float4 pos = float4(IN.pos.x + fHPosPrimary_Alt,IN.pos.y + fVPosPrimary_Alt,IN.pos.z,1.0);
  2029. #endif
  2030. pos.y*=ScreenSize.z;
  2031. float timepassed_Scale_Primary_Alt=(Timer.x* (fScaleTimeFactor_Primary_Alt * 80.0));
  2032. timepassed_Scale_Primary_Alt=frac(timepassed_Scale_Primary_Alt) * 2.0 - 1.0;
  2033. timepassed_Scale_Primary_Alt=abs(timepassed_Scale_Primary_Alt);
  2034. //TO DO : create own parameters instead of this, including uv offsets
  2035. float2 shift=LightParameters.xy * offset;
  2036. #if (USE_SCALE_VARIATIONS_PRIMARY_ALT == 1)
  2037. pos.xy=pos.xy*((scale * fLensScaleFactor) * (fScalePrimary_Alt + timepassed_Scale_Primary_Alt)) - shift;
  2038. #else
  2039. pos.xy=pos.xy*((scale * fLensScaleFactor) * fScalePrimary_Alt) - shift;
  2040. #endif
  2041. OUT.vpos=pos;
  2042. OUT.txcoord.xy=IN.txcoord.xy;
  2043. return OUT;
  2044. }
  2045. float4 PS_Primary_Alt(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  2046. {
  2047. float4 res;
  2048. float2 coord=IN.txcoord.xy;
  2049. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  2050. sunmask=pow(sunmask,fContrastPrimary_Alt);
  2051. clip(sunmask-0.02);
  2052. float timepassed_Scale_Primary_Alt=(Timer.x* (fScaleTimeFactor_Primary_Alt * 8.0));
  2053. timepassed_Scale_Primary_Alt=frac(timepassed_Scale_Primary_Alt) * 2.0 - 1.0;
  2054. timepassed_Scale_Primary_Alt=abs(timepassed_Scale_Primary_Alt);
  2055. float2 invscreensize=ScreenSize.x;
  2056. invscreensize.y=invscreensize.y/ScreenSize.z;
  2057. #if (USE_LENS_DISTORTIONS_PRIMARY_ALT == 1)
  2058. #if (USE_CHROMA_FORMULA_PRIMARY_ALT == 1)
  2059. float3 eta_Primary_Alt = float3(1.0+fChromaticAmount_Primary_Alt*0.9,1.0+fChromaticAmount_Primary_Alt*0.6,1.0+fChromaticAmount_Primary_Alt*0.3);
  2060. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT == 2)
  2061. float3 eta_Primary_Alt = float3(1.0+fChromaticAmount_Primary_Alt*0.6,1.0+fChromaticAmount_Primary_Alt*0.9,1.0+fChromaticAmount_Primary_Alt*0.3);
  2062. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT == 3)
  2063. float3 eta_Primary_Alt = float3(1.0+fChromaticAmount_Primary_Alt*0.3,1.0+fChromaticAmount_Primary_Alt*0.6,1.0+fChromaticAmount_Primary_Alt*0.9);
  2064. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT == 4)
  2065. float3 eta_Primary_Alt = float3(1.0+fChromaticAmount_Primary_Alt*0.3,1.0+fChromaticAmount_Primary_Alt*0.9,1.0+fChromaticAmount_Primary_Alt*0.6);
  2066. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT == 5)
  2067. float3 eta_Primary_Alt = float3(1.0+fChromaticAmount_Primary_Alt*0.3,1.0+fChromaticAmount_Primary_Alt*0.3,1.0+fChromaticAmount_Primary_Alt*0.3);
  2068. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT == 6)
  2069. float3 eta_Primary_Alt = float3(1.0+fChromaticAmount_Primary_Alt*0.9,1.0+fChromaticAmount_Primary_Alt*0.3,1.0+fChromaticAmount_Primary_Alt*0.3);
  2070. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT == 7)
  2071. float3 eta_Primary_Alt = float3(1.0+fChromaticAmount_Primary_Alt*0.9,1.0+fChromaticAmount_Primary_Alt*0.9,1.0+fChromaticAmount_Primary_Alt*0.3);
  2072. #endif
  2073. float2 center;
  2074. center.x = coord.x-0.5;
  2075. center.y = coord.y-0.5;
  2076. #if (USE_SCALE_VARIATIONS_PRIMARY_ALT == 1)
  2077. float LensZoom_Primary_Alt = (1.0 / fLensSize_Primary_Alt) * (fLensScaleFactor * (fScalePrimary_Alt + timepassed_Scale_Primary_Alt)); //Index on Timed-Size Vars
  2078. #else
  2079. float LensZoom_Primary_Alt = 1.0 / fLensSize_Primary_Alt;
  2080. #endif
  2081. float r2 = (IN.txcoord.x-0.5) * (IN.txcoord.x-0.5) + (IN.txcoord.y-0.5) * (IN.txcoord.y-0.5);
  2082. float f = 0;
  2083. if( fLensDistortionCubic_Primary_Alt == 0.0){
  2084. f = 1 + r2 * fLensDistortion_Primary_Alt;
  2085. }else{
  2086. f = 1 + r2 * (fLensDistortion_Primary_Alt + fLensDistortionCubic_Primary_Alt * sqrt(r2));
  2087. };
  2088. float x = (f*LensZoom_Primary_Alt*(coord.x-0.5)+0.5);
  2089. float y = (f*LensZoom_Primary_Alt*(coord.y-0.5)+0.5);
  2090. float2 rCoords = (f*eta_Primary_Alt.r)*LensZoom_Primary_Alt*(center.xy*0.5)+0.5;
  2091. float2 gCoords = (f*eta_Primary_Alt.g)*LensZoom_Primary_Alt*(center.xy*0.5)+0.5;
  2092. float2 bCoords = (f*eta_Primary_Alt.b)*LensZoom_Primary_Alt*(center.xy*0.5)+0.5;
  2093. float4 inputDistord = float4(tex2D(SamplerColor,rCoords).r, tex2D(SamplerColor,gCoords).g, tex2D(SamplerColor,bCoords).b, tex2D(SamplerColor,float2(x,y)).a);
  2094. float4 origcolor = float4(inputDistord.r,inputDistord.g,inputDistord.b,1);
  2095. float4 tcol=origcolor;
  2096. #else
  2097. float4 origcolor=tex2D(SamplerColor, coord.xy);
  2098. #endif
  2099. float amplitudePrimary_Alt = 1.0;
  2100. float frequencyPrimary_Alt = 1.0;
  2101. float TimeFactorPrimary_Alt=(0.5 * sin(2 * PI * frequencyPrimary_Alt * Timer.x * (8.0 * fIntTimeFactor_Primary_Alt)) + 0.75) * amplitudePrimary_Alt; //+ 0.5 Non-Limiter
  2102. float timepassed_Light7=Timer.x* fLightVelocity_Primary_Alt;
  2103. timepassed_Light7=frac(timepassed_Light7) * 2.0 - 1.0;
  2104. timepassed_Light7=abs(timepassed_Light7);
  2105. #if (USE_LIGHT_PRIMARY_ALT == 1)
  2106. sunmask*=(LightParameters.w + timepassed_Light7) * (fLensIntensity * (fIntensityPrimary_Alt - timepassed_Light7 * 1.1));
  2107. #else
  2108. sunmask*=LightParameters.w * (fLensIntensity * fIntensityPrimary_Alt);
  2109. #endif
  2110. #if (USE_INTENSITY_VARIATIONS_PRIMARY_ALT == 1)
  2111. sunmask*=LightParameters.w* ((fLensIntensity * fIntensityPrimary_Alt) * TimeFactorPrimary_Alt );
  2112. #else
  2113. sunmask*=LightParameters.w* (fLensIntensity * fIntensityPrimary_Alt);
  2114. #endif
  2115. #if (USE_LENS_DISTORTIONS_PRIMARY_ALT == 1)
  2116. res.xyz=origcolor.xyz * sunmask;
  2117. #else
  2118. res.xyz=origcolor * sunmask;
  2119. #endif
  2120. float clipper=dot(res.xyz, 0.333);
  2121. clip(clipper-0.0003);//skip draw if black
  2122. res.xyz*=colorfilter * colormultiplier;
  2123. res.w=1.0;
  2124. return res;
  2125. }
  2126. /**
  2127. * PRIMARY_ALT_2
  2128. */
  2129. VS_OUTPUT_POST VS_Primary_Alt_2(VS_INPUT_POST IN, uniform float offset, uniform float scale)
  2130. {
  2131. VS_OUTPUT_POST OUT;
  2132. #if (USE_MOTION_PRIMARY_ALT_2 == 1)
  2133. float timepassed_9=Timer.x* fVelocity_Primary_Alt_2;
  2134. timepassed_9=frac(timepassed_9) * 2.0 - 1.0;
  2135. timepassed_9=abs(timepassed_9);
  2136. float4 pos = float4(IN.pos.x + fHPosPrimary_Alt_2,IN.pos.y + fVPosPrimary_Alt_2,IN.pos.z,1.0) + timepassed_9;
  2137. #else
  2138. float4 pos = float4(IN.pos.x + fHPosPrimary_Alt_2,IN.pos.y + fVPosPrimary_Alt_2,IN.pos.z,1.0);
  2139. #endif
  2140. pos.y*=ScreenSize.z;
  2141. float timepassed_Scale_Primary_Alt_2=(Timer.x* (fScaleTimeFactor_Primary_Alt_2 * 8.0));
  2142. timepassed_Scale_Primary_Alt_2=frac(timepassed_Scale_Primary_Alt_2) * 2.0 - 1.0;
  2143. timepassed_Scale_Primary_Alt_2=abs(timepassed_Scale_Primary_Alt_2);
  2144. //TO DO : create own parameters instead of this, including uv offsets
  2145. float2 shift=LightParameters.xy * offset;
  2146. #if (USE_SCALE_VARIATIONS_PRIMARY_ALT_2 == 1)
  2147. pos.xy=pos.xy*((scale * fLensScaleFactor) * (fScalePrimary_Alt_2 + timepassed_Scale_Primary_Alt_2)) - shift;
  2148. #else
  2149. pos.xy=pos.xy*((scale * fLensScaleFactor) * fScalePrimary_Alt_2) - shift;
  2150. #endif
  2151. OUT.vpos=pos;
  2152. OUT.txcoord.xy=IN.txcoord.xy;
  2153. return OUT;
  2154. }
  2155. float4 PS_Primary_Alt_2(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  2156. {
  2157. float4 res;
  2158. float2 coord=IN.txcoord.xy;
  2159. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  2160. sunmask=pow(sunmask,fContrastPrimary_Alt_2);
  2161. clip(sunmask-0.02);
  2162. float timepassed_Scale_Primary_Alt_2=(Timer.x* (fScaleTimeFactor_Primary_Alt_2 * 8.0));
  2163. timepassed_Scale_Primary_Alt_2=frac(timepassed_Scale_Primary_Alt_2) * 2.0 - 1.0;
  2164. timepassed_Scale_Primary_Alt_2=abs(timepassed_Scale_Primary_Alt_2);
  2165. float2 invscreensize=ScreenSize.x;
  2166. invscreensize.y=invscreensize.y/ScreenSize.z;
  2167. #if (USE_LENS_DISTORTIONS_PRIMARY_ALT_2 == 1)
  2168. #if (USE_CHROMA_FORMULA_PRIMARY_ALT_2 == 1)
  2169. float3 eta_Primary_Alt_2 = float3(1.0+fChromaticAmount_Primary_Alt_2*0.9,1.0+fChromaticAmount_Primary_Alt_2*0.6,1.0+fChromaticAmount_Primary_Alt_2*0.3);
  2170. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT_2 == 2)
  2171. float3 eta_Primary_Alt_2 = float3(1.0+fChromaticAmount_Primary_Alt_2*0.6,1.0+fChromaticAmount_Primary_Alt_2*0.9,1.0+fChromaticAmount_Primary_Alt_2*0.3);
  2172. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT_2 == 3)
  2173. float3 eta_Primary_Alt_2 = float3(1.0+fChromaticAmount_Primary_Alt_2*0.3,1.0+fChromaticAmount_Primary_Alt_2*0.6,1.0+fChromaticAmount_Primary_Alt_2*0.9);
  2174. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT_2 == 4)
  2175. float3 eta_Primary_Alt_2 = float3(1.0+fChromaticAmount_Primary_Alt_2*0.3,1.0+fChromaticAmount_Primary_Alt_2*0.9,1.0+fChromaticAmount_Primary_Alt_2*0.6);
  2176. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT_2 == 5)
  2177. float3 eta_Primary_Alt_2 = float3(1.0+fChromaticAmount_Primary_Alt_2*0.3,1.0+fChromaticAmount_Primary_Alt_2*0.3,1.0+fChromaticAmount_Primary_Alt_2*0.3);
  2178. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT_2 == 6)
  2179. float3 eta_Primary_Alt_2 = float3(1.0+fChromaticAmount_Primary_Alt_2*0.9,1.0+fChromaticAmount_Primary_Alt_2*0.3,1.0+fChromaticAmount_Primary_Alt_2*0.3);
  2180. #elif (USE_CHROMA_FORMULA_PRIMARY_ALT_2 == 7)
  2181. float3 eta_Primary_Alt_2 = float3(1.0+fChromaticAmount_Primary_Alt_2*0.9,1.0+fChromaticAmount_Primary_Alt_2*0.9,1.0+fChromaticAmount_Primary_Alt_2*0.3);
  2182. #endif
  2183. float2 center;
  2184. center.x = coord.x-0.5;
  2185. center.y = coord.y-0.5;
  2186. #if (USE_SCALE_VARIATIONS_PRIMARY_ALT_2 == 1)
  2187. float LensZoom_Primary_Alt_2 = (1.0 / fLensSize_Primary_Alt_2) * (fLensScaleFactor * (fScalePrimary_Alt_2 + timepassed_Scale_Primary_Alt_2)); //Index on Timed-Size Vars
  2188. #else
  2189. float LensZoom_Primary_Alt_2 = 1.0 / fLensSize_Primary_Alt_2;
  2190. #endif
  2191. float r2 = (IN.txcoord.x-0.5) * (IN.txcoord.x-0.5) + (IN.txcoord.y-0.5) * (IN.txcoord.y-0.5);
  2192. float f = 0;
  2193. if( fLensDistortionCubic_Primary_Alt_2 == 0.0){
  2194. f = 1 + r2 * fLensDistortion_Primary_Alt_2;
  2195. }else{
  2196. f = 1 + r2 * (fLensDistortion_Primary_Alt_2 + fLensDistortionCubic_Primary_Alt_2 * sqrt(r2));
  2197. };
  2198. float x = (f*LensZoom_Primary_Alt_2*(coord.x-0.5)+0.5);
  2199. float y = (f*LensZoom_Primary_Alt_2*(coord.y-0.5)+0.5);
  2200. float2 rCoords = (f*eta_Primary_Alt_2.r)*LensZoom_Primary_Alt_2*(center.xy*0.5)+0.5;
  2201. float2 gCoords = (f*eta_Primary_Alt_2.g)*LensZoom_Primary_Alt_2*(center.xy*0.5)+0.5;
  2202. float2 bCoords = (f*eta_Primary_Alt_2.b)*LensZoom_Primary_Alt_2*(center.xy*0.5)+0.5;
  2203. float4 inputDistord = float4(tex2D(SamplerColor,rCoords).r, tex2D(SamplerColor,gCoords).g, tex2D(SamplerColor,bCoords).b, tex2D(SamplerColor,float2(x,y)).a);
  2204. float4 origcolor = float4(inputDistord.r,inputDistord.g,inputDistord.b,1);
  2205. float4 tcol=origcolor;
  2206. #else
  2207. float4 origcolor=tex2D(SamplerColor, coord.xy);
  2208. #endif
  2209. float amplitudePrimary_Alt_2 = 1.0;
  2210. float frequencyPrimary_Alt_2 = 1.0;
  2211. float TimeFactorPrimary_Alt_2=(0.5 * sin(2 * PI * frequencyPrimary_Alt_2 * Timer.x * (8.0 * fIntTimeFactor_Primary_Alt_2)) + 0.75) * amplitudePrimary_Alt_2; //+ 0.5 Non-Limiter
  2212. float timepassed_Light9=Timer.x* fLightVelocity_Primary_Alt_2;
  2213. timepassed_Light9=frac(timepassed_Light9) * 2.0 - 1.0;
  2214. timepassed_Light9=abs(timepassed_Light9);
  2215. #if (USE_LIGHT_PRIMARY_ALT_2 == 1)
  2216. sunmask*=(LightParameters.w + timepassed_Light9) * (fLensIntensity * (fIntensityPrimary_Alt_2 - timepassed_Light9 * 1.1));
  2217. #else
  2218. sunmask*=LightParameters.w * (fLensIntensity * fIntensityPrimary_Alt_2);
  2219. #endif
  2220. #if (USE_INTENSITY_VARIATIONS_PRIMARY_ALT_2 == 1)
  2221. sunmask*=LightParameters.w* ((fLensIntensity * fIntensityPrimary_Alt_2) * TimeFactorPrimary_Alt_2 );
  2222. #else
  2223. sunmask*=LightParameters.w* (fLensIntensity * fIntensityPrimary_Alt_2);
  2224. #endif
  2225. #if (USE_LENS_DISTORTIONS_PRIMARY_ALT_2 == 1)
  2226. res.xyz=origcolor.xyz * sunmask;
  2227. #else
  2228. res.xyz=origcolor * sunmask;
  2229. #endif
  2230. float clipper=dot(res.xyz, 0.333);
  2231. clip(clipper-0.0003);//skip draw if black
  2232. res.xyz*=colorfilter * colormultiplier;
  2233. res.w=1.0;
  2234. return res;
  2235. }
  2236. /**
  2237. * FOURTH
  2238. */
  2239. VS_OUTPUT_POST VS_Fourth(VS_INPUT_POST IN, uniform float offset, uniform float scale)
  2240. {
  2241. VS_OUTPUT_POST OUT;
  2242. #if (USE_MOTION_FOURTH == 1)
  2243. float timepassed_10=Timer.x* fVelocity_Fourth;
  2244. timepassed_10=frac(timepassed_10) * 2.0 - 1.0;
  2245. timepassed_10=abs(timepassed_10);
  2246. float4 pos = float4(IN.pos.x + fHPosFourth,IN.pos.y + fVPosFourth,IN.pos.z,1.0) + timepassed_10;
  2247. #else
  2248. float4 pos = float4(IN.pos.x + fHPosFourth,IN.pos.y + fVPosFourth,IN.pos.z,1.0);
  2249. #endif
  2250. pos.y*=ScreenSize.z;
  2251. float timepassed_Scale_Fourth=(Timer.x* (fScaleTimeFactor_Fourth * 8.0));
  2252. timepassed_Scale_Fourth=frac(timepassed_Scale_Fourth) * 2.0 - 1.0;
  2253. timepassed_Scale_Fourth=abs(timepassed_Scale_Fourth);
  2254. //TO DO : create own parameters instead of this, including uv offsets
  2255. float2 shift=LightParameters.xy * offset;
  2256. #if (USE_SCALE_VARIATIONS_FOURTH == 1)
  2257. pos.xy=pos.xy*((scale * fLensScaleFactor) * (fScaleFourth + timepassed_Scale_Fourth)) - shift;
  2258. #else
  2259. pos.xy=pos.xy*((scale * fLensScaleFactor) * fScaleFourth) - shift;
  2260. #endif
  2261. OUT.vpos=pos;
  2262. OUT.txcoord.xy=IN.txcoord.xy;
  2263. return OUT;
  2264. }
  2265. float4 PS_Fourth(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  2266. {
  2267. float4 res;
  2268. float2 coord=IN.txcoord.xy;
  2269. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  2270. sunmask=pow(sunmask,fContrastFourth);
  2271. clip(sunmask-0.02);
  2272. float timepassed_Scale_Fourth=(Timer.x* (fScaleTimeFactor_Fourth * 8.0));
  2273. timepassed_Scale_Fourth=frac(timepassed_Scale_Fourth) * 2.0 - 1.0;
  2274. timepassed_Scale_Fourth=abs(timepassed_Scale_Fourth);
  2275. float2 invscreensize=ScreenSize.x;
  2276. invscreensize.y=invscreensize.y/ScreenSize.z;
  2277. #if (USE_LENS_DISTORTIONS_FOURTH == 1)
  2278. #if (USE_CHROMA_FORMULA_FOURTH == 1)
  2279. float3 eta_Fourth = float3(1.0+fChromaticAmount_Fourth*0.9,1.0+fChromaticAmount_Fourth*0.6,1.0+fChromaticAmount_Fourth*0.3);
  2280. #elif (USE_CHROMA_FORMULA_FOURTH == 2)
  2281. float3 eta_Fourth = float3(1.0+fChromaticAmount_Fourth*0.6,1.0+fChromaticAmount_Fourth*0.9,1.0+fChromaticAmount_Fourth*0.3);
  2282. #elif (USE_CHROMA_FORMULA_FOURTH == 3)
  2283. float3 eta_Fourth = float3(1.0+fChromaticAmount_Fourth*0.3,1.0+fChromaticAmount_Fourth*0.6,1.0+fChromaticAmount_Fourth*0.9);
  2284. #elif (USE_CHROMA_FORMULA_FOURTH == 4)
  2285. float3 eta_Fourth = float3(1.0+fChromaticAmount_Fourth*0.3,1.0+fChromaticAmount_Fourth*0.9,1.0+fChromaticAmount_Fourth*0.6);
  2286. #elif (USE_CHROMA_FORMULA_FOURTH == 5)
  2287. float3 eta_Fourth = float3(1.0+fChromaticAmount_Fourth*0.3,1.0+fChromaticAmount_Fourth*0.3,1.0+fChromaticAmount_Fourth*0.3);
  2288. #elif (USE_CHROMA_FORMULA_FOURTH == 6)
  2289. float3 eta_Fourth = float3(1.0+fChromaticAmount_Fourth*0.9,1.0+fChromaticAmount_Fourth*0.3,1.0+fChromaticAmount_Fourth*0.3);
  2290. #elif (USE_CHROMA_FORMULA_FOURTH == 7)
  2291. float3 eta_Fourth = float3(1.0+fChromaticAmount_Fourth*0.9,1.0+fChromaticAmount_Fourth*0.9,1.0+fChromaticAmount_Fourth*0.3);
  2292. #endif
  2293. float2 center;
  2294. center.x = coord.x-0.5;
  2295. center.y = coord.y-0.5;
  2296. #if (USE_SCALE_VARIATIONS_FOURTH == 1)
  2297. float LensZoom_Fourth = (1.0 / fLensSize_Fourth) * (fLensScaleFactor * (fScaleFourth + timepassed_Scale_Fourth)); //Index on Timed-Size Vars
  2298. #else
  2299. float LensZoom_Fourth = 1.0 / fLensSize_Fourth;
  2300. #endif
  2301. float r2 = (IN.txcoord.x-0.5) * (IN.txcoord.x-0.5) + (IN.txcoord.y-0.5) * (IN.txcoord.y-0.5);
  2302. float f = 0;
  2303. if( fLensDistortionCubic_Fourth == 0.0){
  2304. f = 1 + r2 * fLensDistortion_Fourth;
  2305. }else{
  2306. f = 1 + r2 * (fLensDistortion_Fourth + fLensDistortionCubic_Fourth * sqrt(r2));
  2307. };
  2308. float x = (f*LensZoom_Fourth*(coord.x-0.5)+0.5);
  2309. float y = (f*LensZoom_Fourth*(coord.y-0.5)+0.5);
  2310. float2 rCoords = (f*eta_Fourth.r)*LensZoom_Fourth*(center.xy*0.5)+0.5;
  2311. float2 gCoords = (f*eta_Fourth.g)*LensZoom_Fourth*(center.xy*0.5)+0.5;
  2312. float2 bCoords = (f*eta_Fourth.b)*LensZoom_Fourth*(center.xy*0.5)+0.5;
  2313. float4 inputDistord = float4(tex2D(SamplerColor,rCoords).r, tex2D(SamplerColor,gCoords).g, tex2D(SamplerColor,bCoords).b, tex2D(SamplerColor,float2(x,y)).a);
  2314. float4 origcolor = float4(inputDistord.r,inputDistord.g,inputDistord.b,1);
  2315. float4 tcol=origcolor;
  2316. #else
  2317. float4 origcolor=tex2D(SamplerColor, coord.xy);
  2318. #endif
  2319. float amplitudeFourth = 1.0;
  2320. float frequencyFourth = 1.0;
  2321. float TimeFactorFourth=(0.5 * sin(2 * PI * frequencyFourth * Timer.x * (8.0 * fIntTimeFactor_Fourth)) + 0.75) * amplitudeFourth; //+ 0.5 Non-Limiter
  2322. float timepassed_Light10=Timer.x* fLightVelocity_Fourth;
  2323. timepassed_Light10=frac(timepassed_Light10) * 2.0 - 1.0;
  2324. timepassed_Light10=abs(timepassed_Light10);
  2325. #if (USE_LIGHT_FOURTH == 1)
  2326. sunmask*=(LightParameters.w + timepassed_Light10) * (fLensIntensity * (fIntensityFourth - timepassed_Light10 * 1.1));
  2327. #else
  2328. sunmask*=LightParameters.w * (fLensIntensity * fIntensityFourth);
  2329. #endif
  2330. #if (USE_INTENSITY_VARIATIONS_FOURTH == 1)
  2331. sunmask*=LightParameters.w* ((fLensIntensity * fIntensityFourth) * TimeFactorFourth );
  2332. #else
  2333. sunmask*=LightParameters.w* (fLensIntensity * fIntensityFourth);
  2334. #endif
  2335. #if (USE_LENS_DISTORTIONS_FOURTH == 1)
  2336. res.xyz=origcolor.xyz * sunmask;
  2337. #else
  2338. res.xyz=origcolor * sunmask;
  2339. #endif
  2340. float clipper=dot(res.xyz, 0.333);
  2341. clip(clipper-0.0003);//skip draw if black
  2342. res.xyz*=colorfilter * colormultiplier;
  2343. res.w=1.0;
  2344. return res;
  2345. }
  2346. /**
  2347. * FOURTH_2
  2348. */
  2349. VS_OUTPUT_POST VS_Fourth_2(VS_INPUT_POST IN, uniform float offset, uniform float scale)
  2350. {
  2351. VS_OUTPUT_POST OUT;
  2352. #if (USE_MOTION_FOURTH_2 == 1)
  2353. float timepassed_11=Timer.x* fVelocity_Fourth_2;
  2354. timepassed_11=frac(timepassed_11) * 2.0 - 1.0;
  2355. timepassed_11=abs(timepassed_11);
  2356. float4 pos = float4(IN.pos.x + fHPosFourth_2,IN.pos.y + fVPosFourth_2,IN.pos.z,1.0) + timepassed_11;
  2357. #else
  2358. float4 pos = float4(IN.pos.x + fHPosFourth_2,IN.pos.y + fVPosFourth_2,IN.pos.z,1.0);
  2359. #endif
  2360. pos.y*=ScreenSize.z;
  2361. float timepassed_Scale_Fourth_2=(Timer.x* (fScaleTimeFactor_Fourth_2 * 8.0));
  2362. timepassed_Scale_Fourth_2=frac(timepassed_Scale_Fourth_2) * 2.0 - 1.0;
  2363. timepassed_Scale_Fourth_2=abs(timepassed_Scale_Fourth_2);
  2364. //TO DO : create own parameters instead of this, including uv offsets
  2365. float2 shift=LightParameters.xy * offset;
  2366. #if (USE_SCALE_VARIATIONS_FOURTH_2 == 1)
  2367. pos.xy=pos.xy*((scale * fLensScaleFactor) * (fScaleFourth_2 + timepassed_Scale_Fourth_2)) - shift;
  2368. #else
  2369. pos.xy=pos.xy*((scale * fLensScaleFactor) * fScaleFourth_2) - shift;
  2370. #endif
  2371. OUT.vpos=pos;
  2372. OUT.txcoord.xy=IN.txcoord.xy;
  2373. return OUT;
  2374. }
  2375. float4 PS_Fourth_2(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
  2376. {
  2377. float4 res;
  2378. float2 coord=IN.txcoord.xy;
  2379. float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
  2380. sunmask=pow(sunmask,fContrastFourth_2);
  2381. clip(sunmask-0.02);
  2382. float timepassed_Scale_Fourth_2=(Timer.x* (fScaleTimeFactor_Fourth_2 * 8.0));
  2383. timepassed_Scale_Fourth_2=frac(timepassed_Scale_Fourth_2) * 2.0 - 1.0;
  2384. timepassed_Scale_Fourth_2=abs(timepassed_Scale_Fourth_2);
  2385. float2 invscreensize=ScreenSize.x;
  2386. invscreensize.y=invscreensize.y/ScreenSize.z;
  2387. #if (USE_LENS_DISTORTIONS_FOURTH_2 == 1)
  2388. #if (USE_CHROMA_FORMULA_FOURTH_2 == 1)
  2389. float3 eta_Fourth_2 = float3(1.0+fChromaticAmount_Fourth_2*0.9,1.0+fChromaticAmount_Fourth_2*0.6,1.0+fChromaticAmount_Fourth_2*0.3);
  2390. #elif (USE_CHROMA_FORMULA_FOURTH_2 == 2)
  2391. float3 eta_Fourth_2 = float3(1.0+fChromaticAmount_Fourth_2*0.6,1.0+fChromaticAmount_Fourth_2*0.9,1.0+fChromaticAmount_Fourth_2*0.3);
  2392. #elif (USE_CHROMA_FORMULA_FOURTH_2 == 3)
  2393. float3 eta_Fourth_2 = float3(1.0+fChromaticAmount_Fourth_2*0.3,1.0+fChromaticAmount_Fourth_2*0.6,1.0+fChromaticAmount_Fourth_2*0.9);
  2394. #elif (USE_CHROMA_FORMULA_FOURTH_2 == 4)
  2395. float3 eta_Fourth_2 = float3(1.0+fChromaticAmount_Fourth_2*0.3,1.0+fChromaticAmount_Fourth_2*0.9,1.0+fChromaticAmount_Fourth_2*0.6);
  2396. #elif (USE_CHROMA_FORMULA_FOURTH_2 == 5)
  2397. float3 eta_Fourth_2 = float3(1.0+fChromaticAmount_Fourth_2*0.3,1.0+fChromaticAmount_Fourth_2*0.3,1.0+fChromaticAmount_Fourth_2*0.3);
  2398. #elif (USE_CHROMA_FORMULA_FOURTH_2 == 6)
  2399. float3 eta_Fourth_2 = float3(1.0+fChromaticAmount_Fourth_2*0.9,1.0+fChromaticAmount_Fourth_2*0.3,1.0+fChromaticAmount_Fourth_2*0.3);
  2400. #elif (USE_CHROMA_FORMULA_FOURTH_2 == 7)
  2401. float3 eta_Fourth_2 = float3(1.0+fChromaticAmount_Fourth_2*0.9,1.0+fChromaticAmount_Fourth_2*0.9,1.0+fChromaticAmount_Fourth_2*0.3);
  2402. #endif
  2403. float2 center;
  2404. center.x = coord.x-0.5;
  2405. center.y = coord.y-0.5;
  2406. #if (USE_SCALE_VARIATIONS_FOURTH_2 == 1)
  2407. float LensZoom_Fourth_2 = (1.0 / fLensSize_Fourth_2) * (fLensScaleFactor * (fScaleFourth_2 + timepassed_Scale_Fourth_2)); //Index on Timed-Size Vars
  2408. #else
  2409. float LensZoom_Fourth_2 = 1.0 / fLensSize_Fourth_2;
  2410. #endif
  2411. float r2 = (IN.txcoord.x-0.5) * (IN.txcoord.x-0.5) + (IN.txcoord.y-0.5) * (IN.txcoord.y-0.5);
  2412. float f = 0;
  2413. if( fLensDistortionCubic_Fourth_2 == 0.0){
  2414. f = 1 + r2 * fLensDistortion_Fourth_2;
  2415. }else{
  2416. f = 1 + r2 * (fLensDistortion_Fourth_2 + fLensDistortionCubic_Fourth_2 * sqrt(r2));
  2417. };
  2418. float x = (f*LensZoom_Fourth_2*(coord.x-0.5)+0.5);
  2419. float y = (f*LensZoom_Fourth_2*(coord.y-0.5)+0.5);
  2420. float2 rCoords = (f*eta_Fourth_2.r)*LensZoom_Fourth_2*(center.xy*0.5)+0.5;
  2421. float2 gCoords = (f*eta_Fourth_2.g)*LensZoom_Fourth_2*(center.xy*0.5)+0.5;
  2422. float2 bCoords = (f*eta_Fourth_2.b)*LensZoom_Fourth_2*(center.xy*0.5)+0.5;
  2423. float4 inputDistord = float4(tex2D(SamplerColor,rCoords).r, tex2D(SamplerColor,gCoords).g, tex2D(SamplerColor,bCoords).b, tex2D(SamplerColor,float2(x,y)).a);
  2424. float4 origcolor = float4(inputDistord.r,inputDistord.g,inputDistord.b,1);
  2425. float4 tcol=origcolor;
  2426. #else
  2427. float4 origcolor=tex2D(SamplerColor, coord.xy);
  2428. #endif
  2429. float amplitudeFourth_2 = 1.0;
  2430. float frequencyFourth_2 = 1.0;
  2431. float TimeFactorFourth_2=(0.5 * sin(2 * PI * frequencyFourth_2 * Timer.x * (8.0 * fIntTimeFactor_Fourth_2)) + 0.75) * amplitudeFourth_2; //+ 0.5 Non-Limiter
  2432. float timepassed_Light11=Timer.x* fLightVelocity_Fourth_2;
  2433. timepassed_Light11=frac(timepassed_Light11) * 2.0 - 1.0;
  2434. timepassed_Light11=abs(timepassed_Light11);
  2435. #if (USE_LIGHT_FOURTH_2 == 1)
  2436. sunmask*=(LightParameters.w + timepassed_Light11) * (fLensIntensity * (fIntensityFourth_2 - timepassed_Light11 * 1.1));
  2437. #else
  2438. sunmask*=LightParameters.w * (fLensIntensity * fIntensityFourth_2);
  2439. #endif
  2440. #if (USE_INTENSITY_VARIATIONS_FOURTH_2 == 1)
  2441. sunmask*=LightParameters.w* ((fLensIntensity * fIntensityFourth_2) * TimeFactorFourth_2 );
  2442. #else
  2443. sunmask*=LightParameters.w* (fLensIntensity * fIntensityFourth_2);
  2444. #endif
  2445. #if (USE_LENS_DISTORTIONS_FOURTH_2 == 1)
  2446. res.xyz=origcolor.xyz * sunmask;
  2447. #else
  2448. res.xyz=origcolor * sunmask;
  2449. #endif
  2450. float clipper=dot(res.xyz, 0.333);
  2451. clip(clipper-0.0003);//skip draw if black
  2452. res.xyz*=colorfilter * colormultiplier;
  2453. res.w=1.0;
  2454. return res;
  2455. }
  2456. //==================================================================================
  2457. //==================================================================================
  2458. //==================================================================================
  2459. /**
  2460. * TECHNIQUES
  2461. */
  2462. technique Draw
  2463. {
  2464. #if (USE_SECONDARY == 1)
  2465. pass P0
  2466. {
  2467. VertexShader = compile vs_3_0 VS_Secondary(f1_LensOffset, (f1_LensScale * f1_LensFactor)); //offset, scale, scale factor
  2468. PixelShader = compile ps_3_0 PS_Secondary(f1_LensColor, f1_ColorMultiplier); //Color RGB
  2469. AlphaBlendEnable=TRUE;
  2470. SrcBlend=ONE;
  2471. DestBlend=ONE;
  2472. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2473. DitherEnable=FALSE;
  2474. ZEnable=FALSE;
  2475. CullMode=NONE;
  2476. ALPHATESTENABLE=FALSE;
  2477. SEPARATEALPHABLENDENABLE=FALSE;
  2478. StencilEnable=FALSE;
  2479. FogEnable=FALSE;
  2480. SRGBWRITEENABLE=FALSE;
  2481. }
  2482. pass P1
  2483. {
  2484. VertexShader = compile vs_3_0 VS_Secondary(f2_LensOffset, (f2_LensScale * f2_LensFactor));
  2485. PixelShader = compile ps_3_0 PS_Secondary(f2_LensColor, f2_ColorMultiplier);
  2486. AlphaBlendEnable=TRUE;
  2487. SrcBlend=ONE;
  2488. DestBlend=ONE;
  2489. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2490. DitherEnable=FALSE;
  2491. ZEnable=FALSE;
  2492. CullMode=NONE;
  2493. ALPHATESTENABLE=FALSE;
  2494. SEPARATEALPHABLENDENABLE=FALSE;
  2495. StencilEnable=FALSE;
  2496. FogEnable=FALSE;
  2497. SRGBWRITEENABLE=FALSE;
  2498. }
  2499. pass P2
  2500. {
  2501. VertexShader = compile vs_3_0 VS_Secondary(f3_LensOffset, (f3_LensScale * f3_LensFactor));
  2502. PixelShader = compile ps_3_0 PS_Secondary(f3_LensColor, f3_ColorMultiplier);
  2503. AlphaBlendEnable=TRUE;
  2504. SrcBlend=ONE;
  2505. DestBlend=ONE;
  2506. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2507. DitherEnable=FALSE;
  2508. ZEnable=FALSE;
  2509. CullMode=NONE;
  2510. ALPHATESTENABLE=FALSE;
  2511. SEPARATEALPHABLENDENABLE=FALSE;
  2512. StencilEnable=FALSE;
  2513. FogEnable=FALSE;
  2514. SRGBWRITEENABLE=FALSE;
  2515. }
  2516. pass P3
  2517. {
  2518. VertexShader = compile vs_3_0 VS_Secondary(f4_LensOffset, (f4_LensScale * f4_LensFactor));
  2519. PixelShader = compile ps_3_0 PS_Secondary(f4_LensColor, f4_ColorMultiplier);
  2520. AlphaBlendEnable=TRUE;
  2521. SrcBlend=ONE;
  2522. DestBlend=ONE;
  2523. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2524. DitherEnable=FALSE;
  2525. ZEnable=FALSE;
  2526. CullMode=NONE;
  2527. ALPHATESTENABLE=FALSE;
  2528. SEPARATEALPHABLENDENABLE=FALSE;
  2529. StencilEnable=FALSE;
  2530. FogEnable=FALSE;
  2531. SRGBWRITEENABLE=FALSE;
  2532. }
  2533. pass P4
  2534. {
  2535. VertexShader = compile vs_3_0 VS_Secondary(f5_LensOffset, (f5_LensScale * f5_LensFactor));
  2536. PixelShader = compile ps_3_0 PS_Secondary(f5_LensColor, f5_ColorMultiplier);
  2537. AlphaBlendEnable=TRUE;
  2538. SrcBlend=ONE;
  2539. DestBlend=ONE;
  2540. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2541. DitherEnable=FALSE;
  2542. ZEnable=FALSE;
  2543. CullMode=NONE;
  2544. ALPHATESTENABLE=FALSE;
  2545. SEPARATEALPHABLENDENABLE=FALSE;
  2546. StencilEnable=FALSE;
  2547. FogEnable=FALSE;
  2548. SRGBWRITEENABLE=FALSE;
  2549. }
  2550. pass P5
  2551. {
  2552. VertexShader = compile vs_3_0 VS_Secondary(f6_LensOffset, (f6_LensScale * f6_LensFactor));
  2553. PixelShader = compile ps_3_0 PS_Secondary(f6_LensColor, f6_ColorMultiplier);
  2554. AlphaBlendEnable=TRUE;
  2555. SrcBlend=ONE;
  2556. DestBlend=ONE;
  2557. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2558. DitherEnable=FALSE;
  2559. ZEnable=FALSE;
  2560. CullMode=NONE;
  2561. ALPHATESTENABLE=FALSE;
  2562. SEPARATEALPHABLENDENABLE=FALSE;
  2563. StencilEnable=FALSE;
  2564. FogEnable=FALSE;
  2565. SRGBWRITEENABLE=FALSE;
  2566. }
  2567. pass P6
  2568. {
  2569. VertexShader = compile vs_3_0 VS_Secondary(f7_LensOffset, (f7_LensScale * f7_LensFactor));
  2570. PixelShader = compile ps_3_0 PS_Secondary(f7_LensColor, f7_ColorMultiplier);
  2571. AlphaBlendEnable=TRUE;
  2572. SrcBlend=ONE;
  2573. DestBlend=ONE;
  2574. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2575. DitherEnable=FALSE;
  2576. ZEnable=FALSE;
  2577. CullMode=NONE;
  2578. ALPHATESTENABLE=FALSE;
  2579. SEPARATEALPHABLENDENABLE=FALSE;
  2580. StencilEnable=FALSE;
  2581. FogEnable=FALSE;
  2582. SRGBWRITEENABLE=FALSE;
  2583. }
  2584. pass P7
  2585. {
  2586. VertexShader = compile vs_3_0 VS_Secondary(f8_LensOffset, (f8_LensScale * f8_LensFactor));
  2587. PixelShader = compile ps_3_0 PS_Secondary(f8_LensColor, f8_ColorMultiplier);
  2588. AlphaBlendEnable=TRUE;
  2589. SrcBlend=ONE;
  2590. DestBlend=ONE;
  2591. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2592. DitherEnable=FALSE;
  2593. ZEnable=FALSE;
  2594. CullMode=NONE;
  2595. ALPHATESTENABLE=FALSE;
  2596. SEPARATEALPHABLENDENABLE=FALSE;
  2597. StencilEnable=FALSE;
  2598. FogEnable=FALSE;
  2599. SRGBWRITEENABLE=FALSE;
  2600. }
  2601. pass P8
  2602. {
  2603. VertexShader = compile vs_3_0 VS_Secondary(f9_LensOffset, (f9_LensScale * f9_LensFactor));
  2604. PixelShader = compile ps_3_0 PS_Secondary(f9_LensColor, f9_ColorMultiplier);
  2605. AlphaBlendEnable=TRUE;
  2606. SrcBlend=ONE;
  2607. DestBlend=ONE;
  2608. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2609. DitherEnable=FALSE;
  2610. ZEnable=FALSE;
  2611. CullMode=NONE;
  2612. ALPHATESTENABLE=FALSE;
  2613. SEPARATEALPHABLENDENABLE=FALSE;
  2614. StencilEnable=FALSE;
  2615. FogEnable=FALSE;
  2616. SRGBWRITEENABLE=FALSE;
  2617. }
  2618. pass P9
  2619. {
  2620. VertexShader = compile vs_3_0 VS_Secondary(f10_LensOffset, (f10_LensScale * f10_LensFactor));
  2621. PixelShader = compile ps_3_0 PS_Secondary(f10_LensColor, f10_ColorMultiplier);
  2622. AlphaBlendEnable=TRUE;
  2623. SrcBlend=ONE;
  2624. DestBlend=ONE;
  2625. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2626. DitherEnable=FALSE;
  2627. ZEnable=FALSE;
  2628. CullMode=NONE;
  2629. ALPHATESTENABLE=FALSE;
  2630. SEPARATEALPHABLENDENABLE=FALSE;
  2631. StencilEnable=FALSE;
  2632. FogEnable=FALSE;
  2633. SRGBWRITEENABLE=FALSE;
  2634. }
  2635. pass P10
  2636. {
  2637. VertexShader = compile vs_3_0 VS_Secondary(f11_LensOffset, (f11_LensScale * f11_LensFactor));
  2638. PixelShader = compile ps_3_0 PS_Secondary(f11_LensColor, f11_ColorMultiplier);
  2639. AlphaBlendEnable=TRUE;
  2640. SrcBlend=ONE;
  2641. DestBlend=ONE;
  2642. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2643. DitherEnable=FALSE;
  2644. ZEnable=FALSE;
  2645. CullMode=NONE;
  2646. ALPHATESTENABLE=FALSE;
  2647. SEPARATEALPHABLENDENABLE=FALSE;
  2648. StencilEnable=FALSE;
  2649. FogEnable=FALSE;
  2650. SRGBWRITEENABLE=FALSE;
  2651. }
  2652. #endif
  2653. // Add or Remove passes here, then renumber passes below
  2654. #if (USE_SUNGLARE == 1)
  2655. pass P11
  2656. {
  2657. VertexShader = compile vs_3_0 VS_Sunglare(f12_LensScale);
  2658. PixelShader = compile ps_3_0 PS_Sunglare(f12_LensColor, f12_ColorMultiplier);
  2659. AlphaBlendEnable=TRUE;
  2660. SrcBlend=ONE;
  2661. DestBlend=ONE;
  2662. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2663. DitherEnable=FALSE;
  2664. ZEnable=FALSE;
  2665. CullMode=NONE;
  2666. ALPHATESTENABLE=FALSE;
  2667. SEPARATEALPHABLENDENABLE=FALSE;
  2668. StencilEnable=FALSE;
  2669. FogEnable=FALSE;
  2670. SRGBWRITEENABLE=FALSE;
  2671. }
  2672. pass P12
  2673. {
  2674. VertexShader = compile vs_3_0 VS_Sunglare(f13_LensScale);
  2675. PixelShader = compile ps_3_0 PS_Sunglare(f13_LensColor, f13_ColorMultiplier);
  2676. AlphaBlendEnable=TRUE;
  2677. SrcBlend=ONE;
  2678. DestBlend=ONE;
  2679. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2680. DitherEnable=FALSE;
  2681. ZEnable=FALSE;
  2682. CullMode=NONE;
  2683. ALPHATESTENABLE=FALSE;
  2684. SEPARATEALPHABLENDENABLE=FALSE;
  2685. StencilEnable=FALSE;
  2686. FogEnable=FALSE;
  2687. SRGBWRITEENABLE=FALSE;
  2688. }
  2689. pass P13
  2690. {
  2691. VertexShader = compile vs_3_0 VS_Sunglare(f14_LensScale);
  2692. PixelShader = compile ps_3_0 PS_Sunglare(f14_LensColor, f14_ColorMultiplier);
  2693. AlphaBlendEnable=TRUE;
  2694. SrcBlend=ONE;
  2695. DestBlend=ONE;
  2696. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2697. DitherEnable=FALSE;
  2698. ZEnable=FALSE;
  2699. CullMode=NONE;
  2700. ALPHATESTENABLE=FALSE;
  2701. SEPARATEALPHABLENDENABLE=FALSE;
  2702. StencilEnable=FALSE;
  2703. FogEnable=FALSE;
  2704. SRGBWRITEENABLE=FALSE;
  2705. }
  2706. #endif
  2707. //Add or Remove passes here, then renumber passes below
  2708. #if (USE_SECONDARY_2 == 1)
  2709. pass P14
  2710. {
  2711. VertexShader = compile vs_3_0 VS_Secondary_2(f15_LensOffset, (f15_LensScale * f15_LensFactor)); //offset, scale, scale factor
  2712. PixelShader = compile ps_3_0 PS_Secondary_2(f15_LensColor, f15_ColorMultiplier); //Color RGB
  2713. AlphaBlendEnable=TRUE;
  2714. SrcBlend=ONE;
  2715. DestBlend=ONE;
  2716. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2717. DitherEnable=FALSE;
  2718. ZEnable=FALSE;
  2719. CullMode=NONE;
  2720. ALPHATESTENABLE=FALSE;
  2721. SEPARATEALPHABLENDENABLE=FALSE;
  2722. StencilEnable=FALSE;
  2723. FogEnable=FALSE;
  2724. SRGBWRITEENABLE=FALSE;
  2725. }
  2726. pass P15
  2727. {
  2728. VertexShader = compile vs_3_0 VS_Secondary_2(f16_LensOffset, (f16_LensScale * f16_LensFactor));
  2729. PixelShader = compile ps_3_0 PS_Secondary_2(f16_LensColor, f16_ColorMultiplier);
  2730. AlphaBlendEnable=TRUE;
  2731. SrcBlend=ONE;
  2732. DestBlend=ONE;
  2733. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2734. DitherEnable=FALSE;
  2735. ZEnable=FALSE;
  2736. CullMode=NONE;
  2737. ALPHATESTENABLE=FALSE;
  2738. SEPARATEALPHABLENDENABLE=FALSE;
  2739. StencilEnable=FALSE;
  2740. FogEnable=FALSE;
  2741. SRGBWRITEENABLE=FALSE;
  2742. }
  2743. pass P16
  2744. {
  2745. VertexShader = compile vs_3_0 VS_Secondary_2(f17_LensOffset, (f17_LensScale * f17_LensFactor));
  2746. PixelShader = compile ps_3_0 PS_Secondary_2(f17_LensColor, f17_ColorMultiplier);
  2747. AlphaBlendEnable=TRUE;
  2748. SrcBlend=ONE;
  2749. DestBlend=ONE;
  2750. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2751. DitherEnable=FALSE;
  2752. ZEnable=FALSE;
  2753. CullMode=NONE;
  2754. ALPHATESTENABLE=FALSE;
  2755. SEPARATEALPHABLENDENABLE=FALSE;
  2756. StencilEnable=FALSE;
  2757. FogEnable=FALSE;
  2758. SRGBWRITEENABLE=FALSE;
  2759. }
  2760. pass P17
  2761. {
  2762. VertexShader = compile vs_3_0 VS_Secondary_2(f18_LensOffset, (f18_LensScale * f18_LensFactor));
  2763. PixelShader = compile ps_3_0 PS_Secondary_2(f18_LensColor, f18_ColorMultiplier);
  2764. AlphaBlendEnable=TRUE;
  2765. SrcBlend=ONE;
  2766. DestBlend=ONE;
  2767. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2768. DitherEnable=FALSE;
  2769. ZEnable=FALSE;
  2770. CullMode=NONE;
  2771. ALPHATESTENABLE=FALSE;
  2772. SEPARATEALPHABLENDENABLE=FALSE;
  2773. StencilEnable=FALSE;
  2774. FogEnable=FALSE;
  2775. SRGBWRITEENABLE=FALSE;
  2776. }
  2777. pass P18
  2778. {
  2779. VertexShader = compile vs_3_0 VS_Secondary_2(f19_LensOffset, (f19_LensScale * f19_LensFactor));
  2780. PixelShader = compile ps_3_0 PS_Secondary_2(f19_LensColor, f19_ColorMultiplier);
  2781. AlphaBlendEnable=TRUE;
  2782. SrcBlend=ONE;
  2783. DestBlend=ONE;
  2784. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2785. DitherEnable=FALSE;
  2786. ZEnable=FALSE;
  2787. CullMode=NONE;
  2788. ALPHATESTENABLE=FALSE;
  2789. SEPARATEALPHABLENDENABLE=FALSE;
  2790. StencilEnable=FALSE;
  2791. FogEnable=FALSE;
  2792. SRGBWRITEENABLE=FALSE;
  2793. }
  2794. pass P19
  2795. {
  2796. VertexShader = compile vs_3_0 VS_Secondary_2(f20_LensOffset, (f20_LensScale * f20_LensFactor));
  2797. PixelShader = compile ps_3_0 PS_Secondary_2(f20_LensColor, f20_ColorMultiplier);
  2798. AlphaBlendEnable=TRUE;
  2799. SrcBlend=ONE;
  2800. DestBlend=ONE;
  2801. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2802. DitherEnable=FALSE;
  2803. ZEnable=FALSE;
  2804. CullMode=NONE;
  2805. ALPHATESTENABLE=FALSE;
  2806. SEPARATEALPHABLENDENABLE=FALSE;
  2807. StencilEnable=FALSE;
  2808. FogEnable=FALSE;
  2809. SRGBWRITEENABLE=FALSE;
  2810. }
  2811. pass P20
  2812. {
  2813. VertexShader = compile vs_3_0 VS_Secondary_2(f21_LensOffset, (f21_LensScale * f21_LensFactor));
  2814. PixelShader = compile ps_3_0 PS_Secondary_2(f21_LensColor, f21_ColorMultiplier);
  2815. AlphaBlendEnable=TRUE;
  2816. SrcBlend=ONE;
  2817. DestBlend=ONE;
  2818. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2819. DitherEnable=FALSE;
  2820. ZEnable=FALSE;
  2821. CullMode=NONE;
  2822. ALPHATESTENABLE=FALSE;
  2823. SEPARATEALPHABLENDENABLE=FALSE;
  2824. StencilEnable=FALSE;
  2825. FogEnable=FALSE;
  2826. SRGBWRITEENABLE=FALSE;
  2827. }
  2828. pass P21
  2829. {
  2830. VertexShader = compile vs_3_0 VS_Secondary_2(f22_LensOffset, (f22_LensScale * f22_LensFactor));
  2831. PixelShader = compile ps_3_0 PS_Secondary_2(f22_LensColor, f22_ColorMultiplier);
  2832. AlphaBlendEnable=TRUE;
  2833. SrcBlend=ONE;
  2834. DestBlend=ONE;
  2835. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2836. DitherEnable=FALSE;
  2837. ZEnable=FALSE;
  2838. CullMode=NONE;
  2839. ALPHATESTENABLE=FALSE;
  2840. SEPARATEALPHABLENDENABLE=FALSE;
  2841. StencilEnable=FALSE;
  2842. FogEnable=FALSE;
  2843. SRGBWRITEENABLE=FALSE;
  2844. }
  2845. pass P22
  2846. {
  2847. VertexShader = compile vs_3_0 VS_Secondary_2(f23_LensOffset, (f23_LensScale * f23_LensFactor));
  2848. PixelShader = compile ps_3_0 PS_Secondary_2(f23_LensColor, f23_ColorMultiplier);
  2849. AlphaBlendEnable=TRUE;
  2850. SrcBlend=ONE;
  2851. DestBlend=ONE;
  2852. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2853. DitherEnable=FALSE;
  2854. ZEnable=FALSE;
  2855. CullMode=NONE;
  2856. ALPHATESTENABLE=FALSE;
  2857. SEPARATEALPHABLENDENABLE=FALSE;
  2858. StencilEnable=FALSE;
  2859. FogEnable=FALSE;
  2860. SRGBWRITEENABLE=FALSE;
  2861. }
  2862. pass P23
  2863. {
  2864. VertexShader = compile vs_3_0 VS_Secondary_2(f24_LensOffset, (f24_LensScale * f24_LensFactor));
  2865. PixelShader = compile ps_3_0 PS_Secondary_2(f24_LensColor, f24_ColorMultiplier);
  2866. AlphaBlendEnable=TRUE;
  2867. SrcBlend=ONE;
  2868. DestBlend=ONE;
  2869. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2870. DitherEnable=FALSE;
  2871. ZEnable=FALSE;
  2872. CullMode=NONE;
  2873. ALPHATESTENABLE=FALSE;
  2874. SEPARATEALPHABLENDENABLE=FALSE;
  2875. StencilEnable=FALSE;
  2876. FogEnable=FALSE;
  2877. SRGBWRITEENABLE=FALSE;
  2878. }
  2879. pass P24
  2880. {
  2881. VertexShader = compile vs_3_0 VS_Secondary_2(f25_LensOffset, (f25_LensScale * f25_LensFactor));
  2882. PixelShader = compile ps_3_0 PS_Secondary_2(f25_LensColor, f25_ColorMultiplier);
  2883. AlphaBlendEnable=TRUE;
  2884. SrcBlend=ONE;
  2885. DestBlend=ONE;
  2886. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2887. DitherEnable=FALSE;
  2888. ZEnable=FALSE;
  2889. CullMode=NONE;
  2890. ALPHATESTENABLE=FALSE;
  2891. SEPARATEALPHABLENDENABLE=FALSE;
  2892. StencilEnable=FALSE;
  2893. FogEnable=FALSE;
  2894. SRGBWRITEENABLE=FALSE;
  2895. }
  2896. #endif
  2897. //Add or Remove passes here, then renumber passes below
  2898. #if (USE_PRIMARY == 1)
  2899. pass P25
  2900. {
  2901. #if (USE_LENSMOTION_PRIMARY == 1)
  2902. VertexShader = compile vs_3_0 VS_Primary(f26_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens26)* 2.0 - 1.0), (f26_LensScale * f26_LensFactor));
  2903. #else
  2904. VertexShader = compile vs_3_0 VS_Primary(f26_LensOffset, (f26_LensScale * f26_LensFactor));
  2905. #endif
  2906. PixelShader = compile ps_3_0 PS_Primary(f26_LensColor, f26_ColorMultiplier);
  2907. AlphaBlendEnable=TRUE;
  2908. SrcBlend=ONE;
  2909. DestBlend=ONE;
  2910. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2911. DitherEnable=FALSE;
  2912. ZEnable=FALSE;
  2913. CullMode=NONE;
  2914. ALPHATESTENABLE=FALSE;
  2915. SEPARATEALPHABLENDENABLE=FALSE;
  2916. StencilEnable=FALSE;
  2917. FogEnable=FALSE;
  2918. SRGBWRITEENABLE=FALSE;
  2919. }
  2920. pass P26
  2921. {
  2922. #if (USE_LENSMOTION_PRIMARY == 1)
  2923. VertexShader = compile vs_3_0 VS_Primary(f27_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens27)* 2.0 - 1.0), (f27_LensScale * f27_LensFactor));
  2924. #else
  2925. VertexShader = compile vs_3_0 VS_Primary(f27_LensOffset, (f27_LensScale * f27_LensFactor));
  2926. #endif
  2927. PixelShader = compile ps_3_0 PS_Primary(f27_LensColor, f27_ColorMultiplier);
  2928. AlphaBlendEnable=TRUE;
  2929. SrcBlend=ONE;
  2930. DestBlend=ONE;
  2931. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2932. DitherEnable=FALSE;
  2933. ZEnable=FALSE;
  2934. CullMode=NONE;
  2935. ALPHATESTENABLE=FALSE;
  2936. SEPARATEALPHABLENDENABLE=FALSE;
  2937. StencilEnable=FALSE;
  2938. FogEnable=FALSE;
  2939. SRGBWRITEENABLE=FALSE;
  2940. }
  2941. pass P27
  2942. {
  2943. #if (USE_LENSMOTION_PRIMARY == 1)
  2944. VertexShader = compile vs_3_0 VS_Primary(f28_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens28)* 2.0 - 1.0), (f28_LensScale * f28_LensFactor));
  2945. #else
  2946. VertexShader = compile vs_3_0 VS_Primary(f28_LensOffset, (f28_LensScale * f28_LensFactor));
  2947. #endif
  2948. PixelShader = compile ps_3_0 PS_Primary(f28_LensColor, f28_ColorMultiplier);
  2949. AlphaBlendEnable=TRUE;
  2950. SrcBlend=ONE;
  2951. DestBlend=ONE;
  2952. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2953. DitherEnable=FALSE;
  2954. ZEnable=FALSE;
  2955. CullMode=NONE;
  2956. ALPHATESTENABLE=FALSE;
  2957. SEPARATEALPHABLENDENABLE=FALSE;
  2958. StencilEnable=FALSE;
  2959. FogEnable=FALSE;
  2960. SRGBWRITEENABLE=FALSE;
  2961. }
  2962. pass P28
  2963. {
  2964. #if (USE_LENSMOTION_PRIMARY == 1)
  2965. VertexShader = compile vs_3_0 VS_Primary(f29_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens29)* 2.0 - 1.0), (f29_LensScale * f29_LensFactor));
  2966. #else
  2967. VertexShader = compile vs_3_0 VS_Primary(f29_LensOffset, (f29_LensScale * f29_LensFactor));
  2968. #endif
  2969. PixelShader = compile ps_3_0 PS_Primary(f29_LensColor, f29_ColorMultiplier);
  2970. AlphaBlendEnable=TRUE;
  2971. SrcBlend=ONE;
  2972. DestBlend=ONE;
  2973. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2974. DitherEnable=FALSE;
  2975. ZEnable=FALSE;
  2976. CullMode=NONE;
  2977. ALPHATESTENABLE=FALSE;
  2978. SEPARATEALPHABLENDENABLE=FALSE;
  2979. StencilEnable=FALSE;
  2980. FogEnable=FALSE;
  2981. SRGBWRITEENABLE=FALSE;
  2982. }
  2983. pass P29
  2984. {
  2985. #if (USE_LENSMOTION_PRIMARY == 1)
  2986. VertexShader = compile vs_3_0 VS_Primary(f30_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens30)* 2.0 - 1.0), (f30_LensScale * f30_LensFactor));
  2987. #else
  2988. VertexShader = compile vs_3_0 VS_Primary(f30_LensOffset, (f30_LensScale * f30_LensFactor));
  2989. #endif
  2990. PixelShader = compile ps_3_0 PS_Primary(f30_LensColor, f30_ColorMultiplier);
  2991. AlphaBlendEnable=TRUE;
  2992. SrcBlend=ONE;
  2993. DestBlend=ONE;
  2994. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  2995. DitherEnable=FALSE;
  2996. ZEnable=FALSE;
  2997. CullMode=NONE;
  2998. ALPHATESTENABLE=FALSE;
  2999. SEPARATEALPHABLENDENABLE=FALSE;
  3000. StencilEnable=FALSE;
  3001. FogEnable=FALSE;
  3002. SRGBWRITEENABLE=FALSE;
  3003. }
  3004. pass P30
  3005. {
  3006. #if (USE_LENSMOTION_PRIMARY == 1)
  3007. VertexShader = compile vs_3_0 VS_Primary(f31_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens31)* 2.0 - 1.0), (f31_LensScale * f31_LensFactor));
  3008. #else
  3009. VertexShader = compile vs_3_0 VS_Primary(f31_LensOffset, (f31_LensScale * f31_LensFactor));
  3010. #endif
  3011. PixelShader = compile ps_3_0 PS_Primary(f31_LensColor, f31_ColorMultiplier);
  3012. AlphaBlendEnable=TRUE;
  3013. SrcBlend=ONE;
  3014. DestBlend=ONE;
  3015. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3016. DitherEnable=FALSE;
  3017. ZEnable=FALSE;
  3018. CullMode=NONE;
  3019. ALPHATESTENABLE=FALSE;
  3020. SEPARATEALPHABLENDENABLE=FALSE;
  3021. StencilEnable=FALSE;
  3022. FogEnable=FALSE;
  3023. SRGBWRITEENABLE=FALSE;
  3024. }
  3025. pass P31
  3026. {
  3027. #if (USE_LENSMOTION_PRIMARY == 1)
  3028. VertexShader = compile vs_3_0 VS_Primary(f32_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens32)* 2.0 - 1.0), (f32_LensScale * f32_LensFactor));
  3029. #else
  3030. VertexShader = compile vs_3_0 VS_Primary(f32_LensOffset, (f32_LensScale * f32_LensFactor));
  3031. #endif
  3032. PixelShader = compile ps_3_0 PS_Primary(f32_LensColor, f32_ColorMultiplier);
  3033. AlphaBlendEnable=TRUE;
  3034. SrcBlend=ONE;
  3035. DestBlend=ONE;
  3036. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3037. DitherEnable=FALSE;
  3038. ZEnable=FALSE;
  3039. CullMode=NONE;
  3040. ALPHATESTENABLE=FALSE;
  3041. SEPARATEALPHABLENDENABLE=FALSE;
  3042. StencilEnable=FALSE;
  3043. FogEnable=FALSE;
  3044. SRGBWRITEENABLE=FALSE;
  3045. }
  3046. pass P32
  3047. {
  3048. #if (USE_LENSMOTION_PRIMARY == 1)
  3049. VertexShader = compile vs_3_0 VS_Primary(f33_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens33)* 2.0 - 1.0), (f33_LensScale * f33_LensFactor));
  3050. #else
  3051. VertexShader = compile vs_3_0 VS_Primary(f33_LensOffset, (f33_LensScale * f33_LensFactor));
  3052. #endif
  3053. PixelShader = compile ps_3_0 PS_Primary(f33_LensColor, f33_ColorMultiplier);
  3054. AlphaBlendEnable=TRUE;
  3055. SrcBlend=ONE;
  3056. DestBlend=ONE;
  3057. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3058. DitherEnable=FALSE;
  3059. ZEnable=FALSE;
  3060. CullMode=NONE;
  3061. ALPHATESTENABLE=FALSE;
  3062. SEPARATEALPHABLENDENABLE=FALSE;
  3063. StencilEnable=FALSE;
  3064. FogEnable=FALSE;
  3065. SRGBWRITEENABLE=FALSE;
  3066. }
  3067. pass P33
  3068. {
  3069. #if (USE_LENSMOTION_PRIMARY == 1)
  3070. VertexShader = compile vs_3_0 VS_Primary(f34_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens34)* 2.0 - 1.0), (f34_LensScale * f34_LensFactor));
  3071. #else
  3072. VertexShader = compile vs_3_0 VS_Primary(f34_LensOffset, (f34_LensScale * f34_LensFactor));
  3073. #endif
  3074. PixelShader = compile ps_3_0 PS_Primary(f34_LensColor, f34_ColorMultiplier);
  3075. AlphaBlendEnable=TRUE;
  3076. SrcBlend=ONE;
  3077. DestBlend=ONE;
  3078. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3079. DitherEnable=FALSE;
  3080. ZEnable=FALSE;
  3081. CullMode=NONE;
  3082. ALPHATESTENABLE=FALSE;
  3083. SEPARATEALPHABLENDENABLE=FALSE;
  3084. StencilEnable=FALSE;
  3085. FogEnable=FALSE;
  3086. SRGBWRITEENABLE=FALSE;
  3087. }
  3088. pass P34
  3089. {
  3090. #if (USE_LENSMOTION_PRIMARY == 1)
  3091. VertexShader = compile vs_3_0 VS_Primary(f35_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens35)* 2.0 - 1.0), (f35_LensScale * f35_LensFactor));
  3092. #else
  3093. VertexShader = compile vs_3_0 VS_Primary(f35_LensOffset, (f35_LensScale * f35_LensFactor));
  3094. #endif
  3095. PixelShader = compile ps_3_0 PS_Primary(f35_LensColor, f35_ColorMultiplier);
  3096. AlphaBlendEnable=TRUE;
  3097. SrcBlend=ONE;
  3098. DestBlend=ONE;
  3099. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3100. DitherEnable=FALSE;
  3101. ZEnable=FALSE;
  3102. CullMode=NONE;
  3103. ALPHATESTENABLE=FALSE;
  3104. SEPARATEALPHABLENDENABLE=FALSE;
  3105. StencilEnable=FALSE;
  3106. FogEnable=FALSE;
  3107. SRGBWRITEENABLE=FALSE;
  3108. }
  3109. pass P35
  3110. {
  3111. #if (USE_LENSMOTION_PRIMARY == 1)
  3112. VertexShader = compile vs_3_0 VS_Primary(f36_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens36)* 2.0 - 1.0), (f36_LensScale * f36_LensFactor));
  3113. #else
  3114. VertexShader = compile vs_3_0 VS_Primary(f36_LensOffset, (f36_LensScale * f36_LensFactor));
  3115. #endif
  3116. PixelShader = compile ps_3_0 PS_Primary(f36_LensColor, f36_ColorMultiplier);
  3117. AlphaBlendEnable=TRUE;
  3118. SrcBlend=ONE;
  3119. DestBlend=ONE;
  3120. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3121. DitherEnable=FALSE;
  3122. ZEnable=FALSE;
  3123. CullMode=NONE;
  3124. ALPHATESTENABLE=FALSE;
  3125. SEPARATEALPHABLENDENABLE=FALSE;
  3126. StencilEnable=FALSE;
  3127. FogEnable=FALSE;
  3128. SRGBWRITEENABLE=FALSE;
  3129. }
  3130. #endif
  3131. //Add or Remove passes here, then renumber passes below
  3132. #if (USE_THIRDARY == 1)
  3133. pass P36
  3134. {
  3135. VertexShader = compile vs_3_0 VS_Thirdary(f37_LensOffset, (f37_LensScale * f37_LensFactor));
  3136. PixelShader = compile ps_3_0 PS_Thirdary(f37_LensColor, f37_ColorMultiplier);
  3137. AlphaBlendEnable=TRUE;
  3138. SrcBlend=ONE;
  3139. DestBlend=ONE;
  3140. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3141. DitherEnable=FALSE;
  3142. ZEnable=FALSE;
  3143. CullMode=NONE;
  3144. ALPHATESTENABLE=FALSE;
  3145. SEPARATEALPHABLENDENABLE=FALSE;
  3146. StencilEnable=FALSE;
  3147. FogEnable=FALSE;
  3148. SRGBWRITEENABLE=FALSE;
  3149. }
  3150. pass P37
  3151. {
  3152. VertexShader = compile vs_3_0 VS_Thirdary(f38_LensOffset, (f38_LensScale * f38_LensFactor));
  3153. PixelShader = compile ps_3_0 PS_Thirdary(f38_LensColor, f38_ColorMultiplier);
  3154. AlphaBlendEnable=TRUE;
  3155. SrcBlend=ONE;
  3156. DestBlend=ONE;
  3157. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3158. DitherEnable=FALSE;
  3159. ZEnable=FALSE;
  3160. CullMode=NONE;
  3161. ALPHATESTENABLE=FALSE;
  3162. SEPARATEALPHABLENDENABLE=FALSE;
  3163. StencilEnable=FALSE;
  3164. FogEnable=FALSE;
  3165. SRGBWRITEENABLE=FALSE;
  3166. }
  3167. pass P38
  3168. {
  3169. VertexShader = compile vs_3_0 VS_Thirdary(f39_LensOffset, (f39_LensScale * f39_LensFactor));
  3170. PixelShader = compile ps_3_0 PS_Thirdary(f39_LensColor, f39_ColorMultiplier);
  3171. AlphaBlendEnable=TRUE;
  3172. SrcBlend=ONE;
  3173. DestBlend=ONE;
  3174. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3175. DitherEnable=FALSE;
  3176. ZEnable=FALSE;
  3177. CullMode=NONE;
  3178. ALPHATESTENABLE=FALSE;
  3179. SEPARATEALPHABLENDENABLE=FALSE;
  3180. StencilEnable=FALSE;
  3181. FogEnable=FALSE;
  3182. SRGBWRITEENABLE=FALSE;
  3183. }
  3184. pass P39
  3185. {
  3186. VertexShader = compile vs_3_0 VS_Thirdary(f40_LensOffset, (f40_LensScale * f40_LensFactor));
  3187. PixelShader = compile ps_3_0 PS_Thirdary(f40_LensColor, f40_ColorMultiplier);
  3188. AlphaBlendEnable=TRUE;
  3189. SrcBlend=ONE;
  3190. DestBlend=ONE;
  3191. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3192. DitherEnable=FALSE;
  3193. ZEnable=FALSE;
  3194. CullMode=NONE;
  3195. ALPHATESTENABLE=FALSE;
  3196. SEPARATEALPHABLENDENABLE=FALSE;
  3197. StencilEnable=FALSE;
  3198. FogEnable=FALSE;
  3199. SRGBWRITEENABLE=FALSE;
  3200. }
  3201. pass P40
  3202. {
  3203. VertexShader = compile vs_3_0 VS_Thirdary(f41_LensOffset, (f41_LensScale * f41_LensFactor));
  3204. PixelShader = compile ps_3_0 PS_Thirdary(f41_LensColor, f41_ColorMultiplier);
  3205. AlphaBlendEnable=TRUE;
  3206. SrcBlend=ONE;
  3207. DestBlend=ONE;
  3208. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3209. DitherEnable=FALSE;
  3210. ZEnable=FALSE;
  3211. CullMode=NONE;
  3212. ALPHATESTENABLE=FALSE;
  3213. SEPARATEALPHABLENDENABLE=FALSE;
  3214. StencilEnable=FALSE;
  3215. FogEnable=FALSE;
  3216. SRGBWRITEENABLE=FALSE;
  3217. }
  3218. pass P41
  3219. {
  3220. VertexShader = compile vs_3_0 VS_Thirdary(f42_LensOffset, (f42_LensScale * f42_LensFactor));
  3221. PixelShader = compile ps_3_0 PS_Thirdary(f42_LensColor, f42_ColorMultiplier);
  3222. AlphaBlendEnable=TRUE;
  3223. SrcBlend=ONE;
  3224. DestBlend=ONE;
  3225. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3226. DitherEnable=FALSE;
  3227. ZEnable=FALSE;
  3228. CullMode=NONE;
  3229. ALPHATESTENABLE=FALSE;
  3230. SEPARATEALPHABLENDENABLE=FALSE;
  3231. StencilEnable=FALSE;
  3232. FogEnable=FALSE;
  3233. SRGBWRITEENABLE=FALSE;
  3234. }
  3235. pass P42
  3236. {
  3237. VertexShader = compile vs_3_0 VS_Thirdary(f43_LensOffset, (f43_LensScale * f43_LensFactor));
  3238. PixelShader = compile ps_3_0 PS_Thirdary(f43_LensColor, f43_ColorMultiplier);
  3239. AlphaBlendEnable=TRUE;
  3240. SrcBlend=ONE;
  3241. DestBlend=ONE;
  3242. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3243. DitherEnable=FALSE;
  3244. ZEnable=FALSE;
  3245. CullMode=NONE;
  3246. ALPHATESTENABLE=FALSE;
  3247. SEPARATEALPHABLENDENABLE=FALSE;
  3248. StencilEnable=FALSE;
  3249. FogEnable=FALSE;
  3250. SRGBWRITEENABLE=FALSE;
  3251. }
  3252. pass P43
  3253. {
  3254. VertexShader = compile vs_3_0 VS_Thirdary(f44_LensOffset, (f44_LensScale * f44_LensFactor));
  3255. PixelShader = compile ps_3_0 PS_Thirdary(f44_LensColor, f44_ColorMultiplier);
  3256. AlphaBlendEnable=TRUE;
  3257. SrcBlend=ONE;
  3258. DestBlend=ONE;
  3259. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3260. DitherEnable=FALSE;
  3261. ZEnable=FALSE;
  3262. CullMode=NONE;
  3263. ALPHATESTENABLE=FALSE;
  3264. SEPARATEALPHABLENDENABLE=FALSE;
  3265. StencilEnable=FALSE;
  3266. FogEnable=FALSE;
  3267. SRGBWRITEENABLE=FALSE;
  3268. }
  3269. pass P44
  3270. {
  3271. VertexShader = compile vs_3_0 VS_Thirdary(f45_LensOffset, (f45_LensScale * f45_LensFactor));
  3272. PixelShader = compile ps_3_0 PS_Thirdary(f45_LensColor, f45_ColorMultiplier);
  3273. AlphaBlendEnable=TRUE;
  3274. SrcBlend=ONE;
  3275. DestBlend=ONE;
  3276. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3277. DitherEnable=FALSE;
  3278. ZEnable=FALSE;
  3279. CullMode=NONE;
  3280. ALPHATESTENABLE=FALSE;
  3281. SEPARATEALPHABLENDENABLE=FALSE;
  3282. StencilEnable=FALSE;
  3283. FogEnable=FALSE;
  3284. SRGBWRITEENABLE=FALSE;
  3285. }
  3286. pass P45
  3287. {
  3288. VertexShader = compile vs_3_0 VS_Thirdary(f46_LensOffset, (f46_LensScale * f46_LensFactor));
  3289. PixelShader = compile ps_3_0 PS_Thirdary(f46_LensColor, f46_ColorMultiplier);
  3290. AlphaBlendEnable=TRUE;
  3291. SrcBlend=ONE;
  3292. DestBlend=ONE;
  3293. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3294. DitherEnable=FALSE;
  3295. ZEnable=FALSE;
  3296. CullMode=NONE;
  3297. ALPHATESTENABLE=FALSE;
  3298. SEPARATEALPHABLENDENABLE=FALSE;
  3299. StencilEnable=FALSE;
  3300. FogEnable=FALSE;
  3301. SRGBWRITEENABLE=FALSE;
  3302. }
  3303. pass P46
  3304. {
  3305. VertexShader = compile vs_3_0 VS_Thirdary(f47_LensOffset, (f47_LensScale * f47_LensFactor));
  3306. PixelShader = compile ps_3_0 PS_Thirdary(f47_LensColor, f47_ColorMultiplier);
  3307. AlphaBlendEnable=TRUE;
  3308. SrcBlend=ONE;
  3309. DestBlend=ONE;
  3310. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3311. DitherEnable=FALSE;
  3312. ZEnable=FALSE;
  3313. CullMode=NONE;
  3314. ALPHATESTENABLE=FALSE;
  3315. SEPARATEALPHABLENDENABLE=FALSE;
  3316. StencilEnable=FALSE;
  3317. FogEnable=FALSE;
  3318. SRGBWRITEENABLE=FALSE;
  3319. }
  3320. #endif
  3321. //Add or Remove passes here, then renumber passes below
  3322. #if (USE_THIRDARY_2 == 1)
  3323. pass P47
  3324. {
  3325. VertexShader = compile vs_3_0 VS_Thirdary_2(f48_LensOffset, (f48_LensScale * f48_LensFactor));
  3326. PixelShader = compile ps_3_0 PS_Thirdary_2(f48_LensColor, f48_ColorMultiplier);
  3327. AlphaBlendEnable=TRUE;
  3328. SrcBlend=ONE;
  3329. DestBlend=ONE;
  3330. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3331. DitherEnable=FALSE;
  3332. ZEnable=FALSE;
  3333. CullMode=NONE;
  3334. ALPHATESTENABLE=FALSE;
  3335. SEPARATEALPHABLENDENABLE=FALSE;
  3336. StencilEnable=FALSE;
  3337. FogEnable=FALSE;
  3338. SRGBWRITEENABLE=FALSE;
  3339. }
  3340. pass P48
  3341. {
  3342. VertexShader = compile vs_3_0 VS_Thirdary_2(f49_LensOffset, (f49_LensScale * f49_LensFactor));
  3343. PixelShader = compile ps_3_0 PS_Thirdary_2(f49_LensColor, f49_ColorMultiplier);
  3344. AlphaBlendEnable=TRUE;
  3345. SrcBlend=ONE;
  3346. DestBlend=ONE;
  3347. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3348. DitherEnable=FALSE;
  3349. ZEnable=FALSE;
  3350. CullMode=NONE;
  3351. ALPHATESTENABLE=FALSE;
  3352. SEPARATEALPHABLENDENABLE=FALSE;
  3353. StencilEnable=FALSE;
  3354. FogEnable=FALSE;
  3355. SRGBWRITEENABLE=FALSE;
  3356. }
  3357. pass P49
  3358. {
  3359. VertexShader = compile vs_3_0 VS_Thirdary_2(f50_LensOffset, (f50_LensScale * f50_LensFactor));
  3360. PixelShader = compile ps_3_0 PS_Thirdary_2(f50_LensColor, f50_ColorMultiplier);
  3361. AlphaBlendEnable=TRUE;
  3362. SrcBlend=ONE;
  3363. DestBlend=ONE;
  3364. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3365. DitherEnable=FALSE;
  3366. ZEnable=FALSE;
  3367. CullMode=NONE;
  3368. ALPHATESTENABLE=FALSE;
  3369. SEPARATEALPHABLENDENABLE=FALSE;
  3370. StencilEnable=FALSE;
  3371. FogEnable=FALSE;
  3372. SRGBWRITEENABLE=FALSE;
  3373. }
  3374. pass P50
  3375. {
  3376. VertexShader = compile vs_3_0 VS_Thirdary_2(f51_LensOffset, (f51_LensScale * f51_LensFactor));
  3377. PixelShader = compile ps_3_0 PS_Thirdary_2(f51_LensColor, f51_ColorMultiplier);
  3378. AlphaBlendEnable=TRUE;
  3379. SrcBlend=ONE;
  3380. DestBlend=ONE;
  3381. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3382. DitherEnable=FALSE;
  3383. ZEnable=FALSE;
  3384. CullMode=NONE;
  3385. ALPHATESTENABLE=FALSE;
  3386. SEPARATEALPHABLENDENABLE=FALSE;
  3387. StencilEnable=FALSE;
  3388. FogEnable=FALSE;
  3389. SRGBWRITEENABLE=FALSE;
  3390. }
  3391. pass P51
  3392. {
  3393. VertexShader = compile vs_3_0 VS_Thirdary_2(f52_LensOffset, (f52_LensScale * f52_LensFactor));
  3394. PixelShader = compile ps_3_0 PS_Thirdary_2(f52_LensColor, f52_ColorMultiplier);
  3395. AlphaBlendEnable=TRUE;
  3396. SrcBlend=ONE;
  3397. DestBlend=ONE;
  3398. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3399. DitherEnable=FALSE;
  3400. ZEnable=FALSE;
  3401. CullMode=NONE;
  3402. ALPHATESTENABLE=FALSE;
  3403. SEPARATEALPHABLENDENABLE=FALSE;
  3404. StencilEnable=FALSE;
  3405. FogEnable=FALSE;
  3406. SRGBWRITEENABLE=FALSE;
  3407. }
  3408. pass P52
  3409. {
  3410. VertexShader = compile vs_3_0 VS_Thirdary_2(f53_LensOffset, (f53_LensScale * f53_LensFactor));
  3411. PixelShader = compile ps_3_0 PS_Thirdary_2(f53_LensColor, f53_ColorMultiplier);
  3412. AlphaBlendEnable=TRUE;
  3413. SrcBlend=ONE;
  3414. DestBlend=ONE;
  3415. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3416. DitherEnable=FALSE;
  3417. ZEnable=FALSE;
  3418. CullMode=NONE;
  3419. ALPHATESTENABLE=FALSE;
  3420. SEPARATEALPHABLENDENABLE=FALSE;
  3421. StencilEnable=FALSE;
  3422. FogEnable=FALSE;
  3423. SRGBWRITEENABLE=FALSE;
  3424. }
  3425. pass P53
  3426. {
  3427. VertexShader = compile vs_3_0 VS_Thirdary_2(f54_LensOffset, (f54_LensScale * f54_LensFactor));
  3428. PixelShader = compile ps_3_0 PS_Thirdary_2(f54_LensColor, f54_ColorMultiplier);
  3429. AlphaBlendEnable=TRUE;
  3430. SrcBlend=ONE;
  3431. DestBlend=ONE;
  3432. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3433. DitherEnable=FALSE;
  3434. ZEnable=FALSE;
  3435. CullMode=NONE;
  3436. ALPHATESTENABLE=FALSE;
  3437. SEPARATEALPHABLENDENABLE=FALSE;
  3438. StencilEnable=FALSE;
  3439. FogEnable=FALSE;
  3440. SRGBWRITEENABLE=FALSE;
  3441. }
  3442. pass P54
  3443. {
  3444. VertexShader = compile vs_3_0 VS_Thirdary_2(f55_LensOffset, (f55_LensScale * f55_LensFactor));
  3445. PixelShader = compile ps_3_0 PS_Thirdary_2(f55_LensColor, f55_ColorMultiplier);
  3446. AlphaBlendEnable=TRUE;
  3447. SrcBlend=ONE;
  3448. DestBlend=ONE;
  3449. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3450. DitherEnable=FALSE;
  3451. ZEnable=FALSE;
  3452. CullMode=NONE;
  3453. ALPHATESTENABLE=FALSE;
  3454. SEPARATEALPHABLENDENABLE=FALSE;
  3455. StencilEnable=FALSE;
  3456. FogEnable=FALSE;
  3457. SRGBWRITEENABLE=FALSE;
  3458. }
  3459. pass P55
  3460. {
  3461. VertexShader = compile vs_3_0 VS_Thirdary_2(f56_LensOffset, (f56_LensScale * f56_LensFactor));
  3462. PixelShader = compile ps_3_0 PS_Thirdary_2(f56_LensColor, f56_ColorMultiplier);
  3463. AlphaBlendEnable=TRUE;
  3464. SrcBlend=ONE;
  3465. DestBlend=ONE;
  3466. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3467. DitherEnable=FALSE;
  3468. ZEnable=FALSE;
  3469. CullMode=NONE;
  3470. ALPHATESTENABLE=FALSE;
  3471. SEPARATEALPHABLENDENABLE=FALSE;
  3472. StencilEnable=FALSE;
  3473. FogEnable=FALSE;
  3474. SRGBWRITEENABLE=FALSE;
  3475. }
  3476. pass P56
  3477. {
  3478. VertexShader = compile vs_3_0 VS_Thirdary_2(f57_LensOffset, (f57_LensScale * f57_LensFactor));
  3479. PixelShader = compile ps_3_0 PS_Thirdary_2(f57_LensColor, f57_ColorMultiplier);
  3480. AlphaBlendEnable=TRUE;
  3481. SrcBlend=ONE;
  3482. DestBlend=ONE;
  3483. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3484. DitherEnable=FALSE;
  3485. ZEnable=FALSE;
  3486. CullMode=NONE;
  3487. ALPHATESTENABLE=FALSE;
  3488. SEPARATEALPHABLENDENABLE=FALSE;
  3489. StencilEnable=FALSE;
  3490. FogEnable=FALSE;
  3491. SRGBWRITEENABLE=FALSE;
  3492. }
  3493. pass P57
  3494. {
  3495. VertexShader = compile vs_3_0 VS_Thirdary_2(f58_LensOffset, (f58_LensScale * f58_LensFactor));
  3496. PixelShader = compile ps_3_0 PS_Thirdary_2(f58_LensColor, f58_ColorMultiplier);
  3497. AlphaBlendEnable=TRUE;
  3498. SrcBlend=ONE;
  3499. DestBlend=ONE;
  3500. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3501. DitherEnable=FALSE;
  3502. ZEnable=FALSE;
  3503. CullMode=NONE;
  3504. ALPHATESTENABLE=FALSE;
  3505. SEPARATEALPHABLENDENABLE=FALSE;
  3506. StencilEnable=FALSE;
  3507. FogEnable=FALSE;
  3508. SRGBWRITEENABLE=FALSE;
  3509. }
  3510. #endif
  3511. //Add or Remove passes here, then renumber passes below
  3512. #if (USE_PRIMARY_ALT == 1)
  3513. pass P58
  3514. {
  3515. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3516. VertexShader = compile vs_3_0 VS_Primary_Alt(f59_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens59)* 2.0 - 1.0), (f59_LensScale * f59_LensFactor));
  3517. #else
  3518. VertexShader = compile vs_3_0 VS_Primary_Alt(f59_LensOffset, (f59_LensScale * f59_LensFactor));
  3519. #endif
  3520. PixelShader = compile ps_3_0 PS_Primary_Alt(f59_LensColor, f59_ColorMultiplier);
  3521. AlphaBlendEnable=TRUE;
  3522. SrcBlend=ONE;
  3523. DestBlend=ONE;
  3524. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3525. DitherEnable=FALSE;
  3526. ZEnable=FALSE;
  3527. CullMode=NONE;
  3528. ALPHATESTENABLE=FALSE;
  3529. SEPARATEALPHABLENDENABLE=FALSE;
  3530. StencilEnable=FALSE;
  3531. FogEnable=FALSE;
  3532. SRGBWRITEENABLE=FALSE;
  3533. }
  3534. pass P59
  3535. {
  3536. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3537. VertexShader = compile vs_3_0 VS_Primary_Alt(f60_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens60)* 2.0 - 1.0), (f60_LensScale * f60_LensFactor));
  3538. #else
  3539. VertexShader = compile vs_3_0 VS_Primary_Alt(f60_LensOffset, (f60_LensScale * f60_LensFactor));
  3540. #endif
  3541. PixelShader = compile ps_3_0 PS_Primary_Alt(f60_LensColor, f60_ColorMultiplier);
  3542. AlphaBlendEnable=TRUE;
  3543. SrcBlend=ONE;
  3544. DestBlend=ONE;
  3545. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3546. DitherEnable=FALSE;
  3547. ZEnable=FALSE;
  3548. CullMode=NONE;
  3549. ALPHATESTENABLE=FALSE;
  3550. SEPARATEALPHABLENDENABLE=FALSE;
  3551. StencilEnable=FALSE;
  3552. FogEnable=FALSE;
  3553. SRGBWRITEENABLE=FALSE;
  3554. }
  3555. pass P60
  3556. {
  3557. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3558. VertexShader = compile vs_3_0 VS_Primary_Alt(f61_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens61)* 2.0 - 1.0), (f61_LensScale * f61_LensFactor));
  3559. #else
  3560. VertexShader = compile vs_3_0 VS_Primary_Alt(f61_LensOffset, (f61_LensScale * f61_LensFactor));
  3561. #endif
  3562. PixelShader = compile ps_3_0 PS_Primary_Alt(f61_LensColor, f61_ColorMultiplier);
  3563. AlphaBlendEnable=TRUE;
  3564. SrcBlend=ONE;
  3565. DestBlend=ONE;
  3566. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3567. DitherEnable=FALSE;
  3568. ZEnable=FALSE;
  3569. CullMode=NONE;
  3570. ALPHATESTENABLE=FALSE;
  3571. SEPARATEALPHABLENDENABLE=FALSE;
  3572. StencilEnable=FALSE;
  3573. FogEnable=FALSE;
  3574. SRGBWRITEENABLE=FALSE;
  3575. }
  3576. pass P61
  3577. {
  3578. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3579. VertexShader = compile vs_3_0 VS_Primary_Alt(f62_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens62)* 2.0 - 1.0), (f62_LensScale * f62_LensFactor));
  3580. #else
  3581. VertexShader = compile vs_3_0 VS_Primary_Alt(f62_LensOffset, (f62_LensScale * f62_LensFactor));
  3582. #endif
  3583. PixelShader = compile ps_3_0 PS_Primary_Alt(f62_LensColor, f62_ColorMultiplier);
  3584. AlphaBlendEnable=TRUE;
  3585. SrcBlend=ONE;
  3586. DestBlend=ONE;
  3587. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3588. DitherEnable=FALSE;
  3589. ZEnable=FALSE;
  3590. CullMode=NONE;
  3591. ALPHATESTENABLE=FALSE;
  3592. SEPARATEALPHABLENDENABLE=FALSE;
  3593. StencilEnable=FALSE;
  3594. FogEnable=FALSE;
  3595. SRGBWRITEENABLE=FALSE;
  3596. }
  3597. pass P62
  3598. {
  3599. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3600. VertexShader = compile vs_3_0 VS_Primary_Alt(f63_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens63)* 2.0 - 1.0), (f63_LensScale * f63_LensFactor));
  3601. #else
  3602. VertexShader = compile vs_3_0 VS_Primary_Alt(f63_LensOffset, (f63_LensScale * f63_LensFactor));
  3603. #endif
  3604. PixelShader = compile ps_3_0 PS_Primary_Alt(f63_LensColor, f63_ColorMultiplier);
  3605. AlphaBlendEnable=TRUE;
  3606. SrcBlend=ONE;
  3607. DestBlend=ONE;
  3608. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3609. DitherEnable=FALSE;
  3610. ZEnable=FALSE;
  3611. CullMode=NONE;
  3612. ALPHATESTENABLE=FALSE;
  3613. SEPARATEALPHABLENDENABLE=FALSE;
  3614. StencilEnable=FALSE;
  3615. FogEnable=FALSE;
  3616. SRGBWRITEENABLE=FALSE;
  3617. }
  3618. pass P63
  3619. {
  3620. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3621. VertexShader = compile vs_3_0 VS_Primary_Alt(f64_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens64)* 2.0 - 1.0), (f64_LensScale * f64_LensFactor));
  3622. #else
  3623. VertexShader = compile vs_3_0 VS_Primary_Alt(f64_LensOffset, (f64_LensScale * f64_LensFactor));
  3624. #endif
  3625. PixelShader = compile ps_3_0 PS_Primary_Alt(f64_LensColor, f64_ColorMultiplier);
  3626. AlphaBlendEnable=TRUE;
  3627. SrcBlend=ONE;
  3628. DestBlend=ONE;
  3629. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3630. DitherEnable=FALSE;
  3631. ZEnable=FALSE;
  3632. CullMode=NONE;
  3633. ALPHATESTENABLE=FALSE;
  3634. SEPARATEALPHABLENDENABLE=FALSE;
  3635. StencilEnable=FALSE;
  3636. FogEnable=FALSE;
  3637. SRGBWRITEENABLE=FALSE;
  3638. }
  3639. pass P64
  3640. {
  3641. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3642. VertexShader = compile vs_3_0 VS_Primary_Alt(f65_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens65)* 2.0 - 1.0), (f65_LensScale * f65_LensFactor));
  3643. #else
  3644. VertexShader = compile vs_3_0 VS_Primary_Alt(f65_LensOffset, (f65_LensScale * f65_LensFactor));
  3645. #endif
  3646. PixelShader = compile ps_3_0 PS_Primary_Alt(f65_LensColor, f65_ColorMultiplier);
  3647. AlphaBlendEnable=TRUE;
  3648. SrcBlend=ONE;
  3649. DestBlend=ONE;
  3650. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3651. DitherEnable=FALSE;
  3652. ZEnable=FALSE;
  3653. CullMode=NONE;
  3654. ALPHATESTENABLE=FALSE;
  3655. SEPARATEALPHABLENDENABLE=FALSE;
  3656. StencilEnable=FALSE;
  3657. FogEnable=FALSE;
  3658. SRGBWRITEENABLE=FALSE;
  3659. }
  3660. pass P65
  3661. {
  3662. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3663. VertexShader = compile vs_3_0 VS_Primary_Alt(f66_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens66)* 2.0 - 1.0), (f66_LensScale * f66_LensFactor));
  3664. #else
  3665. VertexShader = compile vs_3_0 VS_Primary_Alt(f66_LensOffset, (f66_LensScale * f66_LensFactor));
  3666. #endif
  3667. PixelShader = compile ps_3_0 PS_Primary_Alt(f66_LensColor, f66_ColorMultiplier);
  3668. AlphaBlendEnable=TRUE;
  3669. SrcBlend=ONE;
  3670. DestBlend=ONE;
  3671. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3672. DitherEnable=FALSE;
  3673. ZEnable=FALSE;
  3674. CullMode=NONE;
  3675. ALPHATESTENABLE=FALSE;
  3676. SEPARATEALPHABLENDENABLE=FALSE;
  3677. StencilEnable=FALSE;
  3678. FogEnable=FALSE;
  3679. SRGBWRITEENABLE=FALSE;
  3680. }
  3681. pass P66
  3682. {
  3683. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3684. VertexShader = compile vs_3_0 VS_Primary_Alt(f67_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens67)* 2.0 - 1.0), (f67_LensScale * f67_LensFactor));
  3685. #else
  3686. VertexShader = compile vs_3_0 VS_Primary_Alt(f67_LensOffset, (f67_LensScale * f67_LensFactor));
  3687. #endif
  3688. PixelShader = compile ps_3_0 PS_Primary_Alt(f67_LensColor, f67_ColorMultiplier);
  3689. AlphaBlendEnable=TRUE;
  3690. SrcBlend=ONE;
  3691. DestBlend=ONE;
  3692. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3693. DitherEnable=FALSE;
  3694. ZEnable=FALSE;
  3695. CullMode=NONE;
  3696. ALPHATESTENABLE=FALSE;
  3697. SEPARATEALPHABLENDENABLE=FALSE;
  3698. StencilEnable=FALSE;
  3699. FogEnable=FALSE;
  3700. SRGBWRITEENABLE=FALSE;
  3701. }
  3702. pass P67
  3703. {
  3704. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3705. VertexShader = compile vs_3_0 VS_Primary_Alt(f68_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens68)* 2.0 - 1.0), (f68_LensScale * f68_LensFactor));
  3706. #else
  3707. VertexShader = compile vs_3_0 VS_Primary_Alt(f68_LensOffset, (f68_LensScale * f68_LensFactor));
  3708. #endif
  3709. PixelShader = compile ps_3_0 PS_Primary_Alt(f68_LensColor, f68_ColorMultiplier);
  3710. AlphaBlendEnable=TRUE;
  3711. SrcBlend=ONE;
  3712. DestBlend=ONE;
  3713. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3714. DitherEnable=FALSE;
  3715. ZEnable=FALSE;
  3716. CullMode=NONE;
  3717. ALPHATESTENABLE=FALSE;
  3718. SEPARATEALPHABLENDENABLE=FALSE;
  3719. StencilEnable=FALSE;
  3720. FogEnable=FALSE;
  3721. SRGBWRITEENABLE=FALSE;
  3722. }
  3723. pass P68
  3724. {
  3725. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3726. VertexShader = compile vs_3_0 VS_Primary_Alt(f69_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens69)* 2.0 - 1.0), (f69_LensScale * f69_LensFactor));
  3727. #else
  3728. VertexShader = compile vs_3_0 VS_Primary_Alt(f69_LensOffset, (f69_LensScale * f69_LensFactor));
  3729. #endif
  3730. PixelShader = compile ps_3_0 PS_Primary_Alt(f69_LensColor, f69_ColorMultiplier);
  3731. AlphaBlendEnable=TRUE;
  3732. SrcBlend=ONE;
  3733. DestBlend=ONE;
  3734. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3735. DitherEnable=FALSE;
  3736. ZEnable=FALSE;
  3737. CullMode=NONE;
  3738. ALPHATESTENABLE=FALSE;
  3739. SEPARATEALPHABLENDENABLE=FALSE;
  3740. StencilEnable=FALSE;
  3741. FogEnable=FALSE;
  3742. SRGBWRITEENABLE=FALSE;
  3743. }
  3744. pass P69
  3745. {
  3746. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3747. VertexShader = compile vs_3_0 VS_Primary_Alt(f70_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens70)* 2.0 - 1.0), (f70_LensScale * f70_LensFactor));
  3748. #else
  3749. VertexShader = compile vs_3_0 VS_Primary_Alt(f70_LensOffset, (f70_LensScale * f70_LensFactor));
  3750. #endif
  3751. PixelShader = compile ps_3_0 PS_Primary_Alt(f70_LensColor, f70_ColorMultiplier);
  3752. AlphaBlendEnable=TRUE;
  3753. SrcBlend=ONE;
  3754. DestBlend=ONE;
  3755. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3756. DitherEnable=FALSE;
  3757. ZEnable=FALSE;
  3758. CullMode=NONE;
  3759. ALPHATESTENABLE=FALSE;
  3760. SEPARATEALPHABLENDENABLE=FALSE;
  3761. StencilEnable=FALSE;
  3762. FogEnable=FALSE;
  3763. SRGBWRITEENABLE=FALSE;
  3764. }
  3765. pass P70
  3766. {
  3767. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3768. VertexShader = compile vs_3_0 VS_Primary_Alt(f71_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens71)* 2.0 - 1.0), (f71_LensScale * f71_LensFactor));
  3769. #else
  3770. VertexShader = compile vs_3_0 VS_Primary_Alt(f71_LensOffset, (f71_LensScale * f71_LensFactor));
  3771. #endif
  3772. PixelShader = compile ps_3_0 PS_Primary_Alt(f71_LensColor, f71_ColorMultiplier);
  3773. AlphaBlendEnable=TRUE;
  3774. SrcBlend=ONE;
  3775. DestBlend=ONE;
  3776. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3777. DitherEnable=FALSE;
  3778. ZEnable=FALSE;
  3779. CullMode=NONE;
  3780. ALPHATESTENABLE=FALSE;
  3781. SEPARATEALPHABLENDENABLE=FALSE;
  3782. StencilEnable=FALSE;
  3783. FogEnable=FALSE;
  3784. SRGBWRITEENABLE=FALSE;
  3785. }
  3786. pass P71
  3787. {
  3788. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3789. VertexShader = compile vs_3_0 VS_Primary_Alt(f72_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens72)* 2.0 - 1.0), (f72_LensScale * f72_LensFactor));
  3790. #else
  3791. VertexShader = compile vs_3_0 VS_Primary_Alt(f72_LensOffset, (f72_LensScale * f72_LensFactor));
  3792. #endif
  3793. PixelShader = compile ps_3_0 PS_Primary_Alt(f72_LensColor, f72_ColorMultiplier);
  3794. AlphaBlendEnable=TRUE;
  3795. SrcBlend=ONE;
  3796. DestBlend=ONE;
  3797. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3798. DitherEnable=FALSE;
  3799. ZEnable=FALSE;
  3800. CullMode=NONE;
  3801. ALPHATESTENABLE=FALSE;
  3802. SEPARATEALPHABLENDENABLE=FALSE;
  3803. StencilEnable=FALSE;
  3804. FogEnable=FALSE;
  3805. SRGBWRITEENABLE=FALSE;
  3806. }
  3807. pass P72
  3808. {
  3809. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3810. VertexShader = compile vs_3_0 VS_Primary_Alt(f73_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens73)* 2.0 - 1.0), (f73_LensScale * f73_LensFactor));
  3811. #else
  3812. VertexShader = compile vs_3_0 VS_Primary_Alt(f73_LensOffset, (f73_LensScale * f73_LensFactor));
  3813. #endif
  3814. PixelShader = compile ps_3_0 PS_Primary_Alt(f73_LensColor, f73_ColorMultiplier);
  3815. AlphaBlendEnable=TRUE;
  3816. SrcBlend=ONE;
  3817. DestBlend=ONE;
  3818. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3819. DitherEnable=FALSE;
  3820. ZEnable=FALSE;
  3821. CullMode=NONE;
  3822. ALPHATESTENABLE=FALSE;
  3823. SEPARATEALPHABLENDENABLE=FALSE;
  3824. StencilEnable=FALSE;
  3825. FogEnable=FALSE;
  3826. SRGBWRITEENABLE=FALSE;
  3827. }
  3828. pass P73
  3829. {
  3830. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3831. VertexShader = compile vs_3_0 VS_Primary_Alt(f74_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens74)* 2.0 - 1.0), (f74_LensScale * f74_LensFactor));
  3832. #else
  3833. VertexShader = compile vs_3_0 VS_Primary_Alt(f74_LensOffset, (f74_LensScale * f74_LensFactor));
  3834. #endif
  3835. PixelShader = compile ps_3_0 PS_Primary_Alt(f74_LensColor, f74_ColorMultiplier);
  3836. AlphaBlendEnable=TRUE;
  3837. SrcBlend=ONE;
  3838. DestBlend=ONE;
  3839. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3840. DitherEnable=FALSE;
  3841. ZEnable=FALSE;
  3842. CullMode=NONE;
  3843. ALPHATESTENABLE=FALSE;
  3844. SEPARATEALPHABLENDENABLE=FALSE;
  3845. StencilEnable=FALSE;
  3846. FogEnable=FALSE;
  3847. SRGBWRITEENABLE=FALSE;
  3848. }
  3849. pass P74
  3850. {
  3851. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3852. VertexShader = compile vs_3_0 VS_Primary_Alt(f75_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens75)* 2.0 - 1.0), (f75_LensScale * f75_LensFactor));
  3853. #else
  3854. VertexShader = compile vs_3_0 VS_Primary_Alt(f75_LensOffset, (f75_LensScale * f75_LensFactor));
  3855. #endif
  3856. PixelShader = compile ps_3_0 PS_Primary_Alt(f75_LensColor, f75_ColorMultiplier);
  3857. AlphaBlendEnable=TRUE;
  3858. SrcBlend=ONE;
  3859. DestBlend=ONE;
  3860. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3861. DitherEnable=FALSE;
  3862. ZEnable=FALSE;
  3863. CullMode=NONE;
  3864. ALPHATESTENABLE=FALSE;
  3865. SEPARATEALPHABLENDENABLE=FALSE;
  3866. StencilEnable=FALSE;
  3867. FogEnable=FALSE;
  3868. SRGBWRITEENABLE=FALSE;
  3869. }
  3870. pass P75
  3871. {
  3872. #if (USE_LENSMOTION_PRIMARY_ALT == 1)
  3873. VertexShader = compile vs_3_0 VS_Primary_Alt(f76_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens76)* 2.0 - 1.0), (f76_LensScale * f76_LensFactor));
  3874. #else
  3875. VertexShader = compile vs_3_0 VS_Primary_Alt(f76_LensOffset, (f76_LensScale * f76_LensFactor));
  3876. #endif
  3877. PixelShader = compile ps_3_0 PS_Primary_Alt(f76_LensColor, f76_ColorMultiplier);
  3878. AlphaBlendEnable=TRUE;
  3879. SrcBlend=ONE;
  3880. DestBlend=ONE;
  3881. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3882. DitherEnable=FALSE;
  3883. ZEnable=FALSE;
  3884. CullMode=NONE;
  3885. ALPHATESTENABLE=FALSE;
  3886. SEPARATEALPHABLENDENABLE=FALSE;
  3887. StencilEnable=FALSE;
  3888. FogEnable=FALSE;
  3889. SRGBWRITEENABLE=FALSE;
  3890. }
  3891. #endif
  3892. //Add or Remove passes here, then renumber passes below
  3893. #if (USE_PRIMARY_ALT_2 == 1)
  3894. pass P76
  3895. {
  3896. #if (USE_LENSMOTION_PRIMARY_ALT_2 == 1)
  3897. VertexShader = compile vs_3_0 VS_Primary_Alt_2(f77_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens77)* 2.0 - 1.0), (f77_LensScale * f77_LensFactor));
  3898. #else
  3899. VertexShader = compile vs_3_0 VS_Primary_Alt_2(f77_LensOffset, (f77_LensScale * f77_LensFactor));
  3900. #endif
  3901. PixelShader = compile ps_3_0 PS_Primary_Alt_2(f77_LensColor, f77_ColorMultiplier);
  3902. AlphaBlendEnable=TRUE;
  3903. SrcBlend=ONE;
  3904. DestBlend=ONE;
  3905. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3906. DitherEnable=FALSE;
  3907. ZEnable=FALSE;
  3908. CullMode=NONE;
  3909. ALPHATESTENABLE=FALSE;
  3910. SEPARATEALPHABLENDENABLE=FALSE;
  3911. StencilEnable=FALSE;
  3912. FogEnable=FALSE;
  3913. SRGBWRITEENABLE=FALSE;
  3914. }
  3915. pass P77
  3916. {
  3917. #if (USE_LENSMOTION_PRIMARY_ALT_2 == 1)
  3918. VertexShader = compile vs_3_0 VS_Primary_Alt_2(f78_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens78)* 2.0 - 1.0), (f78_LensScale * f78_LensFactor));
  3919. #else
  3920. VertexShader = compile vs_3_0 VS_Primary_Alt_2(f78_LensOffset, (f78_LensScale * f78_LensFactor));
  3921. #endif
  3922. PixelShader = compile ps_3_0 PS_Primary_Alt_2(f78_LensColor, f78_ColorMultiplier);
  3923. AlphaBlendEnable=TRUE;
  3924. SrcBlend=ONE;
  3925. DestBlend=ONE;
  3926. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3927. DitherEnable=FALSE;
  3928. ZEnable=FALSE;
  3929. CullMode=NONE;
  3930. ALPHATESTENABLE=FALSE;
  3931. SEPARATEALPHABLENDENABLE=FALSE;
  3932. StencilEnable=FALSE;
  3933. FogEnable=FALSE;
  3934. SRGBWRITEENABLE=FALSE;
  3935. }
  3936. pass P78
  3937. {
  3938. #if (USE_LENSMOTION_PRIMARY_ALT_2 == 1)
  3939. VertexShader = compile vs_3_0 VS_Primary_Alt_2(f79_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens79)* 2.0 - 1.0), (f79_LensScale * f79_LensFactor));
  3940. #else
  3941. VertexShader = compile vs_3_0 VS_Primary_Alt_2(f79_LensOffset, (f79_LensScale * f79_LensFactor));
  3942. #endif
  3943. PixelShader = compile ps_3_0 PS_Primary_Alt_2(f79_LensColor, f79_ColorMultiplier);
  3944. AlphaBlendEnable=TRUE;
  3945. SrcBlend=ONE;
  3946. DestBlend=ONE;
  3947. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3948. DitherEnable=FALSE;
  3949. ZEnable=FALSE;
  3950. CullMode=NONE;
  3951. ALPHATESTENABLE=FALSE;
  3952. SEPARATEALPHABLENDENABLE=FALSE;
  3953. StencilEnable=FALSE;
  3954. FogEnable=FALSE;
  3955. SRGBWRITEENABLE=FALSE;
  3956. }
  3957. pass P79
  3958. {
  3959. #if (USE_LENSMOTION_PRIMARY_ALT_2 == 1)
  3960. VertexShader = compile vs_3_0 VS_Primary_Alt_2(f80_LensOffset + abs(frac(Timer.x * fMotionVelocity_Lens80)* 2.0 - 1.0), (f80_LensScale * f80_LensFactor));
  3961. #else
  3962. VertexShader = compile vs_3_0 VS_Primary_Alt_2(f80_LensOffset, (f80_LensScale * f80_LensFactor));
  3963. #endif
  3964. PixelShader = compile ps_3_0 PS_Primary_Alt_2(f80_LensColor, f80_ColorMultiplier);
  3965. AlphaBlendEnable=TRUE;
  3966. SrcBlend=ONE;
  3967. DestBlend=ONE;
  3968. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3969. DitherEnable=FALSE;
  3970. ZEnable=FALSE;
  3971. CullMode=NONE;
  3972. ALPHATESTENABLE=FALSE;
  3973. SEPARATEALPHABLENDENABLE=FALSE;
  3974. StencilEnable=FALSE;
  3975. FogEnable=FALSE;
  3976. SRGBWRITEENABLE=FALSE;
  3977. }
  3978. #endif
  3979. //Add or Remove passes here, then renumber passes below
  3980. #if (USE_FOURTH == 1)
  3981. pass P80
  3982. {
  3983. VertexShader = compile vs_3_0 VS_Fourth(f81_LensOffset, (f81_LensScale * f81_LensFactor));
  3984. PixelShader = compile ps_3_0 PS_Fourth(f81_LensColor, f81_ColorMultiplier);
  3985. AlphaBlendEnable=TRUE;
  3986. SrcBlend=ONE;
  3987. DestBlend=ONE;
  3988. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  3989. DitherEnable=FALSE;
  3990. ZEnable=FALSE;
  3991. CullMode=NONE;
  3992. ALPHATESTENABLE=FALSE;
  3993. SEPARATEALPHABLENDENABLE=FALSE;
  3994. StencilEnable=FALSE;
  3995. FogEnable=FALSE;
  3996. SRGBWRITEENABLE=FALSE;
  3997. }
  3998. pass P81
  3999. {
  4000. VertexShader = compile vs_3_0 VS_Fourth(f82_LensOffset, (f82_LensScale * f82_LensFactor));
  4001. PixelShader = compile ps_3_0 PS_Fourth(f82_LensColor, f82_ColorMultiplier);
  4002. AlphaBlendEnable=TRUE;
  4003. SrcBlend=ONE;
  4004. DestBlend=ONE;
  4005. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  4006. DitherEnable=FALSE;
  4007. ZEnable=FALSE;
  4008. CullMode=NONE;
  4009. ALPHATESTENABLE=FALSE;
  4010. SEPARATEALPHABLENDENABLE=FALSE;
  4011. StencilEnable=FALSE;
  4012. FogEnable=FALSE;
  4013. SRGBWRITEENABLE=FALSE;
  4014. }
  4015. pass P82
  4016. {
  4017. VertexShader = compile vs_3_0 VS_Fourth(f83_LensOffset, (f83_LensScale * f83_LensFactor));
  4018. PixelShader = compile ps_3_0 PS_Fourth(f83_LensColor, f83_ColorMultiplier);
  4019. AlphaBlendEnable=TRUE;
  4020. SrcBlend=ONE;
  4021. DestBlend=ONE;
  4022. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  4023. DitherEnable=FALSE;
  4024. ZEnable=FALSE;
  4025. CullMode=NONE;
  4026. ALPHATESTENABLE=FALSE;
  4027. SEPARATEALPHABLENDENABLE=FALSE;
  4028. StencilEnable=FALSE;
  4029. FogEnable=FALSE;
  4030. SRGBWRITEENABLE=FALSE;
  4031. }
  4032. #endif
  4033. //Add or Remove passes here, then renumber passes below
  4034. #if (USE_FOURTH_2 == 1)
  4035. pass P83
  4036. {
  4037. VertexShader = compile vs_3_0 VS_Fourth_2(f84_LensOffset, (f84_LensScale * f84_LensFactor));
  4038. PixelShader = compile ps_3_0 PS_Fourth_2(f84_LensColor, f84_ColorMultiplier);
  4039. AlphaBlendEnable=TRUE;
  4040. SrcBlend=ONE;
  4041. DestBlend=ONE;
  4042. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  4043. DitherEnable=FALSE;
  4044. ZEnable=FALSE;
  4045. CullMode=NONE;
  4046. ALPHATESTENABLE=FALSE;
  4047. SEPARATEALPHABLENDENABLE=FALSE;
  4048. StencilEnable=FALSE;
  4049. FogEnable=FALSE;
  4050. SRGBWRITEENABLE=FALSE;
  4051. }
  4052. pass P84
  4053. {
  4054. VertexShader = compile vs_3_0 VS_Fourth_2(f85_LensOffset, (f85_LensScale * f85_LensFactor));
  4055. PixelShader = compile ps_3_0 PS_Fourth_2(f85_LensColor, f85_ColorMultiplier);
  4056. AlphaBlendEnable=TRUE;
  4057. SrcBlend=ONE;
  4058. DestBlend=ONE;
  4059. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  4060. DitherEnable=FALSE;
  4061. ZEnable=FALSE;
  4062. CullMode=NONE;
  4063. ALPHATESTENABLE=FALSE;
  4064. SEPARATEALPHABLENDENABLE=FALSE;
  4065. StencilEnable=FALSE;
  4066. FogEnable=FALSE;
  4067. SRGBWRITEENABLE=FALSE;
  4068. }
  4069. pass P85
  4070. {
  4071. VertexShader = compile vs_3_0 VS_Fourth_2(f86_LensOffset, (f86_LensScale * f86_LensFactor));
  4072. PixelShader = compile ps_3_0 PS_Fourth_2(f86_LensColor, f86_ColorMultiplier);
  4073. AlphaBlendEnable=TRUE;
  4074. SrcBlend=ONE;
  4075. DestBlend=ONE;
  4076. ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
  4077. DitherEnable=FALSE;
  4078. ZEnable=FALSE;
  4079. CullMode=NONE;
  4080. ALPHATESTENABLE=FALSE;
  4081. SEPARATEALPHABLENDENABLE=FALSE;
  4082. StencilEnable=FALSE;
  4083. FogEnable=FALSE;
  4084. SRGBWRITEENABLE=FALSE;
  4085. }
  4086. #endif
  4087. //Add or Remove passes here, then renumber passes below
  4088. }