9d6c6bde-2fe2-44ee-883b-909608948b04.json 126 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "internal/editor/gizmo",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "passes": [
  10. {
  11. "rasterizerState": {
  12. "cullMode": 0
  13. },
  14. "blendState": {
  15. "targets": [
  16. {
  17. "blend": true,
  18. "blendSrc": 2,
  19. "blendDst": 4,
  20. "blendDstAlpha": 4
  21. }
  22. ]
  23. },
  24. "program": "internal/editor/gizmo|gizmo-vs:vert|gizmo-fs:front",
  25. "priority": 245,
  26. "depthStencilState": {
  27. "depthTest": false,
  28. "depthWrite": false
  29. }
  30. }
  31. ]
  32. },
  33. {
  34. "passes": [
  35. {
  36. "rasterizerState": {
  37. "cullMode": 0
  38. },
  39. "blendState": {
  40. "targets": [
  41. {
  42. "blend": true,
  43. "blendSrc": 2,
  44. "blendDst": 4,
  45. "blendDstAlpha": 4
  46. }
  47. ]
  48. },
  49. "program": "internal/editor/gizmo|line-vs:vert|line-fs:front",
  50. "priority": 245,
  51. "depthStencilState": {
  52. "depthTest": false,
  53. "depthWrite": false
  54. }
  55. }
  56. ]
  57. },
  58. {
  59. "passes": [
  60. {
  61. "blendState": {
  62. "targets": [
  63. {
  64. "blend": true,
  65. "blendSrc": 2,
  66. "blendDst": 4,
  67. "blendDstAlpha": 4
  68. }
  69. ]
  70. },
  71. "program": "internal/editor/gizmo|line-vs:vert|line-fs:front",
  72. "priority": 245,
  73. "depthStencilState": {
  74. "depthTest": true,
  75. "depthWrite": false
  76. }
  77. },
  78. {
  79. "blendState": {
  80. "targets": [
  81. {
  82. "blend": true,
  83. "blendSrc": 2,
  84. "blendDst": 4,
  85. "blendDstAlpha": 4
  86. }
  87. ]
  88. },
  89. "program": "internal/editor/gizmo|line-vs:vert|line-fs:back",
  90. "priority": 245,
  91. "depthStencilState": {
  92. "depthTest": true,
  93. "depthWrite": false,
  94. "depthFunc": 4
  95. }
  96. }
  97. ]
  98. },
  99. {
  100. "passes": [
  101. {
  102. "rasterizerState": {
  103. "cullMode": 0
  104. },
  105. "blendState": {
  106. "targets": [
  107. {
  108. "blend": true,
  109. "blendSrc": 2,
  110. "blendDst": 4,
  111. "blendDstAlpha": 4
  112. }
  113. ]
  114. },
  115. "program": "internal/editor/gizmo|sprite-vs:vert|sprite-fs:frag",
  116. "priority": 245,
  117. "depthStencilState": {
  118. "depthTest": false,
  119. "depthWrite": false
  120. }
  121. }
  122. ]
  123. },
  124. {
  125. "passes": [
  126. {
  127. "rasterizerState": {
  128. "cullMode": 0
  129. },
  130. "blendState": {
  131. "targets": [
  132. {
  133. "blend": true,
  134. "blendSrc": 2,
  135. "blendDst": 4,
  136. "blendDstAlpha": 4
  137. }
  138. ]
  139. },
  140. "program": "internal/editor/gizmo|gizmo-vs:vert|gizmo-fs:front",
  141. "priority": 245,
  142. "depthStencilState": {
  143. "depthTest": true,
  144. "depthWrite": false
  145. }
  146. },
  147. {
  148. "rasterizerState": {
  149. "cullMode": 0
  150. },
  151. "blendState": {
  152. "targets": [
  153. {
  154. "blend": true,
  155. "blendSrc": 2,
  156. "blendDst": 4,
  157. "blendDstAlpha": 4
  158. }
  159. ]
  160. },
  161. "program": "internal/editor/gizmo|gizmo-vs:vert|gizmo-fs:back",
  162. "priority": 245,
  163. "depthStencilState": {
  164. "depthTest": true,
  165. "depthWrite": false,
  166. "depthFunc": 4
  167. }
  168. }
  169. ]
  170. }
  171. ],
  172. "shaders": [
  173. {
  174. "blocks": [
  175. {
  176. "name": "Constant",
  177. "members": [
  178. {
  179. "name": "mainColor",
  180. "type": 16,
  181. "count": 1
  182. },
  183. {
  184. "name": "cc_sh_linear_const_r",
  185. "type": 16,
  186. "count": 1
  187. },
  188. {
  189. "name": "cc_sh_linear_const_g",
  190. "type": 16,
  191. "count": 1
  192. },
  193. {
  194. "name": "cc_sh_linear_const_b",
  195. "type": 16,
  196. "count": 1
  197. },
  198. {
  199. "name": "cc_sh_quadratic_r",
  200. "type": 16,
  201. "count": 1
  202. },
  203. {
  204. "name": "cc_sh_quadratic_g",
  205. "type": 16,
  206. "count": 1
  207. },
  208. {
  209. "name": "cc_sh_quadratic_b",
  210. "type": 16,
  211. "count": 1
  212. },
  213. {
  214. "name": "cc_sh_quadratic_a",
  215. "type": 16,
  216. "count": 1
  217. }
  218. ],
  219. "defines": [],
  220. "stageFlags": 16,
  221. "binding": 0
  222. }
  223. ],
  224. "samplerTextures": [],
  225. "samplers": [],
  226. "textures": [],
  227. "buffers": [],
  228. "images": [],
  229. "subpassInputs": [],
  230. "attributes": [
  231. {
  232. "name": "a_position",
  233. "defines": [],
  234. "format": 32,
  235. "location": 0
  236. },
  237. {
  238. "name": "a_normal",
  239. "defines": [],
  240. "format": 32,
  241. "location": 1
  242. }
  243. ],
  244. "varyings": [
  245. {
  246. "name": "normal_w",
  247. "type": 15,
  248. "count": 1,
  249. "defines": [],
  250. "stageFlags": 17,
  251. "location": 0
  252. },
  253. {
  254. "name": "pos_w",
  255. "type": 15,
  256. "count": 1,
  257. "defines": [],
  258. "stageFlags": 17,
  259. "location": 1
  260. },
  261. {
  262. "name": "pos_l",
  263. "type": 15,
  264. "count": 1,
  265. "defines": [],
  266. "stageFlags": 17,
  267. "location": 2
  268. },
  269. {
  270. "name": "right",
  271. "type": 15,
  272. "count": 1,
  273. "defines": [],
  274. "stageFlags": 17,
  275. "location": 3
  276. },
  277. {
  278. "name": "up",
  279. "type": 15,
  280. "count": 1,
  281. "defines": [],
  282. "stageFlags": 17,
  283. "location": 4
  284. },
  285. {
  286. "name": "forward",
  287. "type": 15,
  288. "count": 1,
  289. "defines": [],
  290. "stageFlags": 17,
  291. "location": 5
  292. }
  293. ],
  294. "fragColors": [
  295. {
  296. "name": "cc_FragColor",
  297. "typename": "vec4",
  298. "type": 16,
  299. "count": 1,
  300. "defines": [],
  301. "stageFlags": 16,
  302. "location": 0
  303. }
  304. ],
  305. "descriptors": [
  306. {
  307. "rate": 0,
  308. "blocks": [
  309. {
  310. "tags": {
  311. "builtin": "local"
  312. },
  313. "name": "CCLocal",
  314. "members": [
  315. {
  316. "name": "cc_matWorld",
  317. "typename": "mat4",
  318. "type": 25,
  319. "count": 1,
  320. "precision": "highp "
  321. },
  322. {
  323. "name": "cc_matWorldIT",
  324. "typename": "mat4",
  325. "type": 25,
  326. "count": 1,
  327. "precision": "highp "
  328. },
  329. {
  330. "name": "cc_lightingMapUVParam",
  331. "typename": "vec4",
  332. "type": 16,
  333. "count": 1,
  334. "precision": "highp "
  335. },
  336. {
  337. "name": "cc_localShadowBias",
  338. "typename": "vec4",
  339. "type": 16,
  340. "count": 1,
  341. "precision": "highp "
  342. },
  343. {
  344. "name": "cc_reflectionProbeData1",
  345. "typename": "vec4",
  346. "type": 16,
  347. "count": 1,
  348. "precision": "highp "
  349. },
  350. {
  351. "name": "cc_reflectionProbeData2",
  352. "typename": "vec4",
  353. "type": 16,
  354. "count": 1,
  355. "precision": "highp "
  356. },
  357. {
  358. "name": "cc_reflectionProbeBlendData1",
  359. "typename": "vec4",
  360. "type": 16,
  361. "count": 1,
  362. "precision": "highp "
  363. },
  364. {
  365. "name": "cc_reflectionProbeBlendData2",
  366. "typename": "vec4",
  367. "type": 16,
  368. "count": 1,
  369. "precision": "highp "
  370. }
  371. ],
  372. "defines": [],
  373. "stageFlags": 1
  374. }
  375. ],
  376. "samplerTextures": [],
  377. "samplers": [],
  378. "textures": [],
  379. "buffers": [],
  380. "images": [],
  381. "subpassInputs": []
  382. },
  383. {
  384. "rate": 1,
  385. "blocks": [
  386. {
  387. "name": "Constant",
  388. "members": [
  389. {
  390. "name": "mainColor",
  391. "type": 16,
  392. "count": 1
  393. },
  394. {
  395. "name": "cc_sh_linear_const_r",
  396. "type": 16,
  397. "count": 1
  398. },
  399. {
  400. "name": "cc_sh_linear_const_g",
  401. "type": 16,
  402. "count": 1
  403. },
  404. {
  405. "name": "cc_sh_linear_const_b",
  406. "type": 16,
  407. "count": 1
  408. },
  409. {
  410. "name": "cc_sh_quadratic_r",
  411. "type": 16,
  412. "count": 1
  413. },
  414. {
  415. "name": "cc_sh_quadratic_g",
  416. "type": 16,
  417. "count": 1
  418. },
  419. {
  420. "name": "cc_sh_quadratic_b",
  421. "type": 16,
  422. "count": 1
  423. },
  424. {
  425. "name": "cc_sh_quadratic_a",
  426. "type": 16,
  427. "count": 1
  428. }
  429. ],
  430. "defines": [],
  431. "stageFlags": 16,
  432. "binding": 0
  433. }
  434. ],
  435. "samplerTextures": [],
  436. "samplers": [],
  437. "textures": [],
  438. "buffers": [],
  439. "images": [],
  440. "subpassInputs": []
  441. },
  442. {
  443. "rate": 2,
  444. "blocks": [],
  445. "samplerTextures": [],
  446. "samplers": [],
  447. "textures": [],
  448. "buffers": [],
  449. "images": [],
  450. "subpassInputs": []
  451. },
  452. {
  453. "rate": 3,
  454. "blocks": [
  455. {
  456. "tags": {
  457. "builtin": "global"
  458. },
  459. "name": "CCGlobal",
  460. "members": [
  461. {
  462. "name": "cc_time",
  463. "typename": "vec4",
  464. "type": 16,
  465. "count": 1,
  466. "precision": "highp "
  467. },
  468. {
  469. "name": "cc_screenSize",
  470. "typename": "vec4",
  471. "type": 16,
  472. "count": 1,
  473. "precision": "mediump "
  474. },
  475. {
  476. "name": "cc_nativeSize",
  477. "typename": "vec4",
  478. "type": 16,
  479. "count": 1,
  480. "precision": "mediump "
  481. },
  482. {
  483. "name": "cc_probeInfo",
  484. "typename": "vec4",
  485. "type": 16,
  486. "count": 1,
  487. "precision": "mediump "
  488. },
  489. {
  490. "name": "cc_debug_view_mode",
  491. "typename": "vec4",
  492. "type": 16,
  493. "count": 1,
  494. "precision": "mediump "
  495. }
  496. ],
  497. "defines": [],
  498. "stageFlags": 17
  499. },
  500. {
  501. "tags": {
  502. "builtin": "global"
  503. },
  504. "name": "CCCamera",
  505. "members": [
  506. {
  507. "name": "cc_matView",
  508. "typename": "mat4",
  509. "type": 25,
  510. "count": 1,
  511. "precision": "highp "
  512. },
  513. {
  514. "name": "cc_matViewInv",
  515. "typename": "mat4",
  516. "type": 25,
  517. "count": 1,
  518. "precision": "highp "
  519. },
  520. {
  521. "name": "cc_matProj",
  522. "typename": "mat4",
  523. "type": 25,
  524. "count": 1,
  525. "precision": "highp "
  526. },
  527. {
  528. "name": "cc_matProjInv",
  529. "typename": "mat4",
  530. "type": 25,
  531. "count": 1,
  532. "precision": "highp "
  533. },
  534. {
  535. "name": "cc_matViewProj",
  536. "typename": "mat4",
  537. "type": 25,
  538. "count": 1,
  539. "precision": "highp "
  540. },
  541. {
  542. "name": "cc_matViewProjInv",
  543. "typename": "mat4",
  544. "type": 25,
  545. "count": 1,
  546. "precision": "highp "
  547. },
  548. {
  549. "name": "cc_cameraPos",
  550. "typename": "vec4",
  551. "type": 16,
  552. "count": 1,
  553. "precision": "highp "
  554. },
  555. {
  556. "name": "cc_surfaceTransform",
  557. "typename": "vec4",
  558. "type": 16,
  559. "count": 1,
  560. "precision": "mediump "
  561. },
  562. {
  563. "name": "cc_screenScale",
  564. "typename": "vec4",
  565. "type": 16,
  566. "count": 1,
  567. "precision": "mediump "
  568. },
  569. {
  570. "name": "cc_exposure",
  571. "typename": "vec4",
  572. "type": 16,
  573. "count": 1,
  574. "precision": "mediump "
  575. },
  576. {
  577. "name": "cc_mainLitDir",
  578. "typename": "vec4",
  579. "type": 16,
  580. "count": 1,
  581. "precision": "mediump "
  582. },
  583. {
  584. "name": "cc_mainLitColor",
  585. "typename": "vec4",
  586. "type": 16,
  587. "count": 1,
  588. "precision": "mediump "
  589. },
  590. {
  591. "name": "cc_ambientSky",
  592. "typename": "vec4",
  593. "type": 16,
  594. "count": 1,
  595. "precision": "mediump "
  596. },
  597. {
  598. "name": "cc_ambientGround",
  599. "typename": "vec4",
  600. "type": 16,
  601. "count": 1,
  602. "precision": "mediump "
  603. },
  604. {
  605. "name": "cc_fogColor",
  606. "typename": "vec4",
  607. "type": 16,
  608. "count": 1,
  609. "precision": "mediump "
  610. },
  611. {
  612. "name": "cc_fogBase",
  613. "typename": "vec4",
  614. "type": 16,
  615. "count": 1,
  616. "precision": "mediump "
  617. },
  618. {
  619. "name": "cc_fogAdd",
  620. "typename": "vec4",
  621. "type": 16,
  622. "count": 1,
  623. "precision": "mediump "
  624. },
  625. {
  626. "name": "cc_nearFar",
  627. "typename": "vec4",
  628. "type": 16,
  629. "count": 1,
  630. "precision": "mediump "
  631. },
  632. {
  633. "name": "cc_viewPort",
  634. "typename": "vec4",
  635. "type": 16,
  636. "count": 1,
  637. "precision": "mediump "
  638. }
  639. ],
  640. "defines": [],
  641. "stageFlags": 17
  642. }
  643. ],
  644. "samplerTextures": [],
  645. "samplers": [],
  646. "textures": [],
  647. "buffers": [],
  648. "images": [],
  649. "subpassInputs": []
  650. }
  651. ],
  652. "hash": 2124745908,
  653. "glsl4": {
  654. "vert": "\nprecision mediump float;\nlayout(set = 2, binding = 0) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 0) out vec3 normal_w;\nlayout(location = 1) out vec3 pos_w;\nlayout(location = 2) out vec3 pos_l;\nlayout(location = 3) out vec3 right;\nlayout(location = 4) out vec3 up;\nlayout(location = 5) out vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
  655. "frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nlayout(location = 0) in vec3 normal_w;\nlayout(location = 1) in vec3 pos_w;\nlayout(location = 2) in vec3 pos_l;\nlayout(location = 3) in vec3 right;\nlayout(location = 4) in vec3 up;\nlayout(location = 5) in vec3 forward;\nlayout(set = 1, binding = 0) uniform Constant {\n vec4 mainColor;\n vec4 cc_sh_linear_const_r;\n vec4 cc_sh_linear_const_g;\n vec4 cc_sh_linear_const_b;\n vec4 cc_sh_quadratic_r;\n vec4 cc_sh_quadratic_g;\n vec4 cc_sh_quadratic_b;\n vec4 cc_sh_quadratic_a;\n};\nvec4 gizmo_fs (float alpha) {\n vec3 N = normalize(normal_w) * (float(gl_FrontFacing) * 2.0 - 1.0);\n vec3 V = normalize(cc_cameraPos.xyz - pos_w);\n vec3 points [4];\n points[0] = (forward * 3.0 + right + up) * 40.0;\n points[1] = (forward * 3.0 - right + up) * 40.0;\n points[2] = (forward * 3.0 - right - up) * 40.0;\n points[3] = (forward * 3.0 + right - up) * 40.0;\n vec3 diffuse = LinearToSRGB(mainColor.rgb * LTC_Evaluate(N, V, pos_l, mat3(1), points));\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(vec4(diffuse, mainColor.a * alpha));\n #else\n return vec4(diffuse, mainColor.a * alpha);\n #endif\n}\nvec4 front () {\n return gizmo_fs(1.0);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = front(); }"
  656. },
  657. "glsl3": {
  658. "vert": "\nprecision mediump float;\nlayout(std140) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nin vec3 a_position;\nin vec3 a_normal;\nout vec3 normal_w;\nout vec3 pos_w;\nout vec3 pos_l;\nout vec3 right;\nout vec3 up;\nout vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
  659. "frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nin vec3 normal_w;\nin vec3 pos_w;\nin vec3 pos_l;\nin vec3 right;\nin vec3 up;\nin vec3 forward;\nlayout(std140) uniform Constant {\n vec4 mainColor;\n vec4 cc_sh_linear_const_r;\n vec4 cc_sh_linear_const_g;\n vec4 cc_sh_linear_const_b;\n vec4 cc_sh_quadratic_r;\n vec4 cc_sh_quadratic_g;\n vec4 cc_sh_quadratic_b;\n vec4 cc_sh_quadratic_a;\n};\nvec4 gizmo_fs (float alpha) {\n vec3 N = normalize(normal_w) * (float(gl_FrontFacing) * 2.0 - 1.0);\n vec3 V = normalize(cc_cameraPos.xyz - pos_w);\n vec3 points [4];\n points[0] = (forward * 3.0 + right + up) * 40.0;\n points[1] = (forward * 3.0 - right + up) * 40.0;\n points[2] = (forward * 3.0 - right - up) * 40.0;\n points[3] = (forward * 3.0 + right - up) * 40.0;\n vec3 diffuse = LinearToSRGB(mainColor.rgb * LTC_Evaluate(N, V, pos_l, mat3(1), points));\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(vec4(diffuse, mainColor.a * alpha));\n #else\n return vec4(diffuse, mainColor.a * alpha);\n #endif\n}\nvec4 front () {\n return gizmo_fs(1.0);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = front(); }"
  660. },
  661. "glsl1": {
  662. "vert": "\nprecision mediump float;\nuniform highp mat4 cc_matWorld;\n uniform highp mat4 cc_matWorldIT;\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\nattribute vec3 a_position;\nattribute vec3 a_normal;\nvarying vec3 normal_w;\nvarying vec3 pos_w;\nvarying vec3 pos_l;\nvarying vec3 right;\nvarying vec3 up;\nvarying vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
  663. "frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nuniform highp vec4 cc_cameraPos;\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nvarying vec3 normal_w;\nvarying vec3 pos_w;\nvarying vec3 pos_l;\nvarying vec3 right;\nvarying vec3 up;\nvarying vec3 forward;\n uniform vec4 mainColor;\nvec4 gizmo_fs (float alpha) {\n vec3 N = normalize(normal_w) * (float(gl_FrontFacing) * 2.0 - 1.0);\n vec3 V = normalize(cc_cameraPos.xyz - pos_w);\n vec3 points [4];\n points[0] = (forward * 3.0 + right + up) * 40.0;\n points[1] = (forward * 3.0 - right + up) * 40.0;\n points[2] = (forward * 3.0 - right - up) * 40.0;\n points[3] = (forward * 3.0 + right - up) * 40.0;\n vec3 diffuse = LinearToSRGB(mainColor.rgb * LTC_Evaluate(N, V, pos_l, mat3(1), points));\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(vec4(diffuse, mainColor.a * alpha));\n #else\n return vec4(diffuse, mainColor.a * alpha);\n #endif\n}\nvec4 front () {\n return gizmo_fs(1.0);\n}\nvoid main() { gl_FragColor = front(); }"
  664. },
  665. "builtins": {
  666. "globals": {
  667. "blocks": [
  668. {
  669. "name": "CCGlobal",
  670. "defines": []
  671. },
  672. {
  673. "name": "CCCamera",
  674. "defines": []
  675. }
  676. ],
  677. "samplerTextures": [],
  678. "buffers": [],
  679. "images": []
  680. },
  681. "locals": {
  682. "blocks": [
  683. {
  684. "name": "CCLocal",
  685. "defines": []
  686. }
  687. ],
  688. "samplerTextures": [],
  689. "buffers": [],
  690. "images": []
  691. },
  692. "statistics": {
  693. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 56,
  694. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 50
  695. }
  696. },
  697. "defines": [
  698. {
  699. "name": "CC_USE_DEBUG_VIEW",
  700. "type": "number",
  701. "defines": [],
  702. "range": [
  703. 0,
  704. 3
  705. ]
  706. },
  707. {
  708. "name": "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC",
  709. "type": "boolean",
  710. "defines": [
  711. "CC_USE_DEBUG_VIEW"
  712. ]
  713. },
  714. {
  715. "name": "CC_SURFACES_ENABLE_DEBUG_VIEW",
  716. "type": "boolean",
  717. "defines": [
  718. "CC_USE_DEBUG_VIEW",
  719. "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC"
  720. ]
  721. },
  722. {
  723. "name": "USE_FORWARD_PIPELINE",
  724. "type": "boolean",
  725. "defines": []
  726. }
  727. ],
  728. "name": "internal/editor/gizmo|gizmo-vs:vert|gizmo-fs:front"
  729. },
  730. {
  731. "blocks": [
  732. {
  733. "name": "Constant",
  734. "members": [
  735. {
  736. "name": "mainColor",
  737. "type": 16,
  738. "count": 1
  739. }
  740. ],
  741. "defines": [],
  742. "stageFlags": 16,
  743. "binding": 0
  744. }
  745. ],
  746. "samplerTextures": [],
  747. "samplers": [],
  748. "textures": [],
  749. "buffers": [],
  750. "images": [],
  751. "subpassInputs": [],
  752. "attributes": [
  753. {
  754. "name": "a_position",
  755. "defines": [],
  756. "format": 32,
  757. "location": 0
  758. },
  759. {
  760. "name": "a_lineDistance",
  761. "defines": [
  762. "USE_DASHED_LINE"
  763. ],
  764. "format": 11,
  765. "location": 1
  766. }
  767. ],
  768. "varyings": [
  769. {
  770. "name": "lineDistance",
  771. "type": 13,
  772. "count": 1,
  773. "defines": [
  774. "USE_DASHED_LINE"
  775. ],
  776. "stageFlags": 17,
  777. "location": 0
  778. }
  779. ],
  780. "fragColors": [
  781. {
  782. "name": "cc_FragColor",
  783. "typename": "vec4",
  784. "type": 16,
  785. "count": 1,
  786. "defines": [],
  787. "stageFlags": 16,
  788. "location": 0
  789. }
  790. ],
  791. "descriptors": [
  792. {
  793. "rate": 0,
  794. "blocks": [
  795. {
  796. "tags": {
  797. "builtin": "local"
  798. },
  799. "name": "CCLocal",
  800. "members": [
  801. {
  802. "name": "cc_matWorld",
  803. "typename": "mat4",
  804. "type": 25,
  805. "count": 1,
  806. "precision": "highp "
  807. },
  808. {
  809. "name": "cc_matWorldIT",
  810. "typename": "mat4",
  811. "type": 25,
  812. "count": 1,
  813. "precision": "highp "
  814. },
  815. {
  816. "name": "cc_lightingMapUVParam",
  817. "typename": "vec4",
  818. "type": 16,
  819. "count": 1,
  820. "precision": "highp "
  821. },
  822. {
  823. "name": "cc_localShadowBias",
  824. "typename": "vec4",
  825. "type": 16,
  826. "count": 1,
  827. "precision": "highp "
  828. },
  829. {
  830. "name": "cc_reflectionProbeData1",
  831. "typename": "vec4",
  832. "type": 16,
  833. "count": 1,
  834. "precision": "highp "
  835. },
  836. {
  837. "name": "cc_reflectionProbeData2",
  838. "typename": "vec4",
  839. "type": 16,
  840. "count": 1,
  841. "precision": "highp "
  842. },
  843. {
  844. "name": "cc_reflectionProbeBlendData1",
  845. "typename": "vec4",
  846. "type": 16,
  847. "count": 1,
  848. "precision": "highp "
  849. },
  850. {
  851. "name": "cc_reflectionProbeBlendData2",
  852. "typename": "vec4",
  853. "type": 16,
  854. "count": 1,
  855. "precision": "highp "
  856. }
  857. ],
  858. "defines": [],
  859. "stageFlags": 1
  860. }
  861. ],
  862. "samplerTextures": [],
  863. "samplers": [],
  864. "textures": [],
  865. "buffers": [],
  866. "images": [],
  867. "subpassInputs": []
  868. },
  869. {
  870. "rate": 1,
  871. "blocks": [
  872. {
  873. "name": "Constant",
  874. "members": [
  875. {
  876. "name": "mainColor",
  877. "type": 16,
  878. "count": 1
  879. }
  880. ],
  881. "defines": [],
  882. "stageFlags": 16,
  883. "binding": 0
  884. }
  885. ],
  886. "samplerTextures": [],
  887. "samplers": [],
  888. "textures": [],
  889. "buffers": [],
  890. "images": [],
  891. "subpassInputs": []
  892. },
  893. {
  894. "rate": 2,
  895. "blocks": [],
  896. "samplerTextures": [],
  897. "samplers": [],
  898. "textures": [],
  899. "buffers": [],
  900. "images": [],
  901. "subpassInputs": []
  902. },
  903. {
  904. "rate": 3,
  905. "blocks": [
  906. {
  907. "tags": {
  908. "builtin": "global"
  909. },
  910. "name": "CCGlobal",
  911. "members": [
  912. {
  913. "name": "cc_time",
  914. "typename": "vec4",
  915. "type": 16,
  916. "count": 1,
  917. "precision": "highp "
  918. },
  919. {
  920. "name": "cc_screenSize",
  921. "typename": "vec4",
  922. "type": 16,
  923. "count": 1,
  924. "precision": "mediump "
  925. },
  926. {
  927. "name": "cc_nativeSize",
  928. "typename": "vec4",
  929. "type": 16,
  930. "count": 1,
  931. "precision": "mediump "
  932. },
  933. {
  934. "name": "cc_probeInfo",
  935. "typename": "vec4",
  936. "type": 16,
  937. "count": 1,
  938. "precision": "mediump "
  939. },
  940. {
  941. "name": "cc_debug_view_mode",
  942. "typename": "vec4",
  943. "type": 16,
  944. "count": 1,
  945. "precision": "mediump "
  946. }
  947. ],
  948. "defines": [],
  949. "stageFlags": 17
  950. },
  951. {
  952. "tags": {
  953. "builtin": "global"
  954. },
  955. "name": "CCCamera",
  956. "members": [
  957. {
  958. "name": "cc_matView",
  959. "typename": "mat4",
  960. "type": 25,
  961. "count": 1,
  962. "precision": "highp "
  963. },
  964. {
  965. "name": "cc_matViewInv",
  966. "typename": "mat4",
  967. "type": 25,
  968. "count": 1,
  969. "precision": "highp "
  970. },
  971. {
  972. "name": "cc_matProj",
  973. "typename": "mat4",
  974. "type": 25,
  975. "count": 1,
  976. "precision": "highp "
  977. },
  978. {
  979. "name": "cc_matProjInv",
  980. "typename": "mat4",
  981. "type": 25,
  982. "count": 1,
  983. "precision": "highp "
  984. },
  985. {
  986. "name": "cc_matViewProj",
  987. "typename": "mat4",
  988. "type": 25,
  989. "count": 1,
  990. "precision": "highp "
  991. },
  992. {
  993. "name": "cc_matViewProjInv",
  994. "typename": "mat4",
  995. "type": 25,
  996. "count": 1,
  997. "precision": "highp "
  998. },
  999. {
  1000. "name": "cc_cameraPos",
  1001. "typename": "vec4",
  1002. "type": 16,
  1003. "count": 1,
  1004. "precision": "highp "
  1005. },
  1006. {
  1007. "name": "cc_surfaceTransform",
  1008. "typename": "vec4",
  1009. "type": 16,
  1010. "count": 1,
  1011. "precision": "mediump "
  1012. },
  1013. {
  1014. "name": "cc_screenScale",
  1015. "typename": "vec4",
  1016. "type": 16,
  1017. "count": 1,
  1018. "precision": "mediump "
  1019. },
  1020. {
  1021. "name": "cc_exposure",
  1022. "typename": "vec4",
  1023. "type": 16,
  1024. "count": 1,
  1025. "precision": "mediump "
  1026. },
  1027. {
  1028. "name": "cc_mainLitDir",
  1029. "typename": "vec4",
  1030. "type": 16,
  1031. "count": 1,
  1032. "precision": "mediump "
  1033. },
  1034. {
  1035. "name": "cc_mainLitColor",
  1036. "typename": "vec4",
  1037. "type": 16,
  1038. "count": 1,
  1039. "precision": "mediump "
  1040. },
  1041. {
  1042. "name": "cc_ambientSky",
  1043. "typename": "vec4",
  1044. "type": 16,
  1045. "count": 1,
  1046. "precision": "mediump "
  1047. },
  1048. {
  1049. "name": "cc_ambientGround",
  1050. "typename": "vec4",
  1051. "type": 16,
  1052. "count": 1,
  1053. "precision": "mediump "
  1054. },
  1055. {
  1056. "name": "cc_fogColor",
  1057. "typename": "vec4",
  1058. "type": 16,
  1059. "count": 1,
  1060. "precision": "mediump "
  1061. },
  1062. {
  1063. "name": "cc_fogBase",
  1064. "typename": "vec4",
  1065. "type": 16,
  1066. "count": 1,
  1067. "precision": "mediump "
  1068. },
  1069. {
  1070. "name": "cc_fogAdd",
  1071. "typename": "vec4",
  1072. "type": 16,
  1073. "count": 1,
  1074. "precision": "mediump "
  1075. },
  1076. {
  1077. "name": "cc_nearFar",
  1078. "typename": "vec4",
  1079. "type": 16,
  1080. "count": 1,
  1081. "precision": "mediump "
  1082. },
  1083. {
  1084. "name": "cc_viewPort",
  1085. "typename": "vec4",
  1086. "type": 16,
  1087. "count": 1,
  1088. "precision": "mediump "
  1089. }
  1090. ],
  1091. "defines": [],
  1092. "stageFlags": 17
  1093. }
  1094. ],
  1095. "samplerTextures": [],
  1096. "samplers": [],
  1097. "textures": [],
  1098. "buffers": [],
  1099. "images": [],
  1100. "subpassInputs": []
  1101. }
  1102. ],
  1103. "hash": 1214395961,
  1104. "glsl4": {
  1105. "vert": "\nprecision mediump float;\nlayout(set = 2, binding = 0) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) in highp vec3 a_position;\n#if USE_DASHED_LINE\nlayout(location = 1) in float a_lineDistance;\nlayout(location = 0) out float lineDistance;\n#endif\nvec4 vert () {\n vec4 pos = cc_matProj * (cc_matView * cc_matWorld) * vec4(a_position, 1);\n pos.z -= 0.000001;\n #if USE_DASHED_LINE\n lineDistance = a_lineDistance;\n #endif\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  1106. "frag": "\nprecision mediump float;\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nlayout(set = 1, binding = 0) uniform Constant {\n vec4 mainColor;\n};\nlayout(location = 0) in float lineDistance;\nvec4 front() {\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(mainColor);\n #else\n #if USE_DASHED_LINE\n if (mod(lineDistance, 10.0) > 5.0) {\n discard;\n }\n #endif\n return mainColor;\n #endif\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = front(); }"
  1107. },
  1108. "glsl3": {
  1109. "vert": "\nprecision mediump float;\nlayout(std140) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nin highp vec3 a_position;\n#if USE_DASHED_LINE\nin float a_lineDistance;\nout float lineDistance;\n#endif\nvec4 vert () {\n vec4 pos = cc_matProj * (cc_matView * cc_matWorld) * vec4(a_position, 1);\n pos.z -= 0.000001;\n #if USE_DASHED_LINE\n lineDistance = a_lineDistance;\n #endif\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  1110. "frag": "\nprecision mediump float;\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nlayout(std140) uniform Constant {\n vec4 mainColor;\n};\nin float lineDistance;\nvec4 front() {\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(mainColor);\n #else\n #if USE_DASHED_LINE\n if (mod(lineDistance, 10.0) > 5.0) {\n discard;\n }\n #endif\n return mainColor;\n #endif\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = front(); }"
  1111. },
  1112. "glsl1": {
  1113. "vert": "\nprecision mediump float;\nuniform highp mat4 cc_matWorld;\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\nattribute highp vec3 a_position;\n#if USE_DASHED_LINE\nattribute float a_lineDistance;\nvarying float lineDistance;\n#endif\nvec4 vert () {\n vec4 pos = cc_matProj * (cc_matView * cc_matWorld) * vec4(a_position, 1);\n pos.z -= 0.000001;\n #if USE_DASHED_LINE\n lineDistance = a_lineDistance;\n #endif\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  1114. "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\n uniform vec4 mainColor;\nvarying float lineDistance;\nvec4 front() {\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(mainColor);\n #else\n #if USE_DASHED_LINE\n if (mod(lineDistance, 10.0) > 5.0) {\n discard;\n }\n #endif\n return mainColor;\n #endif\n}\nvoid main() { gl_FragColor = front(); }"
  1115. },
  1116. "builtins": {
  1117. "globals": {
  1118. "blocks": [
  1119. {
  1120. "name": "CCGlobal",
  1121. "defines": []
  1122. },
  1123. {
  1124. "name": "CCCamera",
  1125. "defines": []
  1126. }
  1127. ],
  1128. "samplerTextures": [],
  1129. "buffers": [],
  1130. "images": []
  1131. },
  1132. "locals": {
  1133. "blocks": [
  1134. {
  1135. "name": "CCLocal",
  1136. "defines": []
  1137. }
  1138. ],
  1139. "samplerTextures": [],
  1140. "buffers": [],
  1141. "images": []
  1142. },
  1143. "statistics": {
  1144. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 56,
  1145. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 43
  1146. }
  1147. },
  1148. "defines": [
  1149. {
  1150. "name": "USE_DASHED_LINE",
  1151. "type": "boolean",
  1152. "defines": []
  1153. },
  1154. {
  1155. "name": "USE_FORWARD_PIPELINE",
  1156. "type": "boolean",
  1157. "defines": []
  1158. }
  1159. ],
  1160. "name": "internal/editor/gizmo|line-vs:vert|line-fs:front"
  1161. },
  1162. {
  1163. "blocks": [
  1164. {
  1165. "name": "Constant",
  1166. "members": [
  1167. {
  1168. "name": "mainColor",
  1169. "type": 16,
  1170. "count": 1
  1171. }
  1172. ],
  1173. "defines": [],
  1174. "stageFlags": 16,
  1175. "binding": 0
  1176. }
  1177. ],
  1178. "samplerTextures": [],
  1179. "samplers": [],
  1180. "textures": [],
  1181. "buffers": [],
  1182. "images": [],
  1183. "subpassInputs": [],
  1184. "attributes": [
  1185. {
  1186. "name": "a_position",
  1187. "defines": [],
  1188. "format": 32,
  1189. "location": 0
  1190. },
  1191. {
  1192. "name": "a_lineDistance",
  1193. "defines": [
  1194. "USE_DASHED_LINE"
  1195. ],
  1196. "format": 11,
  1197. "location": 1
  1198. }
  1199. ],
  1200. "varyings": [
  1201. {
  1202. "name": "lineDistance",
  1203. "type": 13,
  1204. "count": 1,
  1205. "defines": [
  1206. "USE_DASHED_LINE"
  1207. ],
  1208. "stageFlags": 17,
  1209. "location": 0
  1210. }
  1211. ],
  1212. "fragColors": [
  1213. {
  1214. "name": "cc_FragColor",
  1215. "typename": "vec4",
  1216. "type": 16,
  1217. "count": 1,
  1218. "defines": [],
  1219. "stageFlags": 16,
  1220. "location": 0
  1221. }
  1222. ],
  1223. "descriptors": [
  1224. {
  1225. "rate": 0,
  1226. "blocks": [
  1227. {
  1228. "tags": {
  1229. "builtin": "local"
  1230. },
  1231. "name": "CCLocal",
  1232. "members": [
  1233. {
  1234. "name": "cc_matWorld",
  1235. "typename": "mat4",
  1236. "type": 25,
  1237. "count": 1,
  1238. "precision": "highp "
  1239. },
  1240. {
  1241. "name": "cc_matWorldIT",
  1242. "typename": "mat4",
  1243. "type": 25,
  1244. "count": 1,
  1245. "precision": "highp "
  1246. },
  1247. {
  1248. "name": "cc_lightingMapUVParam",
  1249. "typename": "vec4",
  1250. "type": 16,
  1251. "count": 1,
  1252. "precision": "highp "
  1253. },
  1254. {
  1255. "name": "cc_localShadowBias",
  1256. "typename": "vec4",
  1257. "type": 16,
  1258. "count": 1,
  1259. "precision": "highp "
  1260. },
  1261. {
  1262. "name": "cc_reflectionProbeData1",
  1263. "typename": "vec4",
  1264. "type": 16,
  1265. "count": 1,
  1266. "precision": "highp "
  1267. },
  1268. {
  1269. "name": "cc_reflectionProbeData2",
  1270. "typename": "vec4",
  1271. "type": 16,
  1272. "count": 1,
  1273. "precision": "highp "
  1274. },
  1275. {
  1276. "name": "cc_reflectionProbeBlendData1",
  1277. "typename": "vec4",
  1278. "type": 16,
  1279. "count": 1,
  1280. "precision": "highp "
  1281. },
  1282. {
  1283. "name": "cc_reflectionProbeBlendData2",
  1284. "typename": "vec4",
  1285. "type": 16,
  1286. "count": 1,
  1287. "precision": "highp "
  1288. }
  1289. ],
  1290. "defines": [],
  1291. "stageFlags": 1
  1292. }
  1293. ],
  1294. "samplerTextures": [],
  1295. "samplers": [],
  1296. "textures": [],
  1297. "buffers": [],
  1298. "images": [],
  1299. "subpassInputs": []
  1300. },
  1301. {
  1302. "rate": 1,
  1303. "blocks": [
  1304. {
  1305. "name": "Constant",
  1306. "members": [
  1307. {
  1308. "name": "mainColor",
  1309. "type": 16,
  1310. "count": 1
  1311. }
  1312. ],
  1313. "defines": [],
  1314. "stageFlags": 16,
  1315. "binding": 0
  1316. }
  1317. ],
  1318. "samplerTextures": [],
  1319. "samplers": [],
  1320. "textures": [],
  1321. "buffers": [],
  1322. "images": [],
  1323. "subpassInputs": []
  1324. },
  1325. {
  1326. "rate": 2,
  1327. "blocks": [],
  1328. "samplerTextures": [],
  1329. "samplers": [],
  1330. "textures": [],
  1331. "buffers": [],
  1332. "images": [],
  1333. "subpassInputs": []
  1334. },
  1335. {
  1336. "rate": 3,
  1337. "blocks": [
  1338. {
  1339. "tags": {
  1340. "builtin": "global"
  1341. },
  1342. "name": "CCGlobal",
  1343. "members": [
  1344. {
  1345. "name": "cc_time",
  1346. "typename": "vec4",
  1347. "type": 16,
  1348. "count": 1,
  1349. "precision": "highp "
  1350. },
  1351. {
  1352. "name": "cc_screenSize",
  1353. "typename": "vec4",
  1354. "type": 16,
  1355. "count": 1,
  1356. "precision": "mediump "
  1357. },
  1358. {
  1359. "name": "cc_nativeSize",
  1360. "typename": "vec4",
  1361. "type": 16,
  1362. "count": 1,
  1363. "precision": "mediump "
  1364. },
  1365. {
  1366. "name": "cc_probeInfo",
  1367. "typename": "vec4",
  1368. "type": 16,
  1369. "count": 1,
  1370. "precision": "mediump "
  1371. },
  1372. {
  1373. "name": "cc_debug_view_mode",
  1374. "typename": "vec4",
  1375. "type": 16,
  1376. "count": 1,
  1377. "precision": "mediump "
  1378. }
  1379. ],
  1380. "defines": [],
  1381. "stageFlags": 17
  1382. },
  1383. {
  1384. "tags": {
  1385. "builtin": "global"
  1386. },
  1387. "name": "CCCamera",
  1388. "members": [
  1389. {
  1390. "name": "cc_matView",
  1391. "typename": "mat4",
  1392. "type": 25,
  1393. "count": 1,
  1394. "precision": "highp "
  1395. },
  1396. {
  1397. "name": "cc_matViewInv",
  1398. "typename": "mat4",
  1399. "type": 25,
  1400. "count": 1,
  1401. "precision": "highp "
  1402. },
  1403. {
  1404. "name": "cc_matProj",
  1405. "typename": "mat4",
  1406. "type": 25,
  1407. "count": 1,
  1408. "precision": "highp "
  1409. },
  1410. {
  1411. "name": "cc_matProjInv",
  1412. "typename": "mat4",
  1413. "type": 25,
  1414. "count": 1,
  1415. "precision": "highp "
  1416. },
  1417. {
  1418. "name": "cc_matViewProj",
  1419. "typename": "mat4",
  1420. "type": 25,
  1421. "count": 1,
  1422. "precision": "highp "
  1423. },
  1424. {
  1425. "name": "cc_matViewProjInv",
  1426. "typename": "mat4",
  1427. "type": 25,
  1428. "count": 1,
  1429. "precision": "highp "
  1430. },
  1431. {
  1432. "name": "cc_cameraPos",
  1433. "typename": "vec4",
  1434. "type": 16,
  1435. "count": 1,
  1436. "precision": "highp "
  1437. },
  1438. {
  1439. "name": "cc_surfaceTransform",
  1440. "typename": "vec4",
  1441. "type": 16,
  1442. "count": 1,
  1443. "precision": "mediump "
  1444. },
  1445. {
  1446. "name": "cc_screenScale",
  1447. "typename": "vec4",
  1448. "type": 16,
  1449. "count": 1,
  1450. "precision": "mediump "
  1451. },
  1452. {
  1453. "name": "cc_exposure",
  1454. "typename": "vec4",
  1455. "type": 16,
  1456. "count": 1,
  1457. "precision": "mediump "
  1458. },
  1459. {
  1460. "name": "cc_mainLitDir",
  1461. "typename": "vec4",
  1462. "type": 16,
  1463. "count": 1,
  1464. "precision": "mediump "
  1465. },
  1466. {
  1467. "name": "cc_mainLitColor",
  1468. "typename": "vec4",
  1469. "type": 16,
  1470. "count": 1,
  1471. "precision": "mediump "
  1472. },
  1473. {
  1474. "name": "cc_ambientSky",
  1475. "typename": "vec4",
  1476. "type": 16,
  1477. "count": 1,
  1478. "precision": "mediump "
  1479. },
  1480. {
  1481. "name": "cc_ambientGround",
  1482. "typename": "vec4",
  1483. "type": 16,
  1484. "count": 1,
  1485. "precision": "mediump "
  1486. },
  1487. {
  1488. "name": "cc_fogColor",
  1489. "typename": "vec4",
  1490. "type": 16,
  1491. "count": 1,
  1492. "precision": "mediump "
  1493. },
  1494. {
  1495. "name": "cc_fogBase",
  1496. "typename": "vec4",
  1497. "type": 16,
  1498. "count": 1,
  1499. "precision": "mediump "
  1500. },
  1501. {
  1502. "name": "cc_fogAdd",
  1503. "typename": "vec4",
  1504. "type": 16,
  1505. "count": 1,
  1506. "precision": "mediump "
  1507. },
  1508. {
  1509. "name": "cc_nearFar",
  1510. "typename": "vec4",
  1511. "type": 16,
  1512. "count": 1,
  1513. "precision": "mediump "
  1514. },
  1515. {
  1516. "name": "cc_viewPort",
  1517. "typename": "vec4",
  1518. "type": 16,
  1519. "count": 1,
  1520. "precision": "mediump "
  1521. }
  1522. ],
  1523. "defines": [],
  1524. "stageFlags": 17
  1525. }
  1526. ],
  1527. "samplerTextures": [],
  1528. "samplers": [],
  1529. "textures": [],
  1530. "buffers": [],
  1531. "images": [],
  1532. "subpassInputs": []
  1533. }
  1534. ],
  1535. "hash": 1874067885,
  1536. "glsl4": {
  1537. "vert": "\nprecision mediump float;\nlayout(set = 2, binding = 0) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) in highp vec3 a_position;\n#if USE_DASHED_LINE\nlayout(location = 1) in float a_lineDistance;\nlayout(location = 0) out float lineDistance;\n#endif\nvec4 vert () {\n vec4 pos = cc_matProj * (cc_matView * cc_matWorld) * vec4(a_position, 1);\n pos.z -= 0.000001;\n #if USE_DASHED_LINE\n lineDistance = a_lineDistance;\n #endif\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  1538. "frag": "\nprecision mediump float;\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nlayout(set = 1, binding = 0) uniform Constant {\n vec4 mainColor;\n};\nlayout(location = 0) in float lineDistance;\nvec4 back() {\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(vec4(mainColor.rgb, mainColor.a * 0.2));\n #else\n return vec4(mainColor.rgb, mainColor.a * 0.2);\n #endif\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = back(); }"
  1539. },
  1540. "glsl3": {
  1541. "vert": "\nprecision mediump float;\nlayout(std140) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nin highp vec3 a_position;\n#if USE_DASHED_LINE\nin float a_lineDistance;\nout float lineDistance;\n#endif\nvec4 vert () {\n vec4 pos = cc_matProj * (cc_matView * cc_matWorld) * vec4(a_position, 1);\n pos.z -= 0.000001;\n #if USE_DASHED_LINE\n lineDistance = a_lineDistance;\n #endif\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  1542. "frag": "\nprecision mediump float;\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nlayout(std140) uniform Constant {\n vec4 mainColor;\n};\nin float lineDistance;\nvec4 back() {\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(vec4(mainColor.rgb, mainColor.a * 0.2));\n #else\n return vec4(mainColor.rgb, mainColor.a * 0.2);\n #endif\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = back(); }"
  1543. },
  1544. "glsl1": {
  1545. "vert": "\nprecision mediump float;\nuniform highp mat4 cc_matWorld;\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\nattribute highp vec3 a_position;\n#if USE_DASHED_LINE\nattribute float a_lineDistance;\nvarying float lineDistance;\n#endif\nvec4 vert () {\n vec4 pos = cc_matProj * (cc_matView * cc_matWorld) * vec4(a_position, 1);\n pos.z -= 0.000001;\n #if USE_DASHED_LINE\n lineDistance = a_lineDistance;\n #endif\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  1546. "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\n uniform vec4 mainColor;\nvarying float lineDistance;\nvec4 back() {\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(vec4(mainColor.rgb, mainColor.a * 0.2));\n #else\n return vec4(mainColor.rgb, mainColor.a * 0.2);\n #endif\n}\nvoid main() { gl_FragColor = back(); }"
  1547. },
  1548. "builtins": {
  1549. "globals": {
  1550. "blocks": [
  1551. {
  1552. "name": "CCGlobal",
  1553. "defines": []
  1554. },
  1555. {
  1556. "name": "CCCamera",
  1557. "defines": []
  1558. }
  1559. ],
  1560. "samplerTextures": [],
  1561. "buffers": [],
  1562. "images": []
  1563. },
  1564. "locals": {
  1565. "blocks": [
  1566. {
  1567. "name": "CCLocal",
  1568. "defines": []
  1569. }
  1570. ],
  1571. "samplerTextures": [],
  1572. "buffers": [],
  1573. "images": []
  1574. },
  1575. "statistics": {
  1576. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 56,
  1577. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 43
  1578. }
  1579. },
  1580. "defines": [
  1581. {
  1582. "name": "USE_DASHED_LINE",
  1583. "type": "boolean",
  1584. "defines": []
  1585. },
  1586. {
  1587. "name": "USE_FORWARD_PIPELINE",
  1588. "type": "boolean",
  1589. "defines": []
  1590. }
  1591. ],
  1592. "name": "internal/editor/gizmo|line-vs:vert|line-fs:back"
  1593. },
  1594. {
  1595. "blocks": [
  1596. {
  1597. "name": "Constant",
  1598. "members": [
  1599. {
  1600. "name": "mainColor",
  1601. "type": 16,
  1602. "count": 1
  1603. }
  1604. ],
  1605. "defines": [],
  1606. "stageFlags": 16,
  1607. "binding": 0
  1608. }
  1609. ],
  1610. "samplerTextures": [
  1611. {
  1612. "name": "mainTexture",
  1613. "type": 28,
  1614. "count": 1,
  1615. "defines": [],
  1616. "stageFlags": 16,
  1617. "binding": 1
  1618. }
  1619. ],
  1620. "samplers": [],
  1621. "textures": [],
  1622. "buffers": [],
  1623. "images": [],
  1624. "subpassInputs": [],
  1625. "attributes": [
  1626. {
  1627. "name": "a_position",
  1628. "defines": [],
  1629. "format": 32,
  1630. "location": 0
  1631. },
  1632. {
  1633. "name": "a_texCoord",
  1634. "defines": [],
  1635. "format": 21,
  1636. "location": 1
  1637. }
  1638. ],
  1639. "varyings": [
  1640. {
  1641. "name": "uv0",
  1642. "type": 14,
  1643. "count": 1,
  1644. "defines": [],
  1645. "stageFlags": 17,
  1646. "location": 0
  1647. }
  1648. ],
  1649. "fragColors": [
  1650. {
  1651. "name": "cc_FragColor",
  1652. "typename": "vec4",
  1653. "type": 16,
  1654. "count": 1,
  1655. "defines": [],
  1656. "stageFlags": 16,
  1657. "location": 0
  1658. }
  1659. ],
  1660. "descriptors": [
  1661. {
  1662. "rate": 0,
  1663. "blocks": [
  1664. {
  1665. "tags": {
  1666. "builtin": "local"
  1667. },
  1668. "name": "CCLocal",
  1669. "members": [
  1670. {
  1671. "name": "cc_matWorld",
  1672. "typename": "mat4",
  1673. "type": 25,
  1674. "count": 1,
  1675. "precision": "highp "
  1676. },
  1677. {
  1678. "name": "cc_matWorldIT",
  1679. "typename": "mat4",
  1680. "type": 25,
  1681. "count": 1,
  1682. "precision": "highp "
  1683. },
  1684. {
  1685. "name": "cc_lightingMapUVParam",
  1686. "typename": "vec4",
  1687. "type": 16,
  1688. "count": 1,
  1689. "precision": "highp "
  1690. },
  1691. {
  1692. "name": "cc_localShadowBias",
  1693. "typename": "vec4",
  1694. "type": 16,
  1695. "count": 1,
  1696. "precision": "highp "
  1697. },
  1698. {
  1699. "name": "cc_reflectionProbeData1",
  1700. "typename": "vec4",
  1701. "type": 16,
  1702. "count": 1,
  1703. "precision": "highp "
  1704. },
  1705. {
  1706. "name": "cc_reflectionProbeData2",
  1707. "typename": "vec4",
  1708. "type": 16,
  1709. "count": 1,
  1710. "precision": "highp "
  1711. },
  1712. {
  1713. "name": "cc_reflectionProbeBlendData1",
  1714. "typename": "vec4",
  1715. "type": 16,
  1716. "count": 1,
  1717. "precision": "highp "
  1718. },
  1719. {
  1720. "name": "cc_reflectionProbeBlendData2",
  1721. "typename": "vec4",
  1722. "type": 16,
  1723. "count": 1,
  1724. "precision": "highp "
  1725. }
  1726. ],
  1727. "defines": [],
  1728. "stageFlags": 1
  1729. }
  1730. ],
  1731. "samplerTextures": [],
  1732. "samplers": [],
  1733. "textures": [],
  1734. "buffers": [],
  1735. "images": [],
  1736. "subpassInputs": []
  1737. },
  1738. {
  1739. "rate": 1,
  1740. "blocks": [
  1741. {
  1742. "name": "Constant",
  1743. "members": [
  1744. {
  1745. "name": "mainColor",
  1746. "type": 16,
  1747. "count": 1
  1748. }
  1749. ],
  1750. "defines": [],
  1751. "stageFlags": 16,
  1752. "binding": 0
  1753. }
  1754. ],
  1755. "samplerTextures": [
  1756. {
  1757. "name": "mainTexture",
  1758. "type": 28,
  1759. "count": 1,
  1760. "defines": [],
  1761. "stageFlags": 16,
  1762. "binding": 1
  1763. }
  1764. ],
  1765. "samplers": [],
  1766. "textures": [],
  1767. "buffers": [],
  1768. "images": [],
  1769. "subpassInputs": []
  1770. },
  1771. {
  1772. "rate": 2,
  1773. "blocks": [],
  1774. "samplerTextures": [],
  1775. "samplers": [],
  1776. "textures": [],
  1777. "buffers": [],
  1778. "images": [],
  1779. "subpassInputs": []
  1780. },
  1781. {
  1782. "rate": 3,
  1783. "blocks": [
  1784. {
  1785. "tags": {
  1786. "builtin": "global"
  1787. },
  1788. "name": "CCGlobal",
  1789. "members": [
  1790. {
  1791. "name": "cc_time",
  1792. "typename": "vec4",
  1793. "type": 16,
  1794. "count": 1,
  1795. "precision": "highp "
  1796. },
  1797. {
  1798. "name": "cc_screenSize",
  1799. "typename": "vec4",
  1800. "type": 16,
  1801. "count": 1,
  1802. "precision": "mediump "
  1803. },
  1804. {
  1805. "name": "cc_nativeSize",
  1806. "typename": "vec4",
  1807. "type": 16,
  1808. "count": 1,
  1809. "precision": "mediump "
  1810. },
  1811. {
  1812. "name": "cc_probeInfo",
  1813. "typename": "vec4",
  1814. "type": 16,
  1815. "count": 1,
  1816. "precision": "mediump "
  1817. },
  1818. {
  1819. "name": "cc_debug_view_mode",
  1820. "typename": "vec4",
  1821. "type": 16,
  1822. "count": 1,
  1823. "precision": "mediump "
  1824. }
  1825. ],
  1826. "defines": [],
  1827. "stageFlags": 17
  1828. },
  1829. {
  1830. "tags": {
  1831. "builtin": "global"
  1832. },
  1833. "name": "CCCamera",
  1834. "members": [
  1835. {
  1836. "name": "cc_matView",
  1837. "typename": "mat4",
  1838. "type": 25,
  1839. "count": 1,
  1840. "precision": "highp "
  1841. },
  1842. {
  1843. "name": "cc_matViewInv",
  1844. "typename": "mat4",
  1845. "type": 25,
  1846. "count": 1,
  1847. "precision": "highp "
  1848. },
  1849. {
  1850. "name": "cc_matProj",
  1851. "typename": "mat4",
  1852. "type": 25,
  1853. "count": 1,
  1854. "precision": "highp "
  1855. },
  1856. {
  1857. "name": "cc_matProjInv",
  1858. "typename": "mat4",
  1859. "type": 25,
  1860. "count": 1,
  1861. "precision": "highp "
  1862. },
  1863. {
  1864. "name": "cc_matViewProj",
  1865. "typename": "mat4",
  1866. "type": 25,
  1867. "count": 1,
  1868. "precision": "highp "
  1869. },
  1870. {
  1871. "name": "cc_matViewProjInv",
  1872. "typename": "mat4",
  1873. "type": 25,
  1874. "count": 1,
  1875. "precision": "highp "
  1876. },
  1877. {
  1878. "name": "cc_cameraPos",
  1879. "typename": "vec4",
  1880. "type": 16,
  1881. "count": 1,
  1882. "precision": "highp "
  1883. },
  1884. {
  1885. "name": "cc_surfaceTransform",
  1886. "typename": "vec4",
  1887. "type": 16,
  1888. "count": 1,
  1889. "precision": "mediump "
  1890. },
  1891. {
  1892. "name": "cc_screenScale",
  1893. "typename": "vec4",
  1894. "type": 16,
  1895. "count": 1,
  1896. "precision": "mediump "
  1897. },
  1898. {
  1899. "name": "cc_exposure",
  1900. "typename": "vec4",
  1901. "type": 16,
  1902. "count": 1,
  1903. "precision": "mediump "
  1904. },
  1905. {
  1906. "name": "cc_mainLitDir",
  1907. "typename": "vec4",
  1908. "type": 16,
  1909. "count": 1,
  1910. "precision": "mediump "
  1911. },
  1912. {
  1913. "name": "cc_mainLitColor",
  1914. "typename": "vec4",
  1915. "type": 16,
  1916. "count": 1,
  1917. "precision": "mediump "
  1918. },
  1919. {
  1920. "name": "cc_ambientSky",
  1921. "typename": "vec4",
  1922. "type": 16,
  1923. "count": 1,
  1924. "precision": "mediump "
  1925. },
  1926. {
  1927. "name": "cc_ambientGround",
  1928. "typename": "vec4",
  1929. "type": 16,
  1930. "count": 1,
  1931. "precision": "mediump "
  1932. },
  1933. {
  1934. "name": "cc_fogColor",
  1935. "typename": "vec4",
  1936. "type": 16,
  1937. "count": 1,
  1938. "precision": "mediump "
  1939. },
  1940. {
  1941. "name": "cc_fogBase",
  1942. "typename": "vec4",
  1943. "type": 16,
  1944. "count": 1,
  1945. "precision": "mediump "
  1946. },
  1947. {
  1948. "name": "cc_fogAdd",
  1949. "typename": "vec4",
  1950. "type": 16,
  1951. "count": 1,
  1952. "precision": "mediump "
  1953. },
  1954. {
  1955. "name": "cc_nearFar",
  1956. "typename": "vec4",
  1957. "type": 16,
  1958. "count": 1,
  1959. "precision": "mediump "
  1960. },
  1961. {
  1962. "name": "cc_viewPort",
  1963. "typename": "vec4",
  1964. "type": 16,
  1965. "count": 1,
  1966. "precision": "mediump "
  1967. }
  1968. ],
  1969. "defines": [],
  1970. "stageFlags": 17
  1971. }
  1972. ],
  1973. "samplerTextures": [],
  1974. "samplers": [],
  1975. "textures": [],
  1976. "buffers": [],
  1977. "images": [],
  1978. "subpassInputs": []
  1979. }
  1980. ],
  1981. "hash": 23764200,
  1982. "glsl4": {
  1983. "vert": "\nprecision mediump float;\nlayout(set = 2, binding = 0) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec2 a_texCoord;\nlayout(location = 0) out vec2 uv0;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n pos = cc_matProj * (cc_matView * cc_matWorld) * pos;\n uv0 = a_texCoord;\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  1984. "frag": "\nprecision mediump float;\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) in vec2 uv0;\nlayout(set = 1, binding = 0) uniform Constant {\n vec4 mainColor;\n};\nlayout(set = 1, binding = 1) uniform sampler2D mainTexture;\nvec4 frag () {\n vec4 o = vec4(1, 1, 1, 1);\n o *= texture(mainTexture, uv0);\n o *= mainColor;\n return o;\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  1985. },
  1986. "glsl3": {
  1987. "vert": "\nprecision mediump float;\nlayout(std140) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nin vec3 a_position;\nin vec2 a_texCoord;\nout vec2 uv0;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n pos = cc_matProj * (cc_matView * cc_matWorld) * pos;\n uv0 = a_texCoord;\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  1988. "frag": "\nprecision mediump float;\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nin vec2 uv0;\nlayout(std140) uniform Constant {\n vec4 mainColor;\n};\nuniform sampler2D mainTexture;\nvec4 frag () {\n vec4 o = vec4(1, 1, 1, 1);\n o *= texture(mainTexture, uv0);\n o *= mainColor;\n return o;\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  1989. },
  1990. "glsl1": {
  1991. "vert": "\nprecision mediump float;\nuniform highp mat4 cc_matWorld;\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\nattribute vec3 a_position;\nattribute vec2 a_texCoord;\nvarying vec2 uv0;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n pos = cc_matProj * (cc_matView * cc_matWorld) * pos;\n uv0 = a_texCoord;\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  1992. "frag": "\nprecision mediump float;\nvarying vec2 uv0;\n uniform vec4 mainColor;\nuniform sampler2D mainTexture;\nvec4 frag () {\n vec4 o = vec4(1, 1, 1, 1);\n o *= texture2D(mainTexture, uv0);\n o *= mainColor;\n return o;\n}\nvoid main() { gl_FragColor = frag(); }"
  1993. },
  1994. "builtins": {
  1995. "globals": {
  1996. "blocks": [
  1997. {
  1998. "name": "CCGlobal",
  1999. "defines": []
  2000. },
  2001. {
  2002. "name": "CCCamera",
  2003. "defines": []
  2004. }
  2005. ],
  2006. "samplerTextures": [],
  2007. "buffers": [],
  2008. "images": []
  2009. },
  2010. "locals": {
  2011. "blocks": [
  2012. {
  2013. "name": "CCLocal",
  2014. "defines": []
  2015. }
  2016. ],
  2017. "samplerTextures": [],
  2018. "buffers": [],
  2019. "images": []
  2020. },
  2021. "statistics": {
  2022. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 56,
  2023. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 43
  2024. }
  2025. },
  2026. "defines": [],
  2027. "name": "internal/editor/gizmo|sprite-vs:vert|sprite-fs:frag"
  2028. },
  2029. {
  2030. "blocks": [
  2031. {
  2032. "name": "Constant",
  2033. "members": [
  2034. {
  2035. "name": "mainColor",
  2036. "type": 16,
  2037. "count": 1
  2038. },
  2039. {
  2040. "name": "cc_sh_linear_const_r",
  2041. "type": 16,
  2042. "count": 1
  2043. },
  2044. {
  2045. "name": "cc_sh_linear_const_g",
  2046. "type": 16,
  2047. "count": 1
  2048. },
  2049. {
  2050. "name": "cc_sh_linear_const_b",
  2051. "type": 16,
  2052. "count": 1
  2053. },
  2054. {
  2055. "name": "cc_sh_quadratic_r",
  2056. "type": 16,
  2057. "count": 1
  2058. },
  2059. {
  2060. "name": "cc_sh_quadratic_g",
  2061. "type": 16,
  2062. "count": 1
  2063. },
  2064. {
  2065. "name": "cc_sh_quadratic_b",
  2066. "type": 16,
  2067. "count": 1
  2068. },
  2069. {
  2070. "name": "cc_sh_quadratic_a",
  2071. "type": 16,
  2072. "count": 1
  2073. }
  2074. ],
  2075. "defines": [],
  2076. "stageFlags": 16,
  2077. "binding": 0
  2078. }
  2079. ],
  2080. "samplerTextures": [],
  2081. "samplers": [],
  2082. "textures": [],
  2083. "buffers": [],
  2084. "images": [],
  2085. "subpassInputs": [],
  2086. "attributes": [
  2087. {
  2088. "name": "a_position",
  2089. "defines": [],
  2090. "format": 32,
  2091. "location": 0
  2092. },
  2093. {
  2094. "name": "a_normal",
  2095. "defines": [],
  2096. "format": 32,
  2097. "location": 1
  2098. }
  2099. ],
  2100. "varyings": [
  2101. {
  2102. "name": "normal_w",
  2103. "type": 15,
  2104. "count": 1,
  2105. "defines": [],
  2106. "stageFlags": 17,
  2107. "location": 0
  2108. },
  2109. {
  2110. "name": "pos_w",
  2111. "type": 15,
  2112. "count": 1,
  2113. "defines": [],
  2114. "stageFlags": 17,
  2115. "location": 1
  2116. },
  2117. {
  2118. "name": "pos_l",
  2119. "type": 15,
  2120. "count": 1,
  2121. "defines": [],
  2122. "stageFlags": 17,
  2123. "location": 2
  2124. },
  2125. {
  2126. "name": "right",
  2127. "type": 15,
  2128. "count": 1,
  2129. "defines": [],
  2130. "stageFlags": 17,
  2131. "location": 3
  2132. },
  2133. {
  2134. "name": "up",
  2135. "type": 15,
  2136. "count": 1,
  2137. "defines": [],
  2138. "stageFlags": 17,
  2139. "location": 4
  2140. },
  2141. {
  2142. "name": "forward",
  2143. "type": 15,
  2144. "count": 1,
  2145. "defines": [],
  2146. "stageFlags": 17,
  2147. "location": 5
  2148. }
  2149. ],
  2150. "fragColors": [
  2151. {
  2152. "name": "cc_FragColor",
  2153. "typename": "vec4",
  2154. "type": 16,
  2155. "count": 1,
  2156. "defines": [],
  2157. "stageFlags": 16,
  2158. "location": 0
  2159. }
  2160. ],
  2161. "descriptors": [
  2162. {
  2163. "rate": 0,
  2164. "blocks": [
  2165. {
  2166. "tags": {
  2167. "builtin": "local"
  2168. },
  2169. "name": "CCLocal",
  2170. "members": [
  2171. {
  2172. "name": "cc_matWorld",
  2173. "typename": "mat4",
  2174. "type": 25,
  2175. "count": 1,
  2176. "precision": "highp "
  2177. },
  2178. {
  2179. "name": "cc_matWorldIT",
  2180. "typename": "mat4",
  2181. "type": 25,
  2182. "count": 1,
  2183. "precision": "highp "
  2184. },
  2185. {
  2186. "name": "cc_lightingMapUVParam",
  2187. "typename": "vec4",
  2188. "type": 16,
  2189. "count": 1,
  2190. "precision": "highp "
  2191. },
  2192. {
  2193. "name": "cc_localShadowBias",
  2194. "typename": "vec4",
  2195. "type": 16,
  2196. "count": 1,
  2197. "precision": "highp "
  2198. },
  2199. {
  2200. "name": "cc_reflectionProbeData1",
  2201. "typename": "vec4",
  2202. "type": 16,
  2203. "count": 1,
  2204. "precision": "highp "
  2205. },
  2206. {
  2207. "name": "cc_reflectionProbeData2",
  2208. "typename": "vec4",
  2209. "type": 16,
  2210. "count": 1,
  2211. "precision": "highp "
  2212. },
  2213. {
  2214. "name": "cc_reflectionProbeBlendData1",
  2215. "typename": "vec4",
  2216. "type": 16,
  2217. "count": 1,
  2218. "precision": "highp "
  2219. },
  2220. {
  2221. "name": "cc_reflectionProbeBlendData2",
  2222. "typename": "vec4",
  2223. "type": 16,
  2224. "count": 1,
  2225. "precision": "highp "
  2226. }
  2227. ],
  2228. "defines": [],
  2229. "stageFlags": 1
  2230. }
  2231. ],
  2232. "samplerTextures": [],
  2233. "samplers": [],
  2234. "textures": [],
  2235. "buffers": [],
  2236. "images": [],
  2237. "subpassInputs": []
  2238. },
  2239. {
  2240. "rate": 1,
  2241. "blocks": [
  2242. {
  2243. "name": "Constant",
  2244. "members": [
  2245. {
  2246. "name": "mainColor",
  2247. "type": 16,
  2248. "count": 1
  2249. },
  2250. {
  2251. "name": "cc_sh_linear_const_r",
  2252. "type": 16,
  2253. "count": 1
  2254. },
  2255. {
  2256. "name": "cc_sh_linear_const_g",
  2257. "type": 16,
  2258. "count": 1
  2259. },
  2260. {
  2261. "name": "cc_sh_linear_const_b",
  2262. "type": 16,
  2263. "count": 1
  2264. },
  2265. {
  2266. "name": "cc_sh_quadratic_r",
  2267. "type": 16,
  2268. "count": 1
  2269. },
  2270. {
  2271. "name": "cc_sh_quadratic_g",
  2272. "type": 16,
  2273. "count": 1
  2274. },
  2275. {
  2276. "name": "cc_sh_quadratic_b",
  2277. "type": 16,
  2278. "count": 1
  2279. },
  2280. {
  2281. "name": "cc_sh_quadratic_a",
  2282. "type": 16,
  2283. "count": 1
  2284. }
  2285. ],
  2286. "defines": [],
  2287. "stageFlags": 16,
  2288. "binding": 0
  2289. }
  2290. ],
  2291. "samplerTextures": [],
  2292. "samplers": [],
  2293. "textures": [],
  2294. "buffers": [],
  2295. "images": [],
  2296. "subpassInputs": []
  2297. },
  2298. {
  2299. "rate": 2,
  2300. "blocks": [],
  2301. "samplerTextures": [],
  2302. "samplers": [],
  2303. "textures": [],
  2304. "buffers": [],
  2305. "images": [],
  2306. "subpassInputs": []
  2307. },
  2308. {
  2309. "rate": 3,
  2310. "blocks": [
  2311. {
  2312. "tags": {
  2313. "builtin": "global"
  2314. },
  2315. "name": "CCGlobal",
  2316. "members": [
  2317. {
  2318. "name": "cc_time",
  2319. "typename": "vec4",
  2320. "type": 16,
  2321. "count": 1,
  2322. "precision": "highp "
  2323. },
  2324. {
  2325. "name": "cc_screenSize",
  2326. "typename": "vec4",
  2327. "type": 16,
  2328. "count": 1,
  2329. "precision": "mediump "
  2330. },
  2331. {
  2332. "name": "cc_nativeSize",
  2333. "typename": "vec4",
  2334. "type": 16,
  2335. "count": 1,
  2336. "precision": "mediump "
  2337. },
  2338. {
  2339. "name": "cc_probeInfo",
  2340. "typename": "vec4",
  2341. "type": 16,
  2342. "count": 1,
  2343. "precision": "mediump "
  2344. },
  2345. {
  2346. "name": "cc_debug_view_mode",
  2347. "typename": "vec4",
  2348. "type": 16,
  2349. "count": 1,
  2350. "precision": "mediump "
  2351. }
  2352. ],
  2353. "defines": [],
  2354. "stageFlags": 17
  2355. },
  2356. {
  2357. "tags": {
  2358. "builtin": "global"
  2359. },
  2360. "name": "CCCamera",
  2361. "members": [
  2362. {
  2363. "name": "cc_matView",
  2364. "typename": "mat4",
  2365. "type": 25,
  2366. "count": 1,
  2367. "precision": "highp "
  2368. },
  2369. {
  2370. "name": "cc_matViewInv",
  2371. "typename": "mat4",
  2372. "type": 25,
  2373. "count": 1,
  2374. "precision": "highp "
  2375. },
  2376. {
  2377. "name": "cc_matProj",
  2378. "typename": "mat4",
  2379. "type": 25,
  2380. "count": 1,
  2381. "precision": "highp "
  2382. },
  2383. {
  2384. "name": "cc_matProjInv",
  2385. "typename": "mat4",
  2386. "type": 25,
  2387. "count": 1,
  2388. "precision": "highp "
  2389. },
  2390. {
  2391. "name": "cc_matViewProj",
  2392. "typename": "mat4",
  2393. "type": 25,
  2394. "count": 1,
  2395. "precision": "highp "
  2396. },
  2397. {
  2398. "name": "cc_matViewProjInv",
  2399. "typename": "mat4",
  2400. "type": 25,
  2401. "count": 1,
  2402. "precision": "highp "
  2403. },
  2404. {
  2405. "name": "cc_cameraPos",
  2406. "typename": "vec4",
  2407. "type": 16,
  2408. "count": 1,
  2409. "precision": "highp "
  2410. },
  2411. {
  2412. "name": "cc_surfaceTransform",
  2413. "typename": "vec4",
  2414. "type": 16,
  2415. "count": 1,
  2416. "precision": "mediump "
  2417. },
  2418. {
  2419. "name": "cc_screenScale",
  2420. "typename": "vec4",
  2421. "type": 16,
  2422. "count": 1,
  2423. "precision": "mediump "
  2424. },
  2425. {
  2426. "name": "cc_exposure",
  2427. "typename": "vec4",
  2428. "type": 16,
  2429. "count": 1,
  2430. "precision": "mediump "
  2431. },
  2432. {
  2433. "name": "cc_mainLitDir",
  2434. "typename": "vec4",
  2435. "type": 16,
  2436. "count": 1,
  2437. "precision": "mediump "
  2438. },
  2439. {
  2440. "name": "cc_mainLitColor",
  2441. "typename": "vec4",
  2442. "type": 16,
  2443. "count": 1,
  2444. "precision": "mediump "
  2445. },
  2446. {
  2447. "name": "cc_ambientSky",
  2448. "typename": "vec4",
  2449. "type": 16,
  2450. "count": 1,
  2451. "precision": "mediump "
  2452. },
  2453. {
  2454. "name": "cc_ambientGround",
  2455. "typename": "vec4",
  2456. "type": 16,
  2457. "count": 1,
  2458. "precision": "mediump "
  2459. },
  2460. {
  2461. "name": "cc_fogColor",
  2462. "typename": "vec4",
  2463. "type": 16,
  2464. "count": 1,
  2465. "precision": "mediump "
  2466. },
  2467. {
  2468. "name": "cc_fogBase",
  2469. "typename": "vec4",
  2470. "type": 16,
  2471. "count": 1,
  2472. "precision": "mediump "
  2473. },
  2474. {
  2475. "name": "cc_fogAdd",
  2476. "typename": "vec4",
  2477. "type": 16,
  2478. "count": 1,
  2479. "precision": "mediump "
  2480. },
  2481. {
  2482. "name": "cc_nearFar",
  2483. "typename": "vec4",
  2484. "type": 16,
  2485. "count": 1,
  2486. "precision": "mediump "
  2487. },
  2488. {
  2489. "name": "cc_viewPort",
  2490. "typename": "vec4",
  2491. "type": 16,
  2492. "count": 1,
  2493. "precision": "mediump "
  2494. }
  2495. ],
  2496. "defines": [],
  2497. "stageFlags": 17
  2498. }
  2499. ],
  2500. "samplerTextures": [],
  2501. "samplers": [],
  2502. "textures": [],
  2503. "buffers": [],
  2504. "images": [],
  2505. "subpassInputs": []
  2506. }
  2507. ],
  2508. "hash": 1901399757,
  2509. "glsl4": {
  2510. "vert": "\nprecision mediump float;\nlayout(set = 2, binding = 0) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 0) out vec3 normal_w;\nlayout(location = 1) out vec3 pos_w;\nlayout(location = 2) out vec3 pos_l;\nlayout(location = 3) out vec3 right;\nlayout(location = 4) out vec3 up;\nlayout(location = 5) out vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
  2511. "frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nlayout(location = 0) in vec3 normal_w;\nlayout(location = 1) in vec3 pos_w;\nlayout(location = 2) in vec3 pos_l;\nlayout(location = 3) in vec3 right;\nlayout(location = 4) in vec3 up;\nlayout(location = 5) in vec3 forward;\nlayout(set = 1, binding = 0) uniform Constant {\n vec4 mainColor;\n vec4 cc_sh_linear_const_r;\n vec4 cc_sh_linear_const_g;\n vec4 cc_sh_linear_const_b;\n vec4 cc_sh_quadratic_r;\n vec4 cc_sh_quadratic_g;\n vec4 cc_sh_quadratic_b;\n vec4 cc_sh_quadratic_a;\n};\nvec4 gizmo_fs (float alpha) {\n vec3 N = normalize(normal_w) * (float(gl_FrontFacing) * 2.0 - 1.0);\n vec3 V = normalize(cc_cameraPos.xyz - pos_w);\n vec3 points [4];\n points[0] = (forward * 3.0 + right + up) * 40.0;\n points[1] = (forward * 3.0 - right + up) * 40.0;\n points[2] = (forward * 3.0 - right - up) * 40.0;\n points[3] = (forward * 3.0 + right - up) * 40.0;\n vec3 diffuse = LinearToSRGB(mainColor.rgb * LTC_Evaluate(N, V, pos_l, mat3(1), points));\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(vec4(diffuse, mainColor.a * alpha));\n #else\n return vec4(diffuse, mainColor.a * alpha);\n #endif\n}\nvec4 back () {\n return gizmo_fs(0.2);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = back(); }"
  2512. },
  2513. "glsl3": {
  2514. "vert": "\nprecision mediump float;\nlayout(std140) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nin vec3 a_position;\nin vec3 a_normal;\nout vec3 normal_w;\nout vec3 pos_w;\nout vec3 pos_l;\nout vec3 right;\nout vec3 up;\nout vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
  2515. "frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nin vec3 normal_w;\nin vec3 pos_w;\nin vec3 pos_l;\nin vec3 right;\nin vec3 up;\nin vec3 forward;\nlayout(std140) uniform Constant {\n vec4 mainColor;\n vec4 cc_sh_linear_const_r;\n vec4 cc_sh_linear_const_g;\n vec4 cc_sh_linear_const_b;\n vec4 cc_sh_quadratic_r;\n vec4 cc_sh_quadratic_g;\n vec4 cc_sh_quadratic_b;\n vec4 cc_sh_quadratic_a;\n};\nvec4 gizmo_fs (float alpha) {\n vec3 N = normalize(normal_w) * (float(gl_FrontFacing) * 2.0 - 1.0);\n vec3 V = normalize(cc_cameraPos.xyz - pos_w);\n vec3 points [4];\n points[0] = (forward * 3.0 + right + up) * 40.0;\n points[1] = (forward * 3.0 - right + up) * 40.0;\n points[2] = (forward * 3.0 - right - up) * 40.0;\n points[3] = (forward * 3.0 + right - up) * 40.0;\n vec3 diffuse = LinearToSRGB(mainColor.rgb * LTC_Evaluate(N, V, pos_l, mat3(1), points));\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(vec4(diffuse, mainColor.a * alpha));\n #else\n return vec4(diffuse, mainColor.a * alpha);\n #endif\n}\nvec4 back () {\n return gizmo_fs(0.2);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = back(); }"
  2516. },
  2517. "glsl1": {
  2518. "vert": "\nprecision mediump float;\nuniform highp mat4 cc_matWorld;\n uniform highp mat4 cc_matWorldIT;\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\nattribute vec3 a_position;\nattribute vec3 a_normal;\nvarying vec3 normal_w;\nvarying vec3 pos_w;\nvarying vec3 pos_l;\nvarying vec3 right;\nvarying vec3 up;\nvarying vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
  2519. "frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nuniform highp vec4 cc_cameraPos;\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nvarying vec3 normal_w;\nvarying vec3 pos_w;\nvarying vec3 pos_l;\nvarying vec3 right;\nvarying vec3 up;\nvarying vec3 forward;\n uniform vec4 mainColor;\nvec4 gizmo_fs (float alpha) {\n vec3 N = normalize(normal_w) * (float(gl_FrontFacing) * 2.0 - 1.0);\n vec3 V = normalize(cc_cameraPos.xyz - pos_w);\n vec3 points [4];\n points[0] = (forward * 3.0 + right + up) * 40.0;\n points[1] = (forward * 3.0 - right + up) * 40.0;\n points[2] = (forward * 3.0 - right - up) * 40.0;\n points[3] = (forward * 3.0 + right - up) * 40.0;\n vec3 diffuse = LinearToSRGB(mainColor.rgb * LTC_Evaluate(N, V, pos_l, mat3(1), points));\n #if USE_FORWARD_PIPELINE\n return CCFragOutput(vec4(diffuse, mainColor.a * alpha));\n #else\n return vec4(diffuse, mainColor.a * alpha);\n #endif\n}\nvec4 back () {\n return gizmo_fs(0.2);\n}\nvoid main() { gl_FragColor = back(); }"
  2520. },
  2521. "builtins": {
  2522. "globals": {
  2523. "blocks": [
  2524. {
  2525. "name": "CCGlobal",
  2526. "defines": []
  2527. },
  2528. {
  2529. "name": "CCCamera",
  2530. "defines": []
  2531. }
  2532. ],
  2533. "samplerTextures": [],
  2534. "buffers": [],
  2535. "images": []
  2536. },
  2537. "locals": {
  2538. "blocks": [
  2539. {
  2540. "name": "CCLocal",
  2541. "defines": []
  2542. }
  2543. ],
  2544. "samplerTextures": [],
  2545. "buffers": [],
  2546. "images": []
  2547. },
  2548. "statistics": {
  2549. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 56,
  2550. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 50
  2551. }
  2552. },
  2553. "defines": [
  2554. {
  2555. "name": "CC_USE_DEBUG_VIEW",
  2556. "type": "number",
  2557. "defines": [],
  2558. "range": [
  2559. 0,
  2560. 3
  2561. ]
  2562. },
  2563. {
  2564. "name": "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC",
  2565. "type": "boolean",
  2566. "defines": [
  2567. "CC_USE_DEBUG_VIEW"
  2568. ]
  2569. },
  2570. {
  2571. "name": "CC_SURFACES_ENABLE_DEBUG_VIEW",
  2572. "type": "boolean",
  2573. "defines": [
  2574. "CC_USE_DEBUG_VIEW",
  2575. "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC"
  2576. ]
  2577. },
  2578. {
  2579. "name": "USE_FORWARD_PIPELINE",
  2580. "type": "boolean",
  2581. "defines": []
  2582. }
  2583. ],
  2584. "name": "internal/editor/gizmo|gizmo-vs:vert|gizmo-fs:back"
  2585. }
  2586. ],
  2587. "combinations": [],
  2588. "hideInEditor": true
  2589. }