bf4078d6-d2d7-4073-83bb-cd6f1802e880.json 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "internal/builtin-camera-texture",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "name": "opaque",
  10. "passes": [
  11. {
  12. "program": "internal/builtin-camera-texture|camera-texture-vs:vert|camera-texture-fs:frag",
  13. "properties": {
  14. "mainTexture": {
  15. "value": "grey",
  16. "type": 28
  17. },
  18. "tilingOffset": {
  19. "value": [
  20. 1,
  21. 1,
  22. 0,
  23. 0
  24. ],
  25. "type": 16
  26. },
  27. "mainColor": {
  28. "value": [
  29. 1,
  30. 1,
  31. 1,
  32. 1
  33. ],
  34. "editor": {
  35. "type": "color"
  36. },
  37. "type": 16
  38. },
  39. "colorScale": {
  40. "value": [
  41. 1,
  42. 1,
  43. 1
  44. ],
  45. "type": 15,
  46. "handleInfo": [
  47. "colorScaleAndCutoff",
  48. 0,
  49. 15
  50. ]
  51. },
  52. "alphaThreshold": {
  53. "value": [
  54. 0.5
  55. ],
  56. "editor": {
  57. "parent": "USE_ALPHA_TEST"
  58. },
  59. "type": 13,
  60. "handleInfo": [
  61. "colorScaleAndCutoff",
  62. 3,
  63. 13
  64. ]
  65. },
  66. "color": {
  67. "editor": {
  68. "visible": false
  69. },
  70. "type": 16,
  71. "handleInfo": [
  72. "mainColor",
  73. 0,
  74. 16
  75. ]
  76. },
  77. "colorScaleAndCutoff": {
  78. "type": 16,
  79. "editor": {
  80. "visible": false,
  81. "deprecated": true
  82. },
  83. "value": [
  84. 1,
  85. 1,
  86. 1,
  87. 0.5
  88. ]
  89. }
  90. },
  91. "migrations": {
  92. "properties": {
  93. "mainColor": {
  94. "formerlySerializedAs": "color"
  95. }
  96. }
  97. }
  98. }
  99. ]
  100. },
  101. {
  102. "name": "transparent",
  103. "passes": [
  104. {
  105. "blendState": {
  106. "targets": [
  107. {
  108. "blend": true,
  109. "blendSrc": 2,
  110. "blendDst": 4,
  111. "blendDstAlpha": 4
  112. }
  113. ]
  114. },
  115. "program": "internal/builtin-camera-texture|camera-texture-vs:vert|camera-texture-fs:frag",
  116. "depthStencilState": {
  117. "depthTest": true,
  118. "depthWrite": false
  119. },
  120. "properties": {
  121. "mainTexture": {
  122. "value": "grey",
  123. "type": 28
  124. },
  125. "tilingOffset": {
  126. "value": [
  127. 1,
  128. 1,
  129. 0,
  130. 0
  131. ],
  132. "type": 16
  133. },
  134. "mainColor": {
  135. "value": [
  136. 1,
  137. 1,
  138. 1,
  139. 1
  140. ],
  141. "editor": {
  142. "type": "color"
  143. },
  144. "type": 16
  145. },
  146. "colorScale": {
  147. "value": [
  148. 1,
  149. 1,
  150. 1
  151. ],
  152. "type": 15,
  153. "handleInfo": [
  154. "colorScaleAndCutoff",
  155. 0,
  156. 15
  157. ]
  158. },
  159. "alphaThreshold": {
  160. "value": [
  161. 0.5
  162. ],
  163. "editor": {
  164. "parent": "USE_ALPHA_TEST"
  165. },
  166. "type": 13,
  167. "handleInfo": [
  168. "colorScaleAndCutoff",
  169. 3,
  170. 13
  171. ]
  172. },
  173. "color": {
  174. "editor": {
  175. "visible": false
  176. },
  177. "type": 16,
  178. "handleInfo": [
  179. "mainColor",
  180. 0,
  181. 16
  182. ]
  183. },
  184. "colorScaleAndCutoff": {
  185. "type": 16,
  186. "editor": {
  187. "visible": false,
  188. "deprecated": true
  189. },
  190. "value": [
  191. 1,
  192. 1,
  193. 1,
  194. 0.5
  195. ]
  196. }
  197. },
  198. "migrations": {
  199. "properties": {
  200. "mainColor": {
  201. "formerlySerializedAs": "color"
  202. }
  203. }
  204. }
  205. }
  206. ]
  207. },
  208. {
  209. "name": "add",
  210. "passes": [
  211. {
  212. "rasterizerState": {
  213. "cullMode": 0
  214. },
  215. "blendState": {
  216. "targets": [
  217. {
  218. "blend": true,
  219. "blendSrc": 2,
  220. "blendDst": 1,
  221. "blendSrcAlpha": 2,
  222. "blendDstAlpha": 1
  223. }
  224. ]
  225. },
  226. "program": "internal/builtin-camera-texture|camera-texture-vs:vert|camera-texture-fs:frag",
  227. "depthStencilState": {
  228. "depthTest": true,
  229. "depthWrite": false
  230. },
  231. "properties": {
  232. "mainTexture": {
  233. "value": "grey",
  234. "type": 28
  235. },
  236. "tilingOffset": {
  237. "value": [
  238. 1,
  239. 1,
  240. 0,
  241. 0
  242. ],
  243. "type": 16
  244. },
  245. "mainColor": {
  246. "value": [
  247. 1,
  248. 1,
  249. 1,
  250. 1
  251. ],
  252. "editor": {
  253. "type": "color"
  254. },
  255. "type": 16
  256. },
  257. "colorScale": {
  258. "value": [
  259. 1,
  260. 1,
  261. 1
  262. ],
  263. "type": 15,
  264. "handleInfo": [
  265. "colorScaleAndCutoff",
  266. 0,
  267. 15
  268. ]
  269. },
  270. "alphaThreshold": {
  271. "value": [
  272. 0.5
  273. ],
  274. "editor": {
  275. "parent": "USE_ALPHA_TEST"
  276. },
  277. "type": 13,
  278. "handleInfo": [
  279. "colorScaleAndCutoff",
  280. 3,
  281. 13
  282. ]
  283. },
  284. "color": {
  285. "editor": {
  286. "visible": false
  287. },
  288. "type": 16,
  289. "handleInfo": [
  290. "mainColor",
  291. 0,
  292. 16
  293. ]
  294. },
  295. "colorScaleAndCutoff": {
  296. "type": 16,
  297. "editor": {
  298. "visible": false,
  299. "deprecated": true
  300. },
  301. "value": [
  302. 1,
  303. 1,
  304. 1,
  305. 0.5
  306. ]
  307. }
  308. },
  309. "migrations": {
  310. "properties": {
  311. "mainColor": {
  312. "formerlySerializedAs": "color"
  313. }
  314. }
  315. }
  316. }
  317. ]
  318. },
  319. {
  320. "name": "alpha-blend",
  321. "passes": [
  322. {
  323. "rasterizerState": {
  324. "cullMode": 0
  325. },
  326. "blendState": {
  327. "targets": [
  328. {
  329. "blend": true,
  330. "blendSrc": 2,
  331. "blendDst": 4,
  332. "blendSrcAlpha": 2,
  333. "blendDstAlpha": 4
  334. }
  335. ]
  336. },
  337. "program": "internal/builtin-camera-texture|camera-texture-vs:vert|camera-texture-fs:frag",
  338. "depthStencilState": {
  339. "depthTest": true,
  340. "depthWrite": false
  341. },
  342. "properties": {
  343. "mainTexture": {
  344. "value": "grey",
  345. "type": 28
  346. },
  347. "tilingOffset": {
  348. "value": [
  349. 1,
  350. 1,
  351. 0,
  352. 0
  353. ],
  354. "type": 16
  355. },
  356. "mainColor": {
  357. "value": [
  358. 1,
  359. 1,
  360. 1,
  361. 1
  362. ],
  363. "editor": {
  364. "type": "color"
  365. },
  366. "type": 16
  367. },
  368. "colorScale": {
  369. "value": [
  370. 1,
  371. 1,
  372. 1
  373. ],
  374. "type": 15,
  375. "handleInfo": [
  376. "colorScaleAndCutoff",
  377. 0,
  378. 15
  379. ]
  380. },
  381. "alphaThreshold": {
  382. "value": [
  383. 0.5
  384. ],
  385. "editor": {
  386. "parent": "USE_ALPHA_TEST"
  387. },
  388. "type": 13,
  389. "handleInfo": [
  390. "colorScaleAndCutoff",
  391. 3,
  392. 13
  393. ]
  394. },
  395. "color": {
  396. "editor": {
  397. "visible": false
  398. },
  399. "type": 16,
  400. "handleInfo": [
  401. "mainColor",
  402. 0,
  403. 16
  404. ]
  405. },
  406. "colorScaleAndCutoff": {
  407. "type": 16,
  408. "editor": {
  409. "visible": false,
  410. "deprecated": true
  411. },
  412. "value": [
  413. 1,
  414. 1,
  415. 1,
  416. 0.5
  417. ]
  418. }
  419. },
  420. "migrations": {
  421. "properties": {
  422. "mainColor": {
  423. "formerlySerializedAs": "color"
  424. }
  425. }
  426. }
  427. }
  428. ]
  429. }
  430. ],
  431. "shaders": [
  432. {
  433. "blocks": [
  434. {
  435. "name": "TexCoords",
  436. "members": [
  437. {
  438. "name": "tilingOffset",
  439. "type": 16,
  440. "count": 1
  441. }
  442. ],
  443. "defines": [
  444. "USE_TEXTURE"
  445. ],
  446. "stageFlags": 1,
  447. "binding": 0
  448. },
  449. {
  450. "name": "Constant",
  451. "members": [
  452. {
  453. "name": "mainColor",
  454. "type": 16,
  455. "count": 1
  456. },
  457. {
  458. "name": "colorScaleAndCutoff",
  459. "type": 16,
  460. "count": 1
  461. }
  462. ],
  463. "defines": [],
  464. "stageFlags": 16,
  465. "binding": 1
  466. }
  467. ],
  468. "samplerTextures": [
  469. {
  470. "name": "mainTexture",
  471. "type": 28,
  472. "count": 1,
  473. "defines": [
  474. "USE_TEXTURE"
  475. ],
  476. "stageFlags": 16,
  477. "binding": 2
  478. }
  479. ],
  480. "samplers": [],
  481. "textures": [],
  482. "buffers": [],
  483. "images": [],
  484. "subpassInputs": [],
  485. "attributes": [
  486. {
  487. "name": "a_position",
  488. "defines": [],
  489. "format": 32,
  490. "location": 0
  491. },
  492. {
  493. "name": "a_normal",
  494. "defines": [],
  495. "format": 32,
  496. "location": 1
  497. },
  498. {
  499. "name": "a_texCoord",
  500. "defines": [],
  501. "format": 21,
  502. "location": 2
  503. },
  504. {
  505. "name": "a_tangent",
  506. "defines": [],
  507. "format": 44,
  508. "location": 3
  509. },
  510. {
  511. "name": "a_joints",
  512. "defines": [
  513. "CC_USE_SKINNING"
  514. ],
  515. "location": 4
  516. },
  517. {
  518. "name": "a_weights",
  519. "defines": [
  520. "CC_USE_SKINNING"
  521. ],
  522. "format": 44,
  523. "location": 5
  524. },
  525. {
  526. "name": "a_jointAnimInfo",
  527. "defines": [
  528. "USE_INSTANCING",
  529. "CC_USE_BAKED_ANIMATION"
  530. ],
  531. "format": 44,
  532. "isInstanced": true,
  533. "location": 6
  534. },
  535. {
  536. "name": "a_matWorld0",
  537. "defines": [
  538. "USE_INSTANCING"
  539. ],
  540. "format": 44,
  541. "isInstanced": true,
  542. "location": 7
  543. },
  544. {
  545. "name": "a_matWorld1",
  546. "defines": [
  547. "USE_INSTANCING"
  548. ],
  549. "format": 44,
  550. "isInstanced": true,
  551. "location": 8
  552. },
  553. {
  554. "name": "a_matWorld2",
  555. "defines": [
  556. "USE_INSTANCING"
  557. ],
  558. "format": 44,
  559. "isInstanced": true,
  560. "location": 9
  561. },
  562. {
  563. "name": "a_lightingMapUVParam",
  564. "defines": [
  565. "USE_INSTANCING",
  566. "CC_USE_LIGHTMAP"
  567. ],
  568. "format": 44,
  569. "isInstanced": true,
  570. "location": 10
  571. },
  572. {
  573. "name": "a_localShadowBiasAndProbeId",
  574. "defines": [
  575. "USE_INSTANCING"
  576. ],
  577. "format": 44,
  578. "isInstanced": true,
  579. "location": 11
  580. },
  581. {
  582. "name": "a_reflectionProbeData",
  583. "defines": [
  584. "USE_INSTANCING",
  585. "CC_USE_REFLECTION_PROBE"
  586. ],
  587. "format": 44,
  588. "isInstanced": true,
  589. "location": 12
  590. },
  591. {
  592. "name": "a_sh_linear_const_r",
  593. "defines": [
  594. "USE_INSTANCING",
  595. "CC_USE_LIGHT_PROBE"
  596. ],
  597. "format": 44,
  598. "isInstanced": true,
  599. "location": 13
  600. },
  601. {
  602. "name": "a_sh_linear_const_g",
  603. "defines": [
  604. "USE_INSTANCING",
  605. "CC_USE_LIGHT_PROBE"
  606. ],
  607. "format": 44,
  608. "isInstanced": true,
  609. "location": 14
  610. },
  611. {
  612. "name": "a_sh_linear_const_b",
  613. "defines": [
  614. "USE_INSTANCING",
  615. "CC_USE_LIGHT_PROBE"
  616. ],
  617. "format": 44,
  618. "isInstanced": true,
  619. "location": 15
  620. },
  621. {
  622. "name": "a_vertexId",
  623. "defines": [
  624. "CC_USE_MORPH"
  625. ],
  626. "format": 11,
  627. "location": 16
  628. },
  629. {
  630. "name": "a_color",
  631. "defines": [
  632. "USE_VERTEX_COLOR"
  633. ],
  634. "format": 44,
  635. "location": 17
  636. }
  637. ],
  638. "varyings": [
  639. {
  640. "name": "v_color",
  641. "type": 16,
  642. "count": 1,
  643. "defines": [
  644. "USE_VERTEX_COLOR"
  645. ],
  646. "stageFlags": 17,
  647. "location": 0
  648. },
  649. {
  650. "name": "v_uv",
  651. "type": 14,
  652. "count": 1,
  653. "defines": [
  654. "USE_TEXTURE"
  655. ],
  656. "stageFlags": 17,
  657. "location": 1
  658. }
  659. ],
  660. "fragColors": [
  661. {
  662. "name": "cc_FragColor",
  663. "typename": "vec4",
  664. "type": 16,
  665. "count": 1,
  666. "defines": [],
  667. "stageFlags": 16,
  668. "location": 0
  669. }
  670. ],
  671. "descriptors": [
  672. {
  673. "rate": 0,
  674. "blocks": [
  675. {
  676. "tags": {
  677. "builtin": "local"
  678. },
  679. "name": "CCMorph",
  680. "members": [
  681. {
  682. "name": "cc_displacementWeights",
  683. "typename": "vec4",
  684. "type": 16,
  685. "count": 15,
  686. "isArray": true
  687. },
  688. {
  689. "name": "cc_displacementTextureInfo",
  690. "typename": "vec4",
  691. "type": 16,
  692. "count": 1
  693. }
  694. ],
  695. "defines": [
  696. "CC_USE_MORPH"
  697. ],
  698. "stageFlags": 1
  699. },
  700. {
  701. "tags": {
  702. "builtin": "local"
  703. },
  704. "name": "CCSkinningTexture",
  705. "members": [
  706. {
  707. "name": "cc_jointTextureInfo",
  708. "typename": "vec4",
  709. "type": 16,
  710. "count": 1,
  711. "precision": "highp "
  712. }
  713. ],
  714. "defines": [
  715. "CC_USE_SKINNING",
  716. "CC_USE_BAKED_ANIMATION"
  717. ],
  718. "stageFlags": 1
  719. },
  720. {
  721. "tags": {
  722. "builtin": "local"
  723. },
  724. "name": "CCSkinningAnimation",
  725. "members": [
  726. {
  727. "name": "cc_jointAnimInfo",
  728. "typename": "vec4",
  729. "type": 16,
  730. "count": 1,
  731. "precision": "highp "
  732. }
  733. ],
  734. "defines": [
  735. "CC_USE_SKINNING",
  736. "CC_USE_BAKED_ANIMATION"
  737. ],
  738. "stageFlags": 1
  739. },
  740. {
  741. "tags": {
  742. "builtin": "local"
  743. },
  744. "name": "CCSkinning",
  745. "members": [
  746. {
  747. "name": "cc_joints",
  748. "typename": "vec4",
  749. "type": 16,
  750. "count": 0,
  751. "precision": "highp ",
  752. "isArray": true
  753. }
  754. ],
  755. "defines": [
  756. "CC_USE_SKINNING",
  757. "!CC_USE_BAKED_ANIMATION",
  758. "!CC_USE_REAL_TIME_JOINT_TEXTURE"
  759. ],
  760. "stageFlags": 1
  761. },
  762. {
  763. "tags": {
  764. "builtin": "local"
  765. },
  766. "name": "CCLocal",
  767. "members": [
  768. {
  769. "name": "cc_matWorld",
  770. "typename": "mat4",
  771. "type": 25,
  772. "count": 1,
  773. "precision": "highp "
  774. },
  775. {
  776. "name": "cc_matWorldIT",
  777. "typename": "mat4",
  778. "type": 25,
  779. "count": 1,
  780. "precision": "highp "
  781. },
  782. {
  783. "name": "cc_lightingMapUVParam",
  784. "typename": "vec4",
  785. "type": 16,
  786. "count": 1,
  787. "precision": "highp "
  788. },
  789. {
  790. "name": "cc_localShadowBias",
  791. "typename": "vec4",
  792. "type": 16,
  793. "count": 1,
  794. "precision": "highp "
  795. },
  796. {
  797. "name": "cc_reflectionProbeData1",
  798. "typename": "vec4",
  799. "type": 16,
  800. "count": 1,
  801. "precision": "highp "
  802. },
  803. {
  804. "name": "cc_reflectionProbeData2",
  805. "typename": "vec4",
  806. "type": 16,
  807. "count": 1,
  808. "precision": "highp "
  809. },
  810. {
  811. "name": "cc_reflectionProbeBlendData1",
  812. "typename": "vec4",
  813. "type": 16,
  814. "count": 1,
  815. "precision": "highp "
  816. },
  817. {
  818. "name": "cc_reflectionProbeBlendData2",
  819. "typename": "vec4",
  820. "type": 16,
  821. "count": 1,
  822. "precision": "highp "
  823. }
  824. ],
  825. "defines": [
  826. "!USE_INSTANCING"
  827. ],
  828. "stageFlags": 1
  829. }
  830. ],
  831. "samplerTextures": [
  832. {
  833. "tags": {
  834. "builtin": "local"
  835. },
  836. "name": "cc_PositionDisplacements",
  837. "typename": "sampler2D",
  838. "type": 28,
  839. "count": 1,
  840. "defines": [
  841. "CC_USE_MORPH",
  842. "CC_MORPH_TARGET_HAS_POSITION"
  843. ],
  844. "stageFlags": 1
  845. },
  846. {
  847. "tags": {
  848. "builtin": "local"
  849. },
  850. "name": "cc_NormalDisplacements",
  851. "typename": "sampler2D",
  852. "type": 28,
  853. "count": 1,
  854. "defines": [
  855. "CC_USE_MORPH",
  856. "CC_MORPH_TARGET_HAS_NORMAL"
  857. ],
  858. "stageFlags": 1
  859. },
  860. {
  861. "tags": {
  862. "builtin": "local"
  863. },
  864. "name": "cc_TangentDisplacements",
  865. "typename": "sampler2D",
  866. "type": 28,
  867. "count": 1,
  868. "defines": [
  869. "CC_USE_MORPH",
  870. "CC_MORPH_TARGET_HAS_TANGENT"
  871. ],
  872. "stageFlags": 1
  873. },
  874. {
  875. "tags": {
  876. "builtin": "local"
  877. },
  878. "name": "cc_jointTexture",
  879. "typename": "sampler2D",
  880. "type": 28,
  881. "count": 1,
  882. "precision": "highp ",
  883. "defines": [
  884. "CC_USE_SKINNING",
  885. "CC_USE_BAKED_ANIMATION"
  886. ],
  887. "stageFlags": 1
  888. },
  889. {
  890. "tags": {
  891. "builtin": "local"
  892. },
  893. "name": "cc_realtimeJoint",
  894. "typename": "sampler2D",
  895. "type": 28,
  896. "count": 1,
  897. "precision": "highp ",
  898. "defines": [
  899. "CC_USE_SKINNING",
  900. "!CC_USE_BAKED_ANIMATION",
  901. "CC_USE_REAL_TIME_JOINT_TEXTURE"
  902. ],
  903. "stageFlags": 1
  904. }
  905. ],
  906. "samplers": [],
  907. "textures": [],
  908. "buffers": [],
  909. "images": [],
  910. "subpassInputs": []
  911. },
  912. {
  913. "rate": 1,
  914. "blocks": [
  915. {
  916. "name": "TexCoords",
  917. "members": [
  918. {
  919. "name": "tilingOffset",
  920. "type": 16,
  921. "count": 1
  922. }
  923. ],
  924. "defines": [
  925. "USE_TEXTURE"
  926. ],
  927. "stageFlags": 1,
  928. "binding": 0
  929. },
  930. {
  931. "name": "Constant",
  932. "members": [
  933. {
  934. "name": "mainColor",
  935. "type": 16,
  936. "count": 1
  937. },
  938. {
  939. "name": "colorScaleAndCutoff",
  940. "type": 16,
  941. "count": 1
  942. }
  943. ],
  944. "defines": [],
  945. "stageFlags": 16,
  946. "binding": 1
  947. }
  948. ],
  949. "samplerTextures": [
  950. {
  951. "name": "mainTexture",
  952. "type": 28,
  953. "count": 1,
  954. "defines": [
  955. "USE_TEXTURE"
  956. ],
  957. "stageFlags": 16,
  958. "binding": 2
  959. }
  960. ],
  961. "samplers": [],
  962. "textures": [],
  963. "buffers": [],
  964. "images": [],
  965. "subpassInputs": []
  966. },
  967. {
  968. "rate": 2,
  969. "blocks": [],
  970. "samplerTextures": [],
  971. "samplers": [],
  972. "textures": [],
  973. "buffers": [],
  974. "images": [],
  975. "subpassInputs": []
  976. },
  977. {
  978. "rate": 3,
  979. "blocks": [
  980. {
  981. "tags": {
  982. "builtin": "global"
  983. },
  984. "name": "CCGlobal",
  985. "members": [
  986. {
  987. "name": "cc_time",
  988. "typename": "vec4",
  989. "type": 16,
  990. "count": 1,
  991. "precision": "highp "
  992. },
  993. {
  994. "name": "cc_screenSize",
  995. "typename": "vec4",
  996. "type": 16,
  997. "count": 1,
  998. "precision": "mediump "
  999. },
  1000. {
  1001. "name": "cc_nativeSize",
  1002. "typename": "vec4",
  1003. "type": 16,
  1004. "count": 1,
  1005. "precision": "mediump "
  1006. },
  1007. {
  1008. "name": "cc_probeInfo",
  1009. "typename": "vec4",
  1010. "type": 16,
  1011. "count": 1,
  1012. "precision": "mediump "
  1013. },
  1014. {
  1015. "name": "cc_debug_view_mode",
  1016. "typename": "vec4",
  1017. "type": 16,
  1018. "count": 1,
  1019. "precision": "mediump "
  1020. }
  1021. ],
  1022. "defines": [],
  1023. "stageFlags": 17
  1024. },
  1025. {
  1026. "tags": {
  1027. "builtin": "global"
  1028. },
  1029. "name": "CCCamera",
  1030. "members": [
  1031. {
  1032. "name": "cc_matView",
  1033. "typename": "mat4",
  1034. "type": 25,
  1035. "count": 1,
  1036. "precision": "highp "
  1037. },
  1038. {
  1039. "name": "cc_matViewInv",
  1040. "typename": "mat4",
  1041. "type": 25,
  1042. "count": 1,
  1043. "precision": "highp "
  1044. },
  1045. {
  1046. "name": "cc_matProj",
  1047. "typename": "mat4",
  1048. "type": 25,
  1049. "count": 1,
  1050. "precision": "highp "
  1051. },
  1052. {
  1053. "name": "cc_matProjInv",
  1054. "typename": "mat4",
  1055. "type": 25,
  1056. "count": 1,
  1057. "precision": "highp "
  1058. },
  1059. {
  1060. "name": "cc_matViewProj",
  1061. "typename": "mat4",
  1062. "type": 25,
  1063. "count": 1,
  1064. "precision": "highp "
  1065. },
  1066. {
  1067. "name": "cc_matViewProjInv",
  1068. "typename": "mat4",
  1069. "type": 25,
  1070. "count": 1,
  1071. "precision": "highp "
  1072. },
  1073. {
  1074. "name": "cc_cameraPos",
  1075. "typename": "vec4",
  1076. "type": 16,
  1077. "count": 1,
  1078. "precision": "highp "
  1079. },
  1080. {
  1081. "name": "cc_surfaceTransform",
  1082. "typename": "vec4",
  1083. "type": 16,
  1084. "count": 1,
  1085. "precision": "mediump "
  1086. },
  1087. {
  1088. "name": "cc_screenScale",
  1089. "typename": "vec4",
  1090. "type": 16,
  1091. "count": 1,
  1092. "precision": "mediump "
  1093. },
  1094. {
  1095. "name": "cc_exposure",
  1096. "typename": "vec4",
  1097. "type": 16,
  1098. "count": 1,
  1099. "precision": "mediump "
  1100. },
  1101. {
  1102. "name": "cc_mainLitDir",
  1103. "typename": "vec4",
  1104. "type": 16,
  1105. "count": 1,
  1106. "precision": "mediump "
  1107. },
  1108. {
  1109. "name": "cc_mainLitColor",
  1110. "typename": "vec4",
  1111. "type": 16,
  1112. "count": 1,
  1113. "precision": "mediump "
  1114. },
  1115. {
  1116. "name": "cc_ambientSky",
  1117. "typename": "vec4",
  1118. "type": 16,
  1119. "count": 1,
  1120. "precision": "mediump "
  1121. },
  1122. {
  1123. "name": "cc_ambientGround",
  1124. "typename": "vec4",
  1125. "type": 16,
  1126. "count": 1,
  1127. "precision": "mediump "
  1128. },
  1129. {
  1130. "name": "cc_fogColor",
  1131. "typename": "vec4",
  1132. "type": 16,
  1133. "count": 1,
  1134. "precision": "mediump "
  1135. },
  1136. {
  1137. "name": "cc_fogBase",
  1138. "typename": "vec4",
  1139. "type": 16,
  1140. "count": 1,
  1141. "precision": "mediump "
  1142. },
  1143. {
  1144. "name": "cc_fogAdd",
  1145. "typename": "vec4",
  1146. "type": 16,
  1147. "count": 1,
  1148. "precision": "mediump "
  1149. },
  1150. {
  1151. "name": "cc_nearFar",
  1152. "typename": "vec4",
  1153. "type": 16,
  1154. "count": 1,
  1155. "precision": "mediump "
  1156. },
  1157. {
  1158. "name": "cc_viewPort",
  1159. "typename": "vec4",
  1160. "type": 16,
  1161. "count": 1,
  1162. "precision": "mediump "
  1163. }
  1164. ],
  1165. "defines": [],
  1166. "stageFlags": 17
  1167. }
  1168. ],
  1169. "samplerTextures": [],
  1170. "samplers": [],
  1171. "textures": [],
  1172. "buffers": [],
  1173. "images": [],
  1174. "subpassInputs": []
  1175. }
  1176. ],
  1177. "hash": 4190201664,
  1178. "glsl4": {
  1179. "vert": "#extension GL_EXT_shader_explicit_arithmetic_types_int32: require\nprecision highp float;\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 2) in vec2 a_texCoord;\nlayout(location = 3) in vec4 a_tangent;\n#if CC_USE_SKINNING\n layout(location = 4) in u32vec4 a_joints;\n layout(location = 5) in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n layout(location = 6) in highp vec4 a_jointAnimInfo;\n #endif\n layout(location = 7) in vec4 a_matWorld0;\n layout(location = 8) in vec4 a_matWorld1;\n layout(location = 9) in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n layout(location = 10) in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n layout(location = 11) in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n layout(location = 12) in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n layout(location = 13) in vec4 a_sh_linear_const_r;\n layout(location = 14) in vec4 a_sh_linear_const_g;\n layout(location = 15) in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n int getVertexId() {\n return gl_VertexIndex;\n }\n#endif\nhighp float decode32 (highp vec4 rgba) {\n rgba = rgba * 255.0;\n highp float Sign = 1.0 - (step(128.0, (rgba[3]) + 0.5)) * 2.0;\n highp float Exponent = 2.0 * (mod(float(int((rgba[3]) + 0.5)), 128.0)) + (step(128.0, (rgba[2]) + 0.5)) - 127.0;\n highp float Mantissa = (mod(float(int((rgba[2]) + 0.5)), 128.0)) * 65536.0 + rgba[1] * 256.0 + rgba[0] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n}\n#if CC_USE_MORPH\n layout(set = 2, binding = 4) uniform CCMorph {\n vec4 cc_displacementWeights[15];\n vec4 cc_displacementTextureInfo;\n };\n #if CC_MORPH_TARGET_HAS_POSITION\n layout(set = 2, binding = 8) uniform sampler2D cc_PositionDisplacements;\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n layout(set = 2, binding = 9) uniform sampler2D cc_NormalDisplacements;\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n layout(set = 2, binding = 10) uniform sampler2D cc_TangentDisplacements;\n #endif\n vec2 getPixelLocation(vec2 textureResolution, int pixelIndex) {\n float pixelIndexF = float(pixelIndex);\n float x = mod(pixelIndexF, textureResolution.x);\n float y = floor(pixelIndexF / textureResolution.x);\n return vec2(x, y);\n }\n vec2 getPixelCoordFromLocation(vec2 location, vec2 textureResolution) {\n return (vec2(location.x, location.y) + .5) / textureResolution;\n }\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n vec4 fetchVec3ArrayFromTexture(sampler2D tex, int pixelIndex) {\n ivec2 texSize = textureSize(tex, 0);\n return texelFetch(tex, ivec2(pixelIndex % texSize.x, pixelIndex / texSize.x), 0);\n }\n #else\n vec4 fetchVec3ArrayFromTexture(sampler2D tex, int elementIndex) {\n int pixelIndex = elementIndex * 4;\n vec2 location = getPixelLocation(cc_displacementTextureInfo.xy, pixelIndex);\n vec2 x = getPixelCoordFromLocation(location + vec2(0.0, 0.0), cc_displacementTextureInfo.xy);\n vec2 y = getPixelCoordFromLocation(location + vec2(1.0, 0.0), cc_displacementTextureInfo.xy);\n vec2 z = getPixelCoordFromLocation(location + vec2(2.0, 0.0), cc_displacementTextureInfo.xy);\n return vec4(\n decode32(texture(tex, x)),\n decode32(texture(tex, y)),\n decode32(texture(tex, z)),\n 1.0\n );\n }\n #endif\n float getDisplacementWeight(int index) {\n int quot = index / 4;\n int remainder = index - quot * 4;\n if (remainder == 0) {\n return cc_displacementWeights[quot].x;\n } else if (remainder == 1) {\n return cc_displacementWeights[quot].y;\n } else if (remainder == 2) {\n return cc_displacementWeights[quot].z;\n } else {\n return cc_displacementWeights[quot].w;\n }\n }\n vec3 getVec3DisplacementFromTexture(sampler2D tex, int vertexIndex) {\n #if CC_MORPH_PRECOMPUTED\n return fetchVec3ArrayFromTexture(tex, vertexIndex).rgb;\n #else\n vec3 result = vec3(0, 0, 0);\n int nVertices = int(cc_displacementTextureInfo.z);\n for (int iTarget = 0; iTarget < CC_MORPH_TARGET_COUNT; ++iTarget) {\n result += (fetchVec3ArrayFromTexture(tex, nVertices * iTarget + vertexIndex).rgb * getDisplacementWeight(iTarget));\n }\n return result;\n #endif\n }\n #if CC_MORPH_TARGET_HAS_POSITION\n vec3 getPositionDisplacement(int vertexId) {\n return getVec3DisplacementFromTexture(cc_PositionDisplacements, vertexId);\n }\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n vec3 getNormalDisplacement(int vertexId) {\n return getVec3DisplacementFromTexture(cc_NormalDisplacements, vertexId);\n }\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n vec3 getTangentDisplacement(int vertexId) {\n return getVec3DisplacementFromTexture(cc_TangentDisplacements, vertexId);\n }\n #endif\n void applyMorph (inout vec4 position, inout vec3 normal, inout vec4 tangent) {\n int vertexId = getVertexId();\n #if CC_MORPH_TARGET_HAS_POSITION\n position.xyz = position.xyz + getPositionDisplacement(vertexId);\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n normal.xyz = normal.xyz + getNormalDisplacement(vertexId);\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n tangent.xyz = tangent.xyz + getTangentDisplacement(vertexId);\n #endif\n }\n void applyMorph (inout vec4 position) {\n #if CC_MORPH_TARGET_HAS_POSITION\n position.xyz = position.xyz + getPositionDisplacement(getVertexId());\n #endif\n }\n#endif\n#if CC_USE_SKINNING\n #if CC_USE_BAKED_ANIMATION\n layout(set = 2, binding = 3) uniform CCSkinningTexture {\n highp vec4 cc_jointTextureInfo;\n };\n layout(set = 2, binding = 2) uniform CCSkinningAnimation {\n highp vec4 cc_jointAnimInfo;\n };\n layout(set = 2, binding = 7) uniform highp sampler2D cc_jointTexture;\n void CCGetJointTextureCoords(float pixelsPerJoint, float jointIdx, out highp float x, out highp float y, out highp float invSize)\n {\n #if USE_INSTANCING\n highp float temp = pixelsPerJoint * (a_jointAnimInfo.x * a_jointAnimInfo.y + jointIdx) + a_jointAnimInfo.z;\n #else\n highp float temp = pixelsPerJoint * (cc_jointAnimInfo.x * cc_jointTextureInfo.y + jointIdx) + cc_jointTextureInfo.z;\n #endif\n invSize = cc_jointTextureInfo.w;\n highp float tempY = floor(temp * invSize);\n x = floor(temp - tempY * cc_jointTextureInfo.x);\n y = (tempY + 0.5) * invSize;\n }\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n layout(set = 2, binding = 7) uniform highp sampler2D cc_realtimeJoint;\n #else\n layout(set = 2, binding = 3) uniform CCSkinning {\n highp vec4 cc_joints[CC_JOINT_UNIFORM_CAPACITY * 3];\n };\n #endif\n #endif\n #if CC_USE_BAKED_ANIMATION\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n mat4 getJointMatrix (float i) {\n highp float x, y, invSize;\n CCGetJointTextureCoords(3.0, i, x, y, invSize);\n vec4 v1 = texture(cc_jointTexture, vec2((x + 0.5) * invSize, y));\n vec4 v2 = texture(cc_jointTexture, vec2((x + 1.5) * invSize, y));\n vec4 v3 = texture(cc_jointTexture, vec2((x + 2.5) * invSize, y));\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #else\n mat4 getJointMatrix (float i) {\n highp float x, y, invSize;\n CCGetJointTextureCoords(12.0, i, x, y, invSize);\n vec4 v1 = vec4(\n decode32(texture(cc_jointTexture, vec2((x + 0.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 1.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 2.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 3.5) * invSize, y)))\n );\n vec4 v2 = vec4(\n decode32(texture(cc_jointTexture, vec2((x + 4.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 5.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 6.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 7.5) * invSize, y)))\n );\n vec4 v3 = vec4(\n decode32(texture(cc_jointTexture, vec2((x + 8.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 9.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 10.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 11.5) * invSize, y)))\n );\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #endif\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n mat4 getJointMatrix (float i) {\n float x = i;\n vec4 v1 = texture(cc_realtimeJoint, vec2( x / 256.0, 0.5 / 3.0));\n vec4 v2 = texture(cc_realtimeJoint, vec2( x / 256.0, 1.5 / 3.0));\n vec4 v3 = texture(cc_realtimeJoint, vec2( x / 256.0, 2.5 / 3.0));\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #else\n mat4 getJointMatrix (float i) {\n float x = 4.0 * i;\n vec4 v1 = vec4(\n decode32(texture(cc_realtimeJoint, vec2((x + 0.5)/ 1024.0, 0.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 1.5)/ 1024.0, 0.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 2.5)/ 1024.0, 0.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 3.5)/ 1024.0, 0.5 / 3.0)))\n );\n vec4 v2 = vec4(\n decode32(texture(cc_realtimeJoint, vec2((x + 0.5)/ 1024.0, 1.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 1.5)/ 1024.0, 1.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 2.5)/ 1024.0, 1.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 3.5)/ 1024.0, 1.5 / 3.0)))\n );\n vec4 v3 = vec4(\n decode32(texture(cc_realtimeJoint, vec2((x + 0.5)/ 1024.0, 2.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 1.5)/ 1024.0, 2.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 2.5)/ 1024.0, 2.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 3.5)/ 1024.0, 2.5 / 3.0)))\n );\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #endif\n #else\n mat4 getJointMatrix (float i) {\n int idx = int(i);\n vec4 v1 = cc_joints[idx * 3];\n vec4 v2 = cc_joints[idx * 3 + 1];\n vec4 v3 = cc_joints[idx * 3 + 2];\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #endif\n #endif\n mat4 skinMatrix () {\n vec4 joints = vec4(a_joints);\n return getJointMatrix(joints.x) * a_weights.x\n + getJointMatrix(joints.y) * a_weights.y\n + getJointMatrix(joints.z) * a_weights.z\n + getJointMatrix(joints.w) * a_weights.w;\n }\n void CCSkin (inout vec4 position) {\n mat4 m = skinMatrix();\n position = m * position;\n }\n void CCSkin (inout vec4 position, inout vec3 normal, inout vec4 tangent) {\n mat4 m = skinMatrix();\n position = m * position;\n normal = (m * vec4(normal, 0.0)).xyz;\n tangent.xyz = (m * vec4(tangent.xyz, 0.0)).xyz;\n }\n#endif\nvoid CCVertInput(inout vec4 In)\n{\n In = vec4(a_position, 1.0);\n #if CC_USE_MORPH\n applyMorph(In);\n #endif\n #if CC_USE_SKINNING\n CCSkin(In);\n #endif\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};\n#if !USE_INSTANCING\n layout(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 };\n#endif\nvoid CCGetWorldMatrix(out mat4 matWorld)\n{\n #if USE_INSTANCING\n matWorld = mat4(\n vec4(a_matWorld0.xyz, 0.0),\n vec4(a_matWorld1.xyz, 0.0),\n vec4(a_matWorld2.xyz, 0.0),\n vec4(a_matWorld0.w, a_matWorld1.w, a_matWorld2.w, 1.0)\n );\n #else\n matWorld = cc_matWorld;\n #endif\n}\n#if USE_VERTEX_COLOR\n layout(location = 17) in lowp vec4 a_color;\n layout(location = 0) out lowp vec4 v_color;\n#endif\n#if USE_TEXTURE\n layout(location = 1) out vec2 v_uv;\n layout(set = 1, binding = 0) uniform TexCoords {\n vec4 tilingOffset;\n };\n#endif\nvec4 vert () {\n vec4 position;\n CCVertInput(position);\n mat4 matWorld;\n CCGetWorldMatrix(matWorld);\n #if USE_TEXTURE\n v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw;\n #if SAMPLE_FROM_RT\n v_uv = cc_cameraPos.w > 1.0 ? vec2(v_uv.x, 1.0 - v_uv.y) : v_uv;\n #endif\n #endif\n #if USE_VERTEX_COLOR\n v_color = a_color;\n #endif\n return cc_matProj * (cc_matView * matWorld) * position;\n}\nvoid main() { gl_Position = vert(); }",
  1180. "frag": "\nprecision highp 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}\n#if USE_ALPHA_TEST\n#endif\n#if USE_TEXTURE\n layout(location = 1) in vec2 v_uv;\n layout(set = 1, binding = 2) uniform sampler2D mainTexture;\n#endif\nlayout(set = 1, binding = 1) uniform Constant {\n vec4 mainColor;\n vec4 colorScaleAndCutoff;\n};\n#if USE_VERTEX_COLOR\n layout(location = 0) in lowp vec4 v_color;\n#endif\nvec4 frag () {\n vec4 o = mainColor;\n o.rgb *= colorScaleAndCutoff.xyz;\n #if USE_VERTEX_COLOR\n o *= v_color;\n #endif\n #if USE_TEXTURE\n o *= texture(mainTexture, v_uv);\n #endif\n #if USE_ALPHA_TEST\n if (o.ALPHA_TEST_CHANNEL < colorScaleAndCutoff.w) discard;\n #endif\n return CCFragOutput(o);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  1181. },
  1182. "glsl3": {
  1183. "vert": "\nprecision highp float;\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nin vec3 a_position;\nin vec3 a_normal;\nin vec2 a_texCoord;\nin vec4 a_tangent;\n#if CC_USE_SKINNING\n in vec4 a_joints;\n in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n in highp vec4 a_jointAnimInfo;\n #endif\n in vec4 a_matWorld0;\n in vec4 a_matWorld1;\n in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n in vec4 a_sh_linear_const_r;\n in vec4 a_sh_linear_const_g;\n in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n in float a_vertexId;\n int getVertexId() {\n return int(a_vertexId);\n }\n#endif\nhighp float decode32 (highp vec4 rgba) {\n rgba = rgba * 255.0;\n highp float Sign = 1.0 - (step(128.0, (rgba[3]) + 0.5)) * 2.0;\n highp float Exponent = 2.0 * (mod(float(int((rgba[3]) + 0.5)), 128.0)) + (step(128.0, (rgba[2]) + 0.5)) - 127.0;\n highp float Mantissa = (mod(float(int((rgba[2]) + 0.5)), 128.0)) * 65536.0 + rgba[1] * 256.0 + rgba[0] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n}\n#if CC_USE_MORPH\n layout(std140) uniform CCMorph {\n vec4 cc_displacementWeights[15];\n vec4 cc_displacementTextureInfo;\n };\n #if CC_MORPH_TARGET_HAS_POSITION\n uniform sampler2D cc_PositionDisplacements;\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n uniform sampler2D cc_NormalDisplacements;\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n uniform sampler2D cc_TangentDisplacements;\n #endif\n vec2 getPixelLocation(vec2 textureResolution, int pixelIndex) {\n float pixelIndexF = float(pixelIndex);\n float x = mod(pixelIndexF, textureResolution.x);\n float y = floor(pixelIndexF / textureResolution.x);\n return vec2(x, y);\n }\n vec2 getPixelCoordFromLocation(vec2 location, vec2 textureResolution) {\n return (vec2(location.x, location.y) + .5) / textureResolution;\n }\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n vec4 fetchVec3ArrayFromTexture(sampler2D tex, int pixelIndex) {\n ivec2 texSize = textureSize(tex, 0);\n return texelFetch(tex, ivec2(pixelIndex % texSize.x, pixelIndex / texSize.x), 0);\n }\n #else\n vec4 fetchVec3ArrayFromTexture(sampler2D tex, int elementIndex) {\n int pixelIndex = elementIndex * 4;\n vec2 location = getPixelLocation(cc_displacementTextureInfo.xy, pixelIndex);\n vec2 x = getPixelCoordFromLocation(location + vec2(0.0, 0.0), cc_displacementTextureInfo.xy);\n vec2 y = getPixelCoordFromLocation(location + vec2(1.0, 0.0), cc_displacementTextureInfo.xy);\n vec2 z = getPixelCoordFromLocation(location + vec2(2.0, 0.0), cc_displacementTextureInfo.xy);\n return vec4(\n decode32(texture(tex, x)),\n decode32(texture(tex, y)),\n decode32(texture(tex, z)),\n 1.0\n );\n }\n #endif\n float getDisplacementWeight(int index) {\n int quot = index / 4;\n int remainder = index - quot * 4;\n if (remainder == 0) {\n return cc_displacementWeights[quot].x;\n } else if (remainder == 1) {\n return cc_displacementWeights[quot].y;\n } else if (remainder == 2) {\n return cc_displacementWeights[quot].z;\n } else {\n return cc_displacementWeights[quot].w;\n }\n }\n vec3 getVec3DisplacementFromTexture(sampler2D tex, int vertexIndex) {\n #if CC_MORPH_PRECOMPUTED\n return fetchVec3ArrayFromTexture(tex, vertexIndex).rgb;\n #else\n vec3 result = vec3(0, 0, 0);\n int nVertices = int(cc_displacementTextureInfo.z);\n for (int iTarget = 0; iTarget < CC_MORPH_TARGET_COUNT; ++iTarget) {\n result += (fetchVec3ArrayFromTexture(tex, nVertices * iTarget + vertexIndex).rgb * getDisplacementWeight(iTarget));\n }\n return result;\n #endif\n }\n #if CC_MORPH_TARGET_HAS_POSITION\n vec3 getPositionDisplacement(int vertexId) {\n return getVec3DisplacementFromTexture(cc_PositionDisplacements, vertexId);\n }\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n vec3 getNormalDisplacement(int vertexId) {\n return getVec3DisplacementFromTexture(cc_NormalDisplacements, vertexId);\n }\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n vec3 getTangentDisplacement(int vertexId) {\n return getVec3DisplacementFromTexture(cc_TangentDisplacements, vertexId);\n }\n #endif\n void applyMorph (inout vec4 position, inout vec3 normal, inout vec4 tangent) {\n int vertexId = getVertexId();\n #if CC_MORPH_TARGET_HAS_POSITION\n position.xyz = position.xyz + getPositionDisplacement(vertexId);\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n normal.xyz = normal.xyz + getNormalDisplacement(vertexId);\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n tangent.xyz = tangent.xyz + getTangentDisplacement(vertexId);\n #endif\n }\n void applyMorph (inout vec4 position) {\n #if CC_MORPH_TARGET_HAS_POSITION\n position.xyz = position.xyz + getPositionDisplacement(getVertexId());\n #endif\n }\n#endif\n#if CC_USE_SKINNING\n #if CC_USE_BAKED_ANIMATION\n layout(std140) uniform CCSkinningTexture {\n highp vec4 cc_jointTextureInfo;\n };\n layout(std140) uniform CCSkinningAnimation {\n highp vec4 cc_jointAnimInfo;\n };\n uniform highp sampler2D cc_jointTexture;\n void CCGetJointTextureCoords(float pixelsPerJoint, float jointIdx, out highp float x, out highp float y, out highp float invSize)\n {\n #if USE_INSTANCING\n highp float temp = pixelsPerJoint * (a_jointAnimInfo.x * a_jointAnimInfo.y + jointIdx) + a_jointAnimInfo.z;\n #else\n highp float temp = pixelsPerJoint * (cc_jointAnimInfo.x * cc_jointTextureInfo.y + jointIdx) + cc_jointTextureInfo.z;\n #endif\n invSize = cc_jointTextureInfo.w;\n highp float tempY = floor(temp * invSize);\n x = floor(temp - tempY * cc_jointTextureInfo.x);\n y = (tempY + 0.5) * invSize;\n }\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n uniform highp sampler2D cc_realtimeJoint;\n #else\n layout(std140) uniform CCSkinning {\n highp vec4 cc_joints[CC_JOINT_UNIFORM_CAPACITY * 3];\n };\n #endif\n #endif\n #if CC_USE_BAKED_ANIMATION\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n mat4 getJointMatrix (float i) {\n highp float x, y, invSize;\n CCGetJointTextureCoords(3.0, i, x, y, invSize);\n vec4 v1 = texture(cc_jointTexture, vec2((x + 0.5) * invSize, y));\n vec4 v2 = texture(cc_jointTexture, vec2((x + 1.5) * invSize, y));\n vec4 v3 = texture(cc_jointTexture, vec2((x + 2.5) * invSize, y));\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #else\n mat4 getJointMatrix (float i) {\n highp float x, y, invSize;\n CCGetJointTextureCoords(12.0, i, x, y, invSize);\n vec4 v1 = vec4(\n decode32(texture(cc_jointTexture, vec2((x + 0.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 1.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 2.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 3.5) * invSize, y)))\n );\n vec4 v2 = vec4(\n decode32(texture(cc_jointTexture, vec2((x + 4.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 5.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 6.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 7.5) * invSize, y)))\n );\n vec4 v3 = vec4(\n decode32(texture(cc_jointTexture, vec2((x + 8.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 9.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 10.5) * invSize, y))),\n decode32(texture(cc_jointTexture, vec2((x + 11.5) * invSize, y)))\n );\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #endif\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n mat4 getJointMatrix (float i) {\n float x = i;\n vec4 v1 = texture(cc_realtimeJoint, vec2( x / 256.0, 0.5 / 3.0));\n vec4 v2 = texture(cc_realtimeJoint, vec2( x / 256.0, 1.5 / 3.0));\n vec4 v3 = texture(cc_realtimeJoint, vec2( x / 256.0, 2.5 / 3.0));\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #else\n mat4 getJointMatrix (float i) {\n float x = 4.0 * i;\n vec4 v1 = vec4(\n decode32(texture(cc_realtimeJoint, vec2((x + 0.5)/ 1024.0, 0.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 1.5)/ 1024.0, 0.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 2.5)/ 1024.0, 0.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 3.5)/ 1024.0, 0.5 / 3.0)))\n );\n vec4 v2 = vec4(\n decode32(texture(cc_realtimeJoint, vec2((x + 0.5)/ 1024.0, 1.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 1.5)/ 1024.0, 1.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 2.5)/ 1024.0, 1.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 3.5)/ 1024.0, 1.5 / 3.0)))\n );\n vec4 v3 = vec4(\n decode32(texture(cc_realtimeJoint, vec2((x + 0.5)/ 1024.0, 2.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 1.5)/ 1024.0, 2.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 2.5)/ 1024.0, 2.5 / 3.0))),\n decode32(texture(cc_realtimeJoint, vec2((x + 3.5)/ 1024.0, 2.5 / 3.0)))\n );\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #endif\n #else\n mat4 getJointMatrix (float i) {\n int idx = int(i);\n vec4 v1 = cc_joints[idx * 3];\n vec4 v2 = cc_joints[idx * 3 + 1];\n vec4 v3 = cc_joints[idx * 3 + 2];\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #endif\n #endif\n mat4 skinMatrix () {\n vec4 joints = vec4(a_joints);\n return getJointMatrix(joints.x) * a_weights.x\n + getJointMatrix(joints.y) * a_weights.y\n + getJointMatrix(joints.z) * a_weights.z\n + getJointMatrix(joints.w) * a_weights.w;\n }\n void CCSkin (inout vec4 position) {\n mat4 m = skinMatrix();\n position = m * position;\n }\n void CCSkin (inout vec4 position, inout vec3 normal, inout vec4 tangent) {\n mat4 m = skinMatrix();\n position = m * position;\n normal = (m * vec4(normal, 0.0)).xyz;\n tangent.xyz = (m * vec4(tangent.xyz, 0.0)).xyz;\n }\n#endif\nvoid CCVertInput(inout vec4 In)\n{\n In = vec4(a_position, 1.0);\n #if CC_USE_MORPH\n applyMorph(In);\n #endif\n #if CC_USE_SKINNING\n CCSkin(In);\n #endif\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};\n#if !USE_INSTANCING\n layout(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 };\n#endif\nvoid CCGetWorldMatrix(out mat4 matWorld)\n{\n #if USE_INSTANCING\n matWorld = mat4(\n vec4(a_matWorld0.xyz, 0.0),\n vec4(a_matWorld1.xyz, 0.0),\n vec4(a_matWorld2.xyz, 0.0),\n vec4(a_matWorld0.w, a_matWorld1.w, a_matWorld2.w, 1.0)\n );\n #else\n matWorld = cc_matWorld;\n #endif\n}\n#if USE_VERTEX_COLOR\n in lowp vec4 a_color;\n out lowp vec4 v_color;\n#endif\n#if USE_TEXTURE\n out vec2 v_uv;\n layout(std140) uniform TexCoords {\n vec4 tilingOffset;\n };\n#endif\nvec4 vert () {\n vec4 position;\n CCVertInput(position);\n mat4 matWorld;\n CCGetWorldMatrix(matWorld);\n #if USE_TEXTURE\n v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw;\n #if SAMPLE_FROM_RT\n v_uv = cc_cameraPos.w > 1.0 ? vec2(v_uv.x, 1.0 - v_uv.y) : v_uv;\n #endif\n #endif\n #if USE_VERTEX_COLOR\n v_color = a_color;\n #endif\n return cc_matProj * (cc_matView * matWorld) * position;\n}\nvoid main() { gl_Position = vert(); }",
  1184. "frag": "\nprecision highp 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}\n#if USE_ALPHA_TEST\n#endif\n#if USE_TEXTURE\n in vec2 v_uv;\n uniform sampler2D mainTexture;\n#endif\nlayout(std140) uniform Constant {\n vec4 mainColor;\n vec4 colorScaleAndCutoff;\n};\n#if USE_VERTEX_COLOR\n in lowp vec4 v_color;\n#endif\nvec4 frag () {\n vec4 o = mainColor;\n o.rgb *= colorScaleAndCutoff.xyz;\n #if USE_VERTEX_COLOR\n o *= v_color;\n #endif\n #if USE_TEXTURE\n o *= texture(mainTexture, v_uv);\n #endif\n #if USE_ALPHA_TEST\n if (o.ALPHA_TEST_CHANNEL < colorScaleAndCutoff.w) discard;\n #endif\n return CCFragOutput(o);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  1185. },
  1186. "glsl1": {
  1187. "vert": "\nprecision highp float;\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nattribute vec3 a_position;\nattribute vec3 a_normal;\nattribute vec2 a_texCoord;\nattribute vec4 a_tangent;\n#if CC_USE_SKINNING\n attribute vec4 a_joints;\n attribute vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n attribute highp vec4 a_jointAnimInfo;\n #endif\n attribute vec4 a_matWorld0;\n attribute vec4 a_matWorld1;\n attribute vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n attribute vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n attribute vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n attribute vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n attribute vec4 a_sh_linear_const_r;\n attribute vec4 a_sh_linear_const_g;\n attribute vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n attribute float a_vertexId;\n int getVertexId() {\n return int(a_vertexId);\n }\n#endif\nhighp float decode32 (highp vec4 rgba) {\n rgba = rgba * 255.0;\n highp float Sign = 1.0 - (step(128.0, (rgba[3]) + 0.5)) * 2.0;\n highp float Exponent = 2.0 * (mod(float(int((rgba[3]) + 0.5)), 128.0)) + (step(128.0, (rgba[2]) + 0.5)) - 127.0;\n highp float Mantissa = (mod(float(int((rgba[2]) + 0.5)), 128.0)) * 65536.0 + rgba[1] * 256.0 + rgba[0] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n}\n#if CC_USE_MORPH\n uniform vec4 cc_displacementWeights[15];\n uniform vec4 cc_displacementTextureInfo;\n #if CC_MORPH_TARGET_HAS_POSITION\n uniform sampler2D cc_PositionDisplacements;\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n uniform sampler2D cc_NormalDisplacements;\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n uniform sampler2D cc_TangentDisplacements;\n #endif\n vec2 getPixelLocation(vec2 textureResolution, int pixelIndex) {\n float pixelIndexF = float(pixelIndex);\n float x = mod(pixelIndexF, textureResolution.x);\n float y = floor(pixelIndexF / textureResolution.x);\n return vec2(x, y);\n }\n vec2 getPixelCoordFromLocation(vec2 location, vec2 textureResolution) {\n return (vec2(location.x, location.y) + .5) / textureResolution;\n }\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n vec4 fetchVec3ArrayFromTexture(sampler2D tex, int elementIndex) {\n int pixelIndex = elementIndex;\n vec2 location = getPixelLocation(cc_displacementTextureInfo.xy, pixelIndex);\n vec2 uv = getPixelCoordFromLocation(location, cc_displacementTextureInfo.xy);\n return texture2D(tex, uv);\n }\n #else\n vec4 fetchVec3ArrayFromTexture(sampler2D tex, int elementIndex) {\n int pixelIndex = elementIndex * 4;\n vec2 location = getPixelLocation(cc_displacementTextureInfo.xy, pixelIndex);\n vec2 x = getPixelCoordFromLocation(location + vec2(0.0, 0.0), cc_displacementTextureInfo.xy);\n vec2 y = getPixelCoordFromLocation(location + vec2(1.0, 0.0), cc_displacementTextureInfo.xy);\n vec2 z = getPixelCoordFromLocation(location + vec2(2.0, 0.0), cc_displacementTextureInfo.xy);\n return vec4(\n decode32(texture2D(tex, x)),\n decode32(texture2D(tex, y)),\n decode32(texture2D(tex, z)),\n 1.0\n );\n }\n #endif\n float getDisplacementWeight(int index) {\n int quot = index / 4;\n int remainder = index - quot * 4;\n if (remainder == 0) {\n return cc_displacementWeights[quot].x;\n } else if (remainder == 1) {\n return cc_displacementWeights[quot].y;\n } else if (remainder == 2) {\n return cc_displacementWeights[quot].z;\n } else {\n return cc_displacementWeights[quot].w;\n }\n }\n vec3 getVec3DisplacementFromTexture(sampler2D tex, int vertexIndex) {\n #if CC_MORPH_PRECOMPUTED\n return fetchVec3ArrayFromTexture(tex, vertexIndex).rgb;\n #else\n vec3 result = vec3(0, 0, 0);\n int nVertices = int(cc_displacementTextureInfo.z);\n for (int iTarget = 0; iTarget < CC_MORPH_TARGET_COUNT; ++iTarget) {\n result += (fetchVec3ArrayFromTexture(tex, nVertices * iTarget + vertexIndex).rgb * getDisplacementWeight(iTarget));\n }\n return result;\n #endif\n }\n #if CC_MORPH_TARGET_HAS_POSITION\n vec3 getPositionDisplacement(int vertexId) {\n return getVec3DisplacementFromTexture(cc_PositionDisplacements, vertexId);\n }\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n vec3 getNormalDisplacement(int vertexId) {\n return getVec3DisplacementFromTexture(cc_NormalDisplacements, vertexId);\n }\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n vec3 getTangentDisplacement(int vertexId) {\n return getVec3DisplacementFromTexture(cc_TangentDisplacements, vertexId);\n }\n #endif\n void applyMorph (inout vec4 position, inout vec3 normal, inout vec4 tangent) {\n int vertexId = getVertexId();\n #if CC_MORPH_TARGET_HAS_POSITION\n position.xyz = position.xyz + getPositionDisplacement(vertexId);\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n normal.xyz = normal.xyz + getNormalDisplacement(vertexId);\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n tangent.xyz = tangent.xyz + getTangentDisplacement(vertexId);\n #endif\n }\n void applyMorph (inout vec4 position) {\n #if CC_MORPH_TARGET_HAS_POSITION\n position.xyz = position.xyz + getPositionDisplacement(getVertexId());\n #endif\n }\n#endif\n#if CC_USE_SKINNING\n #if CC_USE_BAKED_ANIMATION\n uniform highp vec4 cc_jointTextureInfo;\n uniform highp vec4 cc_jointAnimInfo;\n uniform highp sampler2D cc_jointTexture;\n void CCGetJointTextureCoords(float pixelsPerJoint, float jointIdx, out highp float x, out highp float y, out highp float invSize)\n {\n #if USE_INSTANCING\n highp float temp = pixelsPerJoint * (a_jointAnimInfo.x * a_jointAnimInfo.y + jointIdx) + a_jointAnimInfo.z;\n #else\n highp float temp = pixelsPerJoint * (cc_jointAnimInfo.x * cc_jointTextureInfo.y + jointIdx) + cc_jointTextureInfo.z;\n #endif\n invSize = cc_jointTextureInfo.w;\n highp float tempY = floor(temp * invSize);\n x = floor(temp - tempY * cc_jointTextureInfo.x);\n y = (tempY + 0.5) * invSize;\n }\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n uniform highp sampler2D cc_realtimeJoint;\n #else\n uniform highp vec4 cc_joints[CC_JOINT_UNIFORM_CAPACITY * 3];\n #endif\n #endif\n #if CC_USE_BAKED_ANIMATION\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n mat4 getJointMatrix (float i) {\n highp float x, y, invSize;\n CCGetJointTextureCoords(3.0, i, x, y, invSize);\n vec4 v1 = texture2D(cc_jointTexture, vec2((x + 0.5) * invSize, y));\n vec4 v2 = texture2D(cc_jointTexture, vec2((x + 1.5) * invSize, y));\n vec4 v3 = texture2D(cc_jointTexture, vec2((x + 2.5) * invSize, y));\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #else\n mat4 getJointMatrix (float i) {\n highp float x, y, invSize;\n CCGetJointTextureCoords(12.0, i, x, y, invSize);\n vec4 v1 = vec4(\n decode32(texture2D(cc_jointTexture, vec2((x + 0.5) * invSize, y))),\n decode32(texture2D(cc_jointTexture, vec2((x + 1.5) * invSize, y))),\n decode32(texture2D(cc_jointTexture, vec2((x + 2.5) * invSize, y))),\n decode32(texture2D(cc_jointTexture, vec2((x + 3.5) * invSize, y)))\n );\n vec4 v2 = vec4(\n decode32(texture2D(cc_jointTexture, vec2((x + 4.5) * invSize, y))),\n decode32(texture2D(cc_jointTexture, vec2((x + 5.5) * invSize, y))),\n decode32(texture2D(cc_jointTexture, vec2((x + 6.5) * invSize, y))),\n decode32(texture2D(cc_jointTexture, vec2((x + 7.5) * invSize, y)))\n );\n vec4 v3 = vec4(\n decode32(texture2D(cc_jointTexture, vec2((x + 8.5) * invSize, y))),\n decode32(texture2D(cc_jointTexture, vec2((x + 9.5) * invSize, y))),\n decode32(texture2D(cc_jointTexture, vec2((x + 10.5) * invSize, y))),\n decode32(texture2D(cc_jointTexture, vec2((x + 11.5) * invSize, y)))\n );\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #endif\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n mat4 getJointMatrix (float i) {\n float x = i;\n vec4 v1 = texture2D(cc_realtimeJoint, vec2( x / 256.0, 0.5 / 3.0));\n vec4 v2 = texture2D(cc_realtimeJoint, vec2( x / 256.0, 1.5 / 3.0));\n vec4 v3 = texture2D(cc_realtimeJoint, vec2( x / 256.0, 2.5 / 3.0));\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #else\n mat4 getJointMatrix (float i) {\n float x = 4.0 * i;\n vec4 v1 = vec4(\n decode32(texture2D(cc_realtimeJoint, vec2((x + 0.5)/ 1024.0, 0.5 / 3.0))),\n decode32(texture2D(cc_realtimeJoint, vec2((x + 1.5)/ 1024.0, 0.5 / 3.0))),\n decode32(texture2D(cc_realtimeJoint, vec2((x + 2.5)/ 1024.0, 0.5 / 3.0))),\n decode32(texture2D(cc_realtimeJoint, vec2((x + 3.5)/ 1024.0, 0.5 / 3.0)))\n );\n vec4 v2 = vec4(\n decode32(texture2D(cc_realtimeJoint, vec2((x + 0.5)/ 1024.0, 1.5 / 3.0))),\n decode32(texture2D(cc_realtimeJoint, vec2((x + 1.5)/ 1024.0, 1.5 / 3.0))),\n decode32(texture2D(cc_realtimeJoint, vec2((x + 2.5)/ 1024.0, 1.5 / 3.0))),\n decode32(texture2D(cc_realtimeJoint, vec2((x + 3.5)/ 1024.0, 1.5 / 3.0)))\n );\n vec4 v3 = vec4(\n decode32(texture2D(cc_realtimeJoint, vec2((x + 0.5)/ 1024.0, 2.5 / 3.0))),\n decode32(texture2D(cc_realtimeJoint, vec2((x + 1.5)/ 1024.0, 2.5 / 3.0))),\n decode32(texture2D(cc_realtimeJoint, vec2((x + 2.5)/ 1024.0, 2.5 / 3.0))),\n decode32(texture2D(cc_realtimeJoint, vec2((x + 3.5)/ 1024.0, 2.5 / 3.0)))\n );\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #endif\n #else\n mat4 getJointMatrix (float i) {\n int idx = int(i);\n vec4 v1 = cc_joints[idx * 3];\n vec4 v2 = cc_joints[idx * 3 + 1];\n vec4 v3 = cc_joints[idx * 3 + 2];\n return mat4(vec4(v1.xyz, 0.0), vec4(v2.xyz, 0.0), vec4(v3.xyz, 0.0), vec4(v1.w, v2.w, v3.w, 1.0));\n }\n #endif\n #endif\n mat4 skinMatrix () {\n vec4 joints = vec4(a_joints);\n return getJointMatrix(joints.x) * a_weights.x\n + getJointMatrix(joints.y) * a_weights.y\n + getJointMatrix(joints.z) * a_weights.z\n + getJointMatrix(joints.w) * a_weights.w;\n }\n void CCSkin (inout vec4 position) {\n mat4 m = skinMatrix();\n position = m * position;\n }\n void CCSkin (inout vec4 position, inout vec3 normal, inout vec4 tangent) {\n mat4 m = skinMatrix();\n position = m * position;\n normal = (m * vec4(normal, 0.0)).xyz;\n tangent.xyz = (m * vec4(tangent.xyz, 0.0)).xyz;\n }\n#endif\nvoid CCVertInput(inout vec4 In)\n{\n In = vec4(a_position, 1.0);\n #if CC_USE_MORPH\n applyMorph(In);\n #endif\n #if CC_USE_SKINNING\n CCSkin(In);\n #endif\n}\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\n uniform highp vec4 cc_cameraPos;\n#if !USE_INSTANCING\n uniform highp mat4 cc_matWorld;\n#endif\nvoid CCGetWorldMatrix(out mat4 matWorld)\n{\n #if USE_INSTANCING\n matWorld = mat4(\n vec4(a_matWorld0.xyz, 0.0),\n vec4(a_matWorld1.xyz, 0.0),\n vec4(a_matWorld2.xyz, 0.0),\n vec4(a_matWorld0.w, a_matWorld1.w, a_matWorld2.w, 1.0)\n );\n #else\n matWorld = cc_matWorld;\n #endif\n}\n#if USE_VERTEX_COLOR\n attribute lowp vec4 a_color;\n varying lowp vec4 v_color;\n#endif\n#if USE_TEXTURE\n varying vec2 v_uv;\n uniform vec4 tilingOffset;\n#endif\nvec4 vert () {\n vec4 position;\n CCVertInput(position);\n mat4 matWorld;\n CCGetWorldMatrix(matWorld);\n #if USE_TEXTURE\n v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw;\n #if SAMPLE_FROM_RT\n v_uv = cc_cameraPos.w > 1.0 ? vec2(v_uv.x, 1.0 - v_uv.y) : v_uv;\n #endif\n #endif\n #if USE_VERTEX_COLOR\n v_color = a_color;\n #endif\n return cc_matProj * (cc_matView * matWorld) * position;\n}\nvoid main() { gl_Position = vert(); }",
  1188. "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\n#if USE_ALPHA_TEST\n#endif\n#if USE_TEXTURE\n varying vec2 v_uv;\n uniform sampler2D mainTexture;\n#endif\n uniform vec4 mainColor;\n uniform vec4 colorScaleAndCutoff;\n#if USE_VERTEX_COLOR\n varying lowp vec4 v_color;\n#endif\nvec4 frag () {\n vec4 o = mainColor;\n o.rgb *= colorScaleAndCutoff.xyz;\n #if USE_VERTEX_COLOR\n o *= v_color;\n #endif\n #if USE_TEXTURE\n o *= texture2D(mainTexture, v_uv);\n #endif\n #if USE_ALPHA_TEST\n if (o.ALPHA_TEST_CHANNEL < colorScaleAndCutoff.w) discard;\n #endif\n return CCFragOutput(o);\n}\nvoid main() { gl_FragColor = frag(); }"
  1189. },
  1190. "builtins": {
  1191. "globals": {
  1192. "blocks": [
  1193. {
  1194. "name": "CCGlobal",
  1195. "defines": []
  1196. },
  1197. {
  1198. "name": "CCCamera",
  1199. "defines": []
  1200. }
  1201. ],
  1202. "samplerTextures": [],
  1203. "buffers": [],
  1204. "images": []
  1205. },
  1206. "locals": {
  1207. "blocks": [
  1208. {
  1209. "name": "CCMorph",
  1210. "defines": [
  1211. "CC_USE_MORPH"
  1212. ]
  1213. },
  1214. {
  1215. "name": "CCSkinningTexture",
  1216. "defines": [
  1217. "CC_USE_SKINNING",
  1218. "CC_USE_BAKED_ANIMATION"
  1219. ]
  1220. },
  1221. {
  1222. "name": "CCSkinningAnimation",
  1223. "defines": [
  1224. "CC_USE_SKINNING",
  1225. "CC_USE_BAKED_ANIMATION"
  1226. ]
  1227. },
  1228. {
  1229. "name": "CCSkinning",
  1230. "defines": [
  1231. "CC_USE_SKINNING",
  1232. "!CC_USE_BAKED_ANIMATION",
  1233. "!CC_USE_REAL_TIME_JOINT_TEXTURE"
  1234. ]
  1235. },
  1236. {
  1237. "name": "CCLocal",
  1238. "defines": [
  1239. "!USE_INSTANCING"
  1240. ]
  1241. }
  1242. ],
  1243. "samplerTextures": [
  1244. {
  1245. "name": "cc_PositionDisplacements",
  1246. "defines": [
  1247. "CC_USE_MORPH",
  1248. "CC_MORPH_TARGET_HAS_POSITION"
  1249. ]
  1250. },
  1251. {
  1252. "name": "cc_NormalDisplacements",
  1253. "defines": [
  1254. "CC_USE_MORPH",
  1255. "CC_MORPH_TARGET_HAS_NORMAL"
  1256. ]
  1257. },
  1258. {
  1259. "name": "cc_TangentDisplacements",
  1260. "defines": [
  1261. "CC_USE_MORPH",
  1262. "CC_MORPH_TARGET_HAS_TANGENT"
  1263. ]
  1264. },
  1265. {
  1266. "name": "cc_jointTexture",
  1267. "defines": [
  1268. "CC_USE_SKINNING",
  1269. "CC_USE_BAKED_ANIMATION"
  1270. ]
  1271. },
  1272. {
  1273. "name": "cc_realtimeJoint",
  1274. "defines": [
  1275. "CC_USE_SKINNING",
  1276. "!CC_USE_BAKED_ANIMATION",
  1277. "CC_USE_REAL_TIME_JOINT_TEXTURE"
  1278. ]
  1279. }
  1280. ],
  1281. "buffers": [],
  1282. "images": []
  1283. },
  1284. "statistics": {
  1285. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 75,
  1286. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 44
  1287. }
  1288. },
  1289. "defines": [
  1290. {
  1291. "name": "USE_INSTANCING",
  1292. "type": "boolean",
  1293. "defines": [],
  1294. "editor": {
  1295. "elevated": true
  1296. }
  1297. },
  1298. {
  1299. "name": "CC_USE_SKINNING",
  1300. "type": "boolean",
  1301. "defines": []
  1302. },
  1303. {
  1304. "name": "CC_USE_BAKED_ANIMATION",
  1305. "type": "boolean",
  1306. "defines": [
  1307. "USE_INSTANCING"
  1308. ]
  1309. },
  1310. {
  1311. "name": "CC_USE_LIGHTMAP",
  1312. "type": "boolean",
  1313. "defines": [
  1314. "USE_INSTANCING"
  1315. ]
  1316. },
  1317. {
  1318. "name": "CC_USE_REFLECTION_PROBE",
  1319. "type": "boolean",
  1320. "defines": [
  1321. "USE_INSTANCING"
  1322. ]
  1323. },
  1324. {
  1325. "name": "CC_RECEIVE_SHADOW",
  1326. "type": "boolean",
  1327. "defines": [
  1328. "USE_INSTANCING"
  1329. ]
  1330. },
  1331. {
  1332. "name": "CC_USE_LIGHT_PROBE",
  1333. "type": "boolean",
  1334. "defines": [
  1335. "USE_INSTANCING"
  1336. ]
  1337. },
  1338. {
  1339. "name": "CC_USE_MORPH",
  1340. "type": "boolean",
  1341. "defines": []
  1342. },
  1343. {
  1344. "name": "CC_MORPH_TARGET_COUNT",
  1345. "type": "number",
  1346. "defines": [
  1347. "CC_USE_MORPH"
  1348. ],
  1349. "range": [
  1350. 2,
  1351. 8
  1352. ]
  1353. },
  1354. {
  1355. "name": "CC_MORPH_TARGET_HAS_POSITION",
  1356. "type": "boolean",
  1357. "defines": [
  1358. "CC_USE_MORPH"
  1359. ]
  1360. },
  1361. {
  1362. "name": "CC_MORPH_TARGET_HAS_NORMAL",
  1363. "type": "boolean",
  1364. "defines": [
  1365. "CC_USE_MORPH"
  1366. ]
  1367. },
  1368. {
  1369. "name": "CC_MORPH_TARGET_HAS_TANGENT",
  1370. "type": "boolean",
  1371. "defines": [
  1372. "CC_USE_MORPH"
  1373. ]
  1374. },
  1375. {
  1376. "name": "CC_MORPH_PRECOMPUTED",
  1377. "type": "boolean",
  1378. "defines": [
  1379. "CC_USE_MORPH"
  1380. ]
  1381. },
  1382. {
  1383. "name": "CC_USE_REAL_TIME_JOINT_TEXTURE",
  1384. "type": "boolean",
  1385. "defines": [
  1386. "CC_USE_SKINNING",
  1387. "!CC_USE_BAKED_ANIMATION"
  1388. ]
  1389. },
  1390. {
  1391. "name": "USE_VERTEX_COLOR",
  1392. "type": "boolean",
  1393. "defines": []
  1394. },
  1395. {
  1396. "name": "USE_TEXTURE",
  1397. "type": "boolean",
  1398. "defines": []
  1399. },
  1400. {
  1401. "name": "SAMPLE_FROM_RT",
  1402. "type": "boolean",
  1403. "defines": [
  1404. "USE_TEXTURE"
  1405. ]
  1406. },
  1407. {
  1408. "name": "USE_ALPHA_TEST",
  1409. "type": "boolean",
  1410. "defines": []
  1411. },
  1412. {
  1413. "name": "ALPHA_TEST_CHANNEL",
  1414. "type": "string",
  1415. "defines": [
  1416. "USE_ALPHA_TEST"
  1417. ],
  1418. "options": [
  1419. "a",
  1420. "r",
  1421. "g",
  1422. "b"
  1423. ]
  1424. }
  1425. ],
  1426. "name": "internal/builtin-camera-texture|camera-texture-vs:vert|camera-texture-fs:frag"
  1427. }
  1428. ],
  1429. "combinations": [],
  1430. "hideInEditor": false
  1431. }