release.json 127 KB

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