f1556893-88b6-4c65-8c16-a5256ef3ad25.json 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "util/batched-unlit",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "name": "opaque",
  10. "passes": [
  11. {
  12. "program": "util/batched-unlit|unlit-vs:vert|unlit-fs:frag",
  13. "properties": {
  14. "colorArr": {
  15. "value": [
  16. 1,
  17. 1,
  18. 1,
  19. 1
  20. ],
  21. "editor": {
  22. "type": "color",
  23. "visible": false
  24. },
  25. "type": 16
  26. },
  27. "tilingOffsetArr": {
  28. "value": [
  29. 1,
  30. 1,
  31. 0,
  32. 0
  33. ],
  34. "type": 16,
  35. "editor": {
  36. "visible": false
  37. }
  38. },
  39. "mainTexture": {
  40. "value": "grey",
  41. "type": 28,
  42. "editor": {
  43. "visible": false
  44. }
  45. }
  46. }
  47. }
  48. ]
  49. },
  50. {
  51. "name": "transparent",
  52. "passes": [
  53. {
  54. "blendState": {
  55. "targets": [
  56. {
  57. "blend": true,
  58. "blendSrc": 2,
  59. "blendDst": 4,
  60. "blendDstAlpha": 4
  61. }
  62. ]
  63. },
  64. "program": "util/batched-unlit|unlit-vs:vert|unlit-fs:frag",
  65. "depthStencilState": {
  66. "depthTest": true,
  67. "depthWrite": false
  68. },
  69. "properties": {
  70. "colorArr": {
  71. "value": [
  72. 1,
  73. 1,
  74. 1,
  75. 1
  76. ],
  77. "editor": {
  78. "type": "color",
  79. "visible": false
  80. },
  81. "type": 16
  82. },
  83. "tilingOffsetArr": {
  84. "value": [
  85. 1,
  86. 1,
  87. 0,
  88. 0
  89. ],
  90. "type": 16,
  91. "editor": {
  92. "visible": false
  93. }
  94. },
  95. "mainTexture": {
  96. "value": "grey",
  97. "type": 28,
  98. "editor": {
  99. "visible": false
  100. }
  101. }
  102. }
  103. }
  104. ]
  105. }
  106. ],
  107. "shaders": [
  108. {
  109. "blocks": [
  110. {
  111. "name": "TexCoords",
  112. "members": [
  113. {
  114. "name": "tilingOffsetArr",
  115. "type": 16,
  116. "count": 6
  117. }
  118. ],
  119. "defines": [
  120. "USE_TEXTURE"
  121. ],
  122. "stageFlags": 1,
  123. "binding": 0
  124. },
  125. {
  126. "name": "Constant",
  127. "members": [
  128. {
  129. "name": "colorArr",
  130. "type": 16,
  131. "count": 6
  132. }
  133. ],
  134. "defines": [
  135. "USE_COLOR"
  136. ],
  137. "stageFlags": 16,
  138. "binding": 1
  139. }
  140. ],
  141. "samplerTextures": [
  142. {
  143. "name": "mainTexture",
  144. "type": 28,
  145. "count": 1,
  146. "defines": [
  147. "USE_TEXTURE"
  148. ],
  149. "stageFlags": 16,
  150. "binding": 2
  151. }
  152. ],
  153. "samplers": [],
  154. "textures": [],
  155. "buffers": [],
  156. "images": [],
  157. "subpassInputs": [],
  158. "attributes": [
  159. {
  160. "name": "a_position",
  161. "defines": [],
  162. "format": 32,
  163. "location": 0
  164. },
  165. {
  166. "name": "a_normal",
  167. "defines": [],
  168. "format": 32,
  169. "location": 1
  170. },
  171. {
  172. "name": "a_texCoord",
  173. "defines": [],
  174. "format": 21,
  175. "location": 2
  176. },
  177. {
  178. "name": "a_tangent",
  179. "defines": [],
  180. "format": 44,
  181. "location": 3
  182. },
  183. {
  184. "name": "a_joints",
  185. "defines": [
  186. "CC_USE_SKINNING"
  187. ],
  188. "location": 4
  189. },
  190. {
  191. "name": "a_weights",
  192. "defines": [
  193. "CC_USE_SKINNING"
  194. ],
  195. "format": 44,
  196. "location": 5
  197. },
  198. {
  199. "name": "a_jointAnimInfo",
  200. "defines": [
  201. "USE_INSTANCING",
  202. "CC_USE_BAKED_ANIMATION"
  203. ],
  204. "format": 44,
  205. "isInstanced": true,
  206. "location": 6
  207. },
  208. {
  209. "name": "a_matWorld0",
  210. "defines": [
  211. "USE_INSTANCING"
  212. ],
  213. "format": 44,
  214. "isInstanced": true,
  215. "location": 7
  216. },
  217. {
  218. "name": "a_matWorld1",
  219. "defines": [
  220. "USE_INSTANCING"
  221. ],
  222. "format": 44,
  223. "isInstanced": true,
  224. "location": 8
  225. },
  226. {
  227. "name": "a_matWorld2",
  228. "defines": [
  229. "USE_INSTANCING"
  230. ],
  231. "format": 44,
  232. "isInstanced": true,
  233. "location": 9
  234. },
  235. {
  236. "name": "a_lightingMapUVParam",
  237. "defines": [
  238. "USE_INSTANCING",
  239. "CC_USE_LIGHTMAP"
  240. ],
  241. "format": 44,
  242. "isInstanced": true,
  243. "location": 10
  244. },
  245. {
  246. "name": "a_localShadowBiasAndProbeId",
  247. "defines": [
  248. "USE_INSTANCING"
  249. ],
  250. "format": 44,
  251. "isInstanced": true,
  252. "location": 11
  253. },
  254. {
  255. "name": "a_reflectionProbeData",
  256. "defines": [
  257. "USE_INSTANCING",
  258. "CC_USE_REFLECTION_PROBE"
  259. ],
  260. "format": 44,
  261. "isInstanced": true,
  262. "location": 12
  263. },
  264. {
  265. "name": "a_sh_linear_const_r",
  266. "defines": [
  267. "USE_INSTANCING",
  268. "CC_USE_LIGHT_PROBE"
  269. ],
  270. "format": 44,
  271. "isInstanced": true,
  272. "location": 13
  273. },
  274. {
  275. "name": "a_sh_linear_const_g",
  276. "defines": [
  277. "USE_INSTANCING",
  278. "CC_USE_LIGHT_PROBE"
  279. ],
  280. "format": 44,
  281. "isInstanced": true,
  282. "location": 14
  283. },
  284. {
  285. "name": "a_sh_linear_const_b",
  286. "defines": [
  287. "USE_INSTANCING",
  288. "CC_USE_LIGHT_PROBE"
  289. ],
  290. "format": 44,
  291. "isInstanced": true,
  292. "location": 15
  293. },
  294. {
  295. "name": "a_vertexId",
  296. "defines": [
  297. "CC_USE_MORPH"
  298. ],
  299. "format": 11,
  300. "location": 16
  301. },
  302. {
  303. "name": "a_color",
  304. "defines": [
  305. "USE_VERTEX_COLOR"
  306. ],
  307. "format": 44,
  308. "location": 17
  309. },
  310. {
  311. "name": "a_batch_id",
  312. "defines": [],
  313. "format": 11,
  314. "location": 18
  315. },
  316. {
  317. "name": "a_batch_uv",
  318. "defines": [],
  319. "format": 21,
  320. "location": 19
  321. }
  322. ],
  323. "varyings": [
  324. {
  325. "name": "v_color",
  326. "type": 16,
  327. "count": 1,
  328. "defines": [
  329. "USE_VERTEX_COLOR"
  330. ],
  331. "stageFlags": 17,
  332. "location": 0
  333. },
  334. {
  335. "name": "v_uv",
  336. "type": 14,
  337. "count": 1,
  338. "defines": [
  339. "USE_TEXTURE"
  340. ],
  341. "stageFlags": 17,
  342. "location": 1
  343. },
  344. {
  345. "name": "v_batch_id",
  346. "type": 13,
  347. "count": 1,
  348. "defines": [],
  349. "stageFlags": 17,
  350. "location": 2
  351. },
  352. {
  353. "name": "v_batch_uv",
  354. "type": 14,
  355. "count": 1,
  356. "defines": [],
  357. "stageFlags": 17,
  358. "location": 3
  359. }
  360. ],
  361. "fragColors": [
  362. {
  363. "name": "cc_FragColor",
  364. "typename": "vec4",
  365. "type": 16,
  366. "count": 1,
  367. "defines": [],
  368. "stageFlags": 16,
  369. "location": 0
  370. }
  371. ],
  372. "descriptors": [
  373. {
  374. "rate": 0,
  375. "blocks": [
  376. {
  377. "tags": {
  378. "builtin": "local"
  379. },
  380. "name": "CCMorph",
  381. "members": [
  382. {
  383. "name": "cc_displacementWeights",
  384. "typename": "vec4",
  385. "type": 16,
  386. "count": 15,
  387. "isArray": true
  388. },
  389. {
  390. "name": "cc_displacementTextureInfo",
  391. "typename": "vec4",
  392. "type": 16,
  393. "count": 1
  394. }
  395. ],
  396. "defines": [
  397. "CC_USE_MORPH"
  398. ],
  399. "stageFlags": 1
  400. },
  401. {
  402. "tags": {
  403. "builtin": "local"
  404. },
  405. "name": "CCSkinningTexture",
  406. "members": [
  407. {
  408. "name": "cc_jointTextureInfo",
  409. "typename": "vec4",
  410. "type": 16,
  411. "count": 1,
  412. "precision": "highp "
  413. }
  414. ],
  415. "defines": [
  416. "CC_USE_SKINNING",
  417. "CC_USE_BAKED_ANIMATION"
  418. ],
  419. "stageFlags": 1
  420. },
  421. {
  422. "tags": {
  423. "builtin": "local"
  424. },
  425. "name": "CCSkinningAnimation",
  426. "members": [
  427. {
  428. "name": "cc_jointAnimInfo",
  429. "typename": "vec4",
  430. "type": 16,
  431. "count": 1,
  432. "precision": "highp "
  433. }
  434. ],
  435. "defines": [
  436. "CC_USE_SKINNING",
  437. "CC_USE_BAKED_ANIMATION"
  438. ],
  439. "stageFlags": 1
  440. },
  441. {
  442. "tags": {
  443. "builtin": "local"
  444. },
  445. "name": "CCSkinning",
  446. "members": [
  447. {
  448. "name": "cc_joints",
  449. "typename": "vec4",
  450. "type": 16,
  451. "count": 0,
  452. "precision": "highp ",
  453. "isArray": true
  454. }
  455. ],
  456. "defines": [
  457. "CC_USE_SKINNING",
  458. "!CC_USE_BAKED_ANIMATION",
  459. "!CC_USE_REAL_TIME_JOINT_TEXTURE"
  460. ],
  461. "stageFlags": 1
  462. },
  463. {
  464. "tags": {
  465. "builtin": "local"
  466. },
  467. "name": "CCLocal",
  468. "members": [
  469. {
  470. "name": "cc_matWorld",
  471. "typename": "mat4",
  472. "type": 25,
  473. "count": 1,
  474. "precision": "highp "
  475. },
  476. {
  477. "name": "cc_matWorldIT",
  478. "typename": "mat4",
  479. "type": 25,
  480. "count": 1,
  481. "precision": "highp "
  482. },
  483. {
  484. "name": "cc_lightingMapUVParam",
  485. "typename": "vec4",
  486. "type": 16,
  487. "count": 1,
  488. "precision": "highp "
  489. },
  490. {
  491. "name": "cc_localShadowBias",
  492. "typename": "vec4",
  493. "type": 16,
  494. "count": 1,
  495. "precision": "highp "
  496. },
  497. {
  498. "name": "cc_reflectionProbeData1",
  499. "typename": "vec4",
  500. "type": 16,
  501. "count": 1,
  502. "precision": "highp "
  503. },
  504. {
  505. "name": "cc_reflectionProbeData2",
  506. "typename": "vec4",
  507. "type": 16,
  508. "count": 1,
  509. "precision": "highp "
  510. },
  511. {
  512. "name": "cc_reflectionProbeBlendData1",
  513. "typename": "vec4",
  514. "type": 16,
  515. "count": 1,
  516. "precision": "highp "
  517. },
  518. {
  519. "name": "cc_reflectionProbeBlendData2",
  520. "typename": "vec4",
  521. "type": 16,
  522. "count": 1,
  523. "precision": "highp "
  524. }
  525. ],
  526. "defines": [
  527. "!USE_INSTANCING"
  528. ],
  529. "stageFlags": 1
  530. }
  531. ],
  532. "samplerTextures": [
  533. {
  534. "tags": {
  535. "builtin": "local"
  536. },
  537. "name": "cc_PositionDisplacements",
  538. "typename": "sampler2D",
  539. "type": 28,
  540. "count": 1,
  541. "defines": [
  542. "CC_USE_MORPH",
  543. "CC_MORPH_TARGET_HAS_POSITION"
  544. ],
  545. "stageFlags": 1
  546. },
  547. {
  548. "tags": {
  549. "builtin": "local"
  550. },
  551. "name": "cc_NormalDisplacements",
  552. "typename": "sampler2D",
  553. "type": 28,
  554. "count": 1,
  555. "defines": [
  556. "CC_USE_MORPH",
  557. "CC_MORPH_TARGET_HAS_NORMAL"
  558. ],
  559. "stageFlags": 1
  560. },
  561. {
  562. "tags": {
  563. "builtin": "local"
  564. },
  565. "name": "cc_TangentDisplacements",
  566. "typename": "sampler2D",
  567. "type": 28,
  568. "count": 1,
  569. "defines": [
  570. "CC_USE_MORPH",
  571. "CC_MORPH_TARGET_HAS_TANGENT"
  572. ],
  573. "stageFlags": 1
  574. },
  575. {
  576. "tags": {
  577. "builtin": "local"
  578. },
  579. "name": "cc_jointTexture",
  580. "typename": "sampler2D",
  581. "type": 28,
  582. "count": 1,
  583. "precision": "highp ",
  584. "defines": [
  585. "CC_USE_SKINNING",
  586. "CC_USE_BAKED_ANIMATION"
  587. ],
  588. "stageFlags": 1
  589. },
  590. {
  591. "tags": {
  592. "builtin": "local"
  593. },
  594. "name": "cc_realtimeJoint",
  595. "typename": "sampler2D",
  596. "type": 28,
  597. "count": 1,
  598. "precision": "highp ",
  599. "defines": [
  600. "CC_USE_SKINNING",
  601. "!CC_USE_BAKED_ANIMATION",
  602. "CC_USE_REAL_TIME_JOINT_TEXTURE"
  603. ],
  604. "stageFlags": 1
  605. }
  606. ],
  607. "samplers": [],
  608. "textures": [],
  609. "buffers": [],
  610. "images": [],
  611. "subpassInputs": []
  612. },
  613. {
  614. "rate": 1,
  615. "blocks": [
  616. {
  617. "name": "TexCoords",
  618. "members": [
  619. {
  620. "name": "tilingOffsetArr",
  621. "type": 16,
  622. "count": 6
  623. }
  624. ],
  625. "defines": [
  626. "USE_TEXTURE"
  627. ],
  628. "stageFlags": 1,
  629. "binding": 0
  630. },
  631. {
  632. "name": "Constant",
  633. "members": [
  634. {
  635. "name": "colorArr",
  636. "type": 16,
  637. "count": 6
  638. }
  639. ],
  640. "defines": [
  641. "USE_COLOR"
  642. ],
  643. "stageFlags": 16,
  644. "binding": 1
  645. }
  646. ],
  647. "samplerTextures": [
  648. {
  649. "name": "mainTexture",
  650. "type": 28,
  651. "count": 1,
  652. "defines": [
  653. "USE_TEXTURE"
  654. ],
  655. "stageFlags": 16,
  656. "binding": 2
  657. }
  658. ],
  659. "samplers": [],
  660. "textures": [],
  661. "buffers": [],
  662. "images": [],
  663. "subpassInputs": []
  664. },
  665. {
  666. "rate": 2,
  667. "blocks": [],
  668. "samplerTextures": [],
  669. "samplers": [],
  670. "textures": [],
  671. "buffers": [],
  672. "images": [],
  673. "subpassInputs": []
  674. },
  675. {
  676. "rate": 3,
  677. "blocks": [
  678. {
  679. "tags": {
  680. "builtin": "global"
  681. },
  682. "name": "CCGlobal",
  683. "members": [
  684. {
  685. "name": "cc_time",
  686. "typename": "vec4",
  687. "type": 16,
  688. "count": 1,
  689. "precision": "highp "
  690. },
  691. {
  692. "name": "cc_screenSize",
  693. "typename": "vec4",
  694. "type": 16,
  695. "count": 1,
  696. "precision": "mediump "
  697. },
  698. {
  699. "name": "cc_nativeSize",
  700. "typename": "vec4",
  701. "type": 16,
  702. "count": 1,
  703. "precision": "mediump "
  704. },
  705. {
  706. "name": "cc_probeInfo",
  707. "typename": "vec4",
  708. "type": 16,
  709. "count": 1,
  710. "precision": "mediump "
  711. },
  712. {
  713. "name": "cc_debug_view_mode",
  714. "typename": "vec4",
  715. "type": 16,
  716. "count": 1,
  717. "precision": "mediump "
  718. }
  719. ],
  720. "defines": [],
  721. "stageFlags": 17
  722. },
  723. {
  724. "tags": {
  725. "builtin": "global"
  726. },
  727. "name": "CCCamera",
  728. "members": [
  729. {
  730. "name": "cc_matView",
  731. "typename": "mat4",
  732. "type": 25,
  733. "count": 1,
  734. "precision": "highp "
  735. },
  736. {
  737. "name": "cc_matViewInv",
  738. "typename": "mat4",
  739. "type": 25,
  740. "count": 1,
  741. "precision": "highp "
  742. },
  743. {
  744. "name": "cc_matProj",
  745. "typename": "mat4",
  746. "type": 25,
  747. "count": 1,
  748. "precision": "highp "
  749. },
  750. {
  751. "name": "cc_matProjInv",
  752. "typename": "mat4",
  753. "type": 25,
  754. "count": 1,
  755. "precision": "highp "
  756. },
  757. {
  758. "name": "cc_matViewProj",
  759. "typename": "mat4",
  760. "type": 25,
  761. "count": 1,
  762. "precision": "highp "
  763. },
  764. {
  765. "name": "cc_matViewProjInv",
  766. "typename": "mat4",
  767. "type": 25,
  768. "count": 1,
  769. "precision": "highp "
  770. },
  771. {
  772. "name": "cc_cameraPos",
  773. "typename": "vec4",
  774. "type": 16,
  775. "count": 1,
  776. "precision": "highp "
  777. },
  778. {
  779. "name": "cc_surfaceTransform",
  780. "typename": "vec4",
  781. "type": 16,
  782. "count": 1,
  783. "precision": "mediump "
  784. },
  785. {
  786. "name": "cc_screenScale",
  787. "typename": "vec4",
  788. "type": 16,
  789. "count": 1,
  790. "precision": "mediump "
  791. },
  792. {
  793. "name": "cc_exposure",
  794. "typename": "vec4",
  795. "type": 16,
  796. "count": 1,
  797. "precision": "mediump "
  798. },
  799. {
  800. "name": "cc_mainLitDir",
  801. "typename": "vec4",
  802. "type": 16,
  803. "count": 1,
  804. "precision": "mediump "
  805. },
  806. {
  807. "name": "cc_mainLitColor",
  808. "typename": "vec4",
  809. "type": 16,
  810. "count": 1,
  811. "precision": "mediump "
  812. },
  813. {
  814. "name": "cc_ambientSky",
  815. "typename": "vec4",
  816. "type": 16,
  817. "count": 1,
  818. "precision": "mediump "
  819. },
  820. {
  821. "name": "cc_ambientGround",
  822. "typename": "vec4",
  823. "type": 16,
  824. "count": 1,
  825. "precision": "mediump "
  826. },
  827. {
  828. "name": "cc_fogColor",
  829. "typename": "vec4",
  830. "type": 16,
  831. "count": 1,
  832. "precision": "mediump "
  833. },
  834. {
  835. "name": "cc_fogBase",
  836. "typename": "vec4",
  837. "type": 16,
  838. "count": 1,
  839. "precision": "mediump "
  840. },
  841. {
  842. "name": "cc_fogAdd",
  843. "typename": "vec4",
  844. "type": 16,
  845. "count": 1,
  846. "precision": "mediump "
  847. },
  848. {
  849. "name": "cc_nearFar",
  850. "typename": "vec4",
  851. "type": 16,
  852. "count": 1,
  853. "precision": "mediump "
  854. },
  855. {
  856. "name": "cc_viewPort",
  857. "typename": "vec4",
  858. "type": 16,
  859. "count": 1,
  860. "precision": "mediump "
  861. }
  862. ],
  863. "defines": [],
  864. "stageFlags": 17
  865. }
  866. ],
  867. "samplerTextures": [],
  868. "samplers": [],
  869. "textures": [],
  870. "buffers": [],
  871. "images": [],
  872. "subpassInputs": []
  873. }
  874. ],
  875. "hash": 1299967,
  876. "glsl4": {
  877. "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 tilingOffsetArr[6];\n };\n#endif\nlayout(location = 18) in float a_batch_id;\nlayout(location = 2) out float v_batch_id;\nlayout(location = 19) in vec2 a_batch_uv;\nlayout(location = 3) out vec2 v_batch_uv;\nhighp vec4 vert () {\n int id = int(a_batch_id);\n #if USE_TEXTURE\n vec4 tilingOffset = tilingOffsetArr[id];\n v_batch_uv = a_batch_uv;\n #endif\n v_batch_id = a_batch_id;\n highp vec4 position;\n CCVertInput(position);\n highp mat4 matWorld;\n CCGetWorldMatrix(matWorld);\n #if USE_TEXTURE\n v_uv = a_texCoord;\n #if FLIP_UV\n v_uv.y = 1.0 - v_uv.y;\n #endif\n v_uv = v_uv * tilingOffset.xy + tilingOffset.zw;\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(); }",
  878. "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_TEXTURE\n layout(location = 1) in vec2 v_uv;\n layout(set = 1, binding = 2) uniform sampler2D mainTexture;\n#endif\n#if USE_COLOR\n layout(set = 1, binding = 1) uniform Constant {\n vec4 colorArr[6];\n };\n#endif\n#if USE_VERTEX_COLOR\n layout(location = 0) in lowp vec4 v_color;\n#endif\nlayout(location = 2) in float v_batch_id;\nlayout(location = 3) in vec2 v_batch_uv;\nvec4 getVec4Uniform (vec4 uniformArr[6]) {\n if (v_batch_id < 1.0) { return uniformArr[0]; }\n else if (v_batch_id < 2.0) { return uniformArr[1]; }\n else if (v_batch_id < 3.0) { return uniformArr[2]; }\n else if (v_batch_id < 4.0) { return uniformArr[3]; }\n else if (v_batch_id < 5.0) { return uniformArr[4]; }\n else { return uniformArr[5]; }\n}\nvec4 frag () {\n #if USE_COLOR\n vec4 color = getVec4Uniform(colorArr);\n #endif\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n #if BATCH_TEXTURE\n o *= texture(mainTexture, v_batch_uv);\n #else\n o *= texture(mainTexture, v_uv);\n #endif\n #endif\n #if USE_COLOR\n o *= color;\n #endif\n #if USE_VERTEX_COLOR\n o *= v_color;\n #endif\n return CCFragOutput(o);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  879. },
  880. "glsl3": {
  881. "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 tilingOffsetArr[6];\n };\n#endif\nin float a_batch_id;\nout float v_batch_id;\nin vec2 a_batch_uv;\nout vec2 v_batch_uv;\nhighp vec4 vert () {\n int id = int(a_batch_id);\n #if USE_TEXTURE\n vec4 tilingOffset = tilingOffsetArr[id];\n v_batch_uv = a_batch_uv;\n #endif\n v_batch_id = a_batch_id;\n highp vec4 position;\n CCVertInput(position);\n highp mat4 matWorld;\n CCGetWorldMatrix(matWorld);\n #if USE_TEXTURE\n v_uv = a_texCoord;\n #if FLIP_UV\n v_uv.y = 1.0 - v_uv.y;\n #endif\n v_uv = v_uv * tilingOffset.xy + tilingOffset.zw;\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(); }",
  882. "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_TEXTURE\n in vec2 v_uv;\n uniform sampler2D mainTexture;\n#endif\n#if USE_COLOR\n layout(std140) uniform Constant {\n vec4 colorArr[6];\n };\n#endif\n#if USE_VERTEX_COLOR\n in lowp vec4 v_color;\n#endif\nin float v_batch_id;\nin vec2 v_batch_uv;\nvec4 getVec4Uniform (vec4 uniformArr[6]) {\n if (v_batch_id < 1.0) { return uniformArr[0]; }\n else if (v_batch_id < 2.0) { return uniformArr[1]; }\n else if (v_batch_id < 3.0) { return uniformArr[2]; }\n else if (v_batch_id < 4.0) { return uniformArr[3]; }\n else if (v_batch_id < 5.0) { return uniformArr[4]; }\n else { return uniformArr[5]; }\n}\nvec4 frag () {\n #if USE_COLOR\n vec4 color = getVec4Uniform(colorArr);\n #endif\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n #if BATCH_TEXTURE\n o *= texture(mainTexture, v_batch_uv);\n #else\n o *= texture(mainTexture, v_uv);\n #endif\n #endif\n #if USE_COLOR\n o *= color;\n #endif\n #if USE_VERTEX_COLOR\n o *= v_color;\n #endif\n return CCFragOutput(o);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  883. },
  884. "glsl1": {
  885. "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#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 tilingOffsetArr[6];\n#endif\nattribute float a_batch_id;\nvarying float v_batch_id;\nattribute vec2 a_batch_uv;\nvarying vec2 v_batch_uv;\nhighp vec4 vert () {\n int id = int(a_batch_id);\n #if USE_TEXTURE\n vec4 tilingOffset = tilingOffsetArr[id];\n v_batch_uv = a_batch_uv;\n #endif\n v_batch_id = a_batch_id;\n highp vec4 position;\n CCVertInput(position);\n highp mat4 matWorld;\n CCGetWorldMatrix(matWorld);\n #if USE_TEXTURE\n v_uv = a_texCoord;\n #if FLIP_UV\n v_uv.y = 1.0 - v_uv.y;\n #endif\n v_uv = v_uv * tilingOffset.xy + tilingOffset.zw;\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(); }",
  886. "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\n#if USE_TEXTURE\n varying vec2 v_uv;\n uniform sampler2D mainTexture;\n#endif\n#if USE_COLOR\n uniform vec4 colorArr[6];\n#endif\n#if USE_VERTEX_COLOR\n varying lowp vec4 v_color;\n#endif\nvarying float v_batch_id;\nvarying vec2 v_batch_uv;\nvec4 getVec4Uniform (vec4 uniformArr[6]) {\n if (v_batch_id < 1.0) { return uniformArr[0]; }\n else if (v_batch_id < 2.0) { return uniformArr[1]; }\n else if (v_batch_id < 3.0) { return uniformArr[2]; }\n else if (v_batch_id < 4.0) { return uniformArr[3]; }\n else if (v_batch_id < 5.0) { return uniformArr[4]; }\n else { return uniformArr[5]; }\n}\nvec4 frag () {\n #if USE_COLOR\n vec4 color = getVec4Uniform(colorArr);\n #endif\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n #if BATCH_TEXTURE\n o *= texture2D(mainTexture, v_batch_uv);\n #else\n o *= texture2D(mainTexture, v_uv);\n #endif\n #endif\n #if USE_COLOR\n o *= color;\n #endif\n #if USE_VERTEX_COLOR\n o *= v_color;\n #endif\n return CCFragOutput(o);\n}\nvoid main() { gl_FragColor = frag(); }"
  887. },
  888. "builtins": {
  889. "globals": {
  890. "blocks": [
  891. {
  892. "name": "CCGlobal",
  893. "defines": []
  894. },
  895. {
  896. "name": "CCCamera",
  897. "defines": []
  898. }
  899. ],
  900. "samplerTextures": [],
  901. "buffers": [],
  902. "images": []
  903. },
  904. "locals": {
  905. "blocks": [
  906. {
  907. "name": "CCMorph",
  908. "defines": [
  909. "CC_USE_MORPH"
  910. ]
  911. },
  912. {
  913. "name": "CCSkinningTexture",
  914. "defines": [
  915. "CC_USE_SKINNING",
  916. "CC_USE_BAKED_ANIMATION"
  917. ]
  918. },
  919. {
  920. "name": "CCSkinningAnimation",
  921. "defines": [
  922. "CC_USE_SKINNING",
  923. "CC_USE_BAKED_ANIMATION"
  924. ]
  925. },
  926. {
  927. "name": "CCSkinning",
  928. "defines": [
  929. "CC_USE_SKINNING",
  930. "!CC_USE_BAKED_ANIMATION",
  931. "!CC_USE_REAL_TIME_JOINT_TEXTURE"
  932. ]
  933. },
  934. {
  935. "name": "CCLocal",
  936. "defines": [
  937. "!USE_INSTANCING"
  938. ]
  939. }
  940. ],
  941. "samplerTextures": [
  942. {
  943. "name": "cc_PositionDisplacements",
  944. "defines": [
  945. "CC_USE_MORPH",
  946. "CC_MORPH_TARGET_HAS_POSITION"
  947. ]
  948. },
  949. {
  950. "name": "cc_NormalDisplacements",
  951. "defines": [
  952. "CC_USE_MORPH",
  953. "CC_MORPH_TARGET_HAS_NORMAL"
  954. ]
  955. },
  956. {
  957. "name": "cc_TangentDisplacements",
  958. "defines": [
  959. "CC_USE_MORPH",
  960. "CC_MORPH_TARGET_HAS_TANGENT"
  961. ]
  962. },
  963. {
  964. "name": "cc_jointTexture",
  965. "defines": [
  966. "CC_USE_SKINNING",
  967. "CC_USE_BAKED_ANIMATION"
  968. ]
  969. },
  970. {
  971. "name": "cc_realtimeJoint",
  972. "defines": [
  973. "CC_USE_SKINNING",
  974. "!CC_USE_BAKED_ANIMATION",
  975. "CC_USE_REAL_TIME_JOINT_TEXTURE"
  976. ]
  977. }
  978. ],
  979. "buffers": [],
  980. "images": []
  981. },
  982. "statistics": {
  983. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 80,
  984. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 48
  985. }
  986. },
  987. "defines": [
  988. {
  989. "name": "USE_INSTANCING",
  990. "type": "boolean",
  991. "defines": [],
  992. "editor": {
  993. "elevated": true
  994. }
  995. },
  996. {
  997. "name": "CC_USE_SKINNING",
  998. "type": "boolean",
  999. "defines": []
  1000. },
  1001. {
  1002. "name": "CC_USE_BAKED_ANIMATION",
  1003. "type": "boolean",
  1004. "defines": [
  1005. "USE_INSTANCING"
  1006. ]
  1007. },
  1008. {
  1009. "name": "CC_USE_LIGHTMAP",
  1010. "type": "boolean",
  1011. "defines": [
  1012. "USE_INSTANCING"
  1013. ]
  1014. },
  1015. {
  1016. "name": "CC_USE_REFLECTION_PROBE",
  1017. "type": "boolean",
  1018. "defines": [
  1019. "USE_INSTANCING"
  1020. ]
  1021. },
  1022. {
  1023. "name": "CC_RECEIVE_SHADOW",
  1024. "type": "boolean",
  1025. "defines": [
  1026. "USE_INSTANCING"
  1027. ]
  1028. },
  1029. {
  1030. "name": "CC_USE_LIGHT_PROBE",
  1031. "type": "boolean",
  1032. "defines": [
  1033. "USE_INSTANCING"
  1034. ]
  1035. },
  1036. {
  1037. "name": "CC_USE_MORPH",
  1038. "type": "boolean",
  1039. "defines": []
  1040. },
  1041. {
  1042. "name": "CC_MORPH_TARGET_COUNT",
  1043. "type": "number",
  1044. "defines": [
  1045. "CC_USE_MORPH"
  1046. ],
  1047. "range": [
  1048. 2,
  1049. 8
  1050. ]
  1051. },
  1052. {
  1053. "name": "CC_MORPH_TARGET_HAS_POSITION",
  1054. "type": "boolean",
  1055. "defines": [
  1056. "CC_USE_MORPH"
  1057. ]
  1058. },
  1059. {
  1060. "name": "CC_MORPH_TARGET_HAS_NORMAL",
  1061. "type": "boolean",
  1062. "defines": [
  1063. "CC_USE_MORPH"
  1064. ]
  1065. },
  1066. {
  1067. "name": "CC_MORPH_TARGET_HAS_TANGENT",
  1068. "type": "boolean",
  1069. "defines": [
  1070. "CC_USE_MORPH"
  1071. ]
  1072. },
  1073. {
  1074. "name": "CC_MORPH_PRECOMPUTED",
  1075. "type": "boolean",
  1076. "defines": [
  1077. "CC_USE_MORPH"
  1078. ]
  1079. },
  1080. {
  1081. "name": "CC_USE_REAL_TIME_JOINT_TEXTURE",
  1082. "type": "boolean",
  1083. "defines": [
  1084. "CC_USE_SKINNING",
  1085. "!CC_USE_BAKED_ANIMATION"
  1086. ]
  1087. },
  1088. {
  1089. "name": "USE_VERTEX_COLOR",
  1090. "type": "boolean",
  1091. "defines": []
  1092. },
  1093. {
  1094. "name": "USE_TEXTURE",
  1095. "type": "boolean",
  1096. "defines": []
  1097. },
  1098. {
  1099. "name": "FLIP_UV",
  1100. "type": "boolean",
  1101. "defines": [
  1102. "USE_TEXTURE"
  1103. ]
  1104. },
  1105. {
  1106. "name": "USE_COLOR",
  1107. "type": "boolean",
  1108. "defines": []
  1109. },
  1110. {
  1111. "name": "BATCH_TEXTURE",
  1112. "type": "boolean",
  1113. "defines": [
  1114. "USE_TEXTURE"
  1115. ]
  1116. }
  1117. ],
  1118. "name": "util/batched-unlit|unlit-vs:vert|unlit-fs:frag"
  1119. }
  1120. ],
  1121. "combinations": [],
  1122. "hideInEditor": false
  1123. }