6308c013-7d49-4160-9516-562dd205b480.json 139 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "advanced/sky",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "name": "opaque",
  10. "passes": [
  11. {
  12. "rasterizerState": {
  13. "cullMode": 0
  14. },
  15. "program": "advanced/sky|sky-vs|sky-fs",
  16. "priority": 245,
  17. "depthStencilState": {
  18. "depthTest": true,
  19. "depthWrite": false
  20. },
  21. "properties": {
  22. "environmentMap": {
  23. "value": "grey",
  24. "type": 31
  25. },
  26. "positionScaling": {
  27. "value": [
  28. 1
  29. ],
  30. "editor": {
  31. "tooltip": "Set a smaller value (such as less than 1.0) to remove the effects of fog"
  32. },
  33. "type": 13,
  34. "handleInfo": [
  35. "params",
  36. 3,
  37. 13
  38. ]
  39. },
  40. "blendEnvironmentMap": {
  41. "value": "grey",
  42. "editor": {
  43. "parent": "BLEND_ENV_MAP"
  44. },
  45. "type": 31
  46. },
  47. "blendWeight": {
  48. "value": [
  49. 0
  50. ],
  51. "editor": {
  52. "parent": "BLEND_ENV_MAP"
  53. },
  54. "type": 13,
  55. "handleInfo": [
  56. "params",
  57. 0,
  58. 13
  59. ]
  60. },
  61. "brightMultiplier": {
  62. "value": [
  63. 1
  64. ],
  65. "type": 13,
  66. "handleInfo": [
  67. "params",
  68. 1,
  69. 13
  70. ]
  71. },
  72. "params": {
  73. "type": 16,
  74. "editor": {
  75. "visible": false,
  76. "deprecated": true
  77. },
  78. "value": [
  79. 0,
  80. 1,
  81. 0,
  82. 1
  83. ]
  84. }
  85. }
  86. },
  87. {
  88. "phase": "deferred-forward",
  89. "propertyIndex": 0,
  90. "rasterizerState": {
  91. "cullMode": 0
  92. },
  93. "program": "advanced/sky|sky-vs|sky-fs",
  94. "priority": 245,
  95. "depthStencilState": {
  96. "depthTest": true,
  97. "depthWrite": false
  98. }
  99. }
  100. ]
  101. }
  102. ],
  103. "shaders": [
  104. {
  105. "blocks": [
  106. {
  107. "name": "Constants",
  108. "members": [
  109. {
  110. "name": "params",
  111. "type": 16,
  112. "count": 1
  113. }
  114. ],
  115. "defines": [],
  116. "stageFlags": 17,
  117. "binding": 0
  118. }
  119. ],
  120. "samplerTextures": [
  121. {
  122. "name": "environmentMap",
  123. "type": 31,
  124. "count": 1,
  125. "defines": [],
  126. "stageFlags": 16,
  127. "binding": 1
  128. },
  129. {
  130. "name": "blendEnvironmentMap",
  131. "type": 31,
  132. "count": 1,
  133. "defines": [
  134. "BLEND_ENV_MAP"
  135. ],
  136. "stageFlags": 16,
  137. "binding": 2
  138. }
  139. ],
  140. "samplers": [],
  141. "textures": [],
  142. "buffers": [],
  143. "images": [],
  144. "subpassInputs": [],
  145. "attributes": [
  146. {
  147. "name": "a_position",
  148. "defines": [],
  149. "format": 32,
  150. "location": 0
  151. },
  152. {
  153. "name": "a_normal",
  154. "defines": [],
  155. "format": 32,
  156. "location": 1
  157. },
  158. {
  159. "name": "a_texCoord",
  160. "defines": [],
  161. "format": 21,
  162. "location": 2
  163. },
  164. {
  165. "name": "a_tangent",
  166. "defines": [],
  167. "format": 44,
  168. "location": 3
  169. },
  170. {
  171. "name": "a_color",
  172. "defines": [],
  173. "format": 44,
  174. "location": 6
  175. },
  176. {
  177. "name": "a_texCoord1",
  178. "defines": [],
  179. "format": 21,
  180. "location": 7
  181. },
  182. {
  183. "name": "a_joints",
  184. "defines": [
  185. "CC_USE_SKINNING"
  186. ],
  187. "location": 4
  188. },
  189. {
  190. "name": "a_weights",
  191. "defines": [
  192. "CC_USE_SKINNING"
  193. ],
  194. "format": 44,
  195. "location": 5
  196. },
  197. {
  198. "name": "a_jointAnimInfo",
  199. "defines": [
  200. "CC_USE_BAKED_ANIMATION"
  201. ],
  202. "format": 44,
  203. "location": 8
  204. },
  205. {
  206. "name": "a_matWorld0",
  207. "defines": [],
  208. "format": 44,
  209. "location": 9
  210. },
  211. {
  212. "name": "a_matWorld1",
  213. "defines": [],
  214. "format": 44,
  215. "location": 10
  216. },
  217. {
  218. "name": "a_matWorld2",
  219. "defines": [],
  220. "format": 44,
  221. "location": 11
  222. },
  223. {
  224. "name": "a_lightingMapUVParam",
  225. "defines": [
  226. "CC_USE_LIGHTMAP"
  227. ],
  228. "format": 44,
  229. "location": 12
  230. },
  231. {
  232. "name": "a_localShadowBiasAndProbeId",
  233. "defines": [],
  234. "format": 44,
  235. "location": 13
  236. },
  237. {
  238. "name": "a_reflectionProbeData",
  239. "defines": [
  240. "CC_USE_REFLECTION_PROBE"
  241. ],
  242. "format": 44,
  243. "location": 14
  244. },
  245. {
  246. "name": "a_sh_linear_const_r",
  247. "defines": [
  248. "CC_USE_LIGHT_PROBE"
  249. ],
  250. "format": 44,
  251. "location": 15
  252. },
  253. {
  254. "name": "a_sh_linear_const_g",
  255. "defines": [
  256. "CC_USE_LIGHT_PROBE"
  257. ],
  258. "format": 44,
  259. "location": 16
  260. },
  261. {
  262. "name": "a_sh_linear_const_b",
  263. "defines": [
  264. "CC_USE_LIGHT_PROBE"
  265. ],
  266. "format": 44,
  267. "location": 17
  268. },
  269. {
  270. "name": "a_vertexId",
  271. "defines": [
  272. "CC_USE_MORPH"
  273. ],
  274. "format": 11,
  275. "location": 18
  276. }
  277. ],
  278. "varyings": [
  279. {
  280. "name": "v_worldPos",
  281. "type": 15,
  282. "count": 1,
  283. "defines": [],
  284. "stageFlags": 17,
  285. "location": 0
  286. },
  287. {
  288. "name": "v_normal",
  289. "type": 16,
  290. "count": 1,
  291. "defines": [],
  292. "stageFlags": 17,
  293. "location": 1
  294. },
  295. {
  296. "name": "v_uv",
  297. "type": 14,
  298. "count": 1,
  299. "defines": [],
  300. "stageFlags": 17,
  301. "location": 2
  302. },
  303. {
  304. "name": "v_color",
  305. "type": 16,
  306. "count": 1,
  307. "defines": [],
  308. "stageFlags": 17,
  309. "location": 3
  310. },
  311. {
  312. "name": "v_tangent",
  313. "type": 16,
  314. "count": 1,
  315. "defines": [],
  316. "stageFlags": 17,
  317. "location": 4
  318. },
  319. {
  320. "name": "v_uv1",
  321. "type": 14,
  322. "count": 1,
  323. "defines": [],
  324. "stageFlags": 17,
  325. "location": 5
  326. },
  327. {
  328. "name": "v_luv",
  329. "type": 15,
  330. "count": 1,
  331. "defines": [
  332. "CC_USE_LIGHTMAP",
  333. "!CC_FORWARD_ADD"
  334. ],
  335. "stageFlags": 17,
  336. "location": 6
  337. },
  338. {
  339. "name": "v_shadowBiasAndProbeId",
  340. "type": 16,
  341. "count": 1,
  342. "defines": [],
  343. "stageFlags": 17,
  344. "location": 7
  345. },
  346. {
  347. "name": "v_reflectionProbeData",
  348. "type": 16,
  349. "count": 1,
  350. "defines": [
  351. "CC_USE_REFLECTION_PROBE"
  352. ],
  353. "stageFlags": 17,
  354. "location": 8
  355. },
  356. {
  357. "name": "v_fogFactor",
  358. "type": 13,
  359. "count": 1,
  360. "defines": [
  361. "CC_USE_FOG",
  362. "!CC_USE_ACCURATE_FOG"
  363. ],
  364. "stageFlags": 17,
  365. "location": 9
  366. },
  367. {
  368. "name": "v_localPos",
  369. "type": 16,
  370. "count": 1,
  371. "defines": [],
  372. "stageFlags": 17,
  373. "location": 10
  374. },
  375. {
  376. "name": "v_clipPos",
  377. "type": 16,
  378. "count": 1,
  379. "defines": [
  380. "CC_SURFACES_TRANSFER_CLIP_POS"
  381. ],
  382. "stageFlags": 17,
  383. "location": 11
  384. },
  385. {
  386. "name": "v_sh_linear_const_r",
  387. "type": 16,
  388. "count": 1,
  389. "defines": [
  390. "CC_USE_LIGHT_PROBE"
  391. ],
  392. "stageFlags": 17,
  393. "location": 12
  394. },
  395. {
  396. "name": "v_sh_linear_const_g",
  397. "type": 16,
  398. "count": 1,
  399. "defines": [
  400. "CC_USE_LIGHT_PROBE"
  401. ],
  402. "stageFlags": 17,
  403. "location": 13
  404. },
  405. {
  406. "name": "v_sh_linear_const_b",
  407. "type": 16,
  408. "count": 1,
  409. "defines": [
  410. "CC_USE_LIGHT_PROBE"
  411. ],
  412. "stageFlags": 17,
  413. "location": 14
  414. }
  415. ],
  416. "fragColors": [
  417. {
  418. "name": "fragColorX",
  419. "typename": "vec4",
  420. "type": 16,
  421. "count": 1,
  422. "defines": [],
  423. "stageFlags": 16,
  424. "location": 0
  425. }
  426. ],
  427. "descriptors": [
  428. {
  429. "rate": 0,
  430. "blocks": [
  431. {
  432. "tags": {
  433. "builtin": "local"
  434. },
  435. "name": "CCLocal",
  436. "members": [
  437. {
  438. "name": "cc_matWorld",
  439. "typename": "mat4",
  440. "type": 25,
  441. "count": 1,
  442. "precision": "highp "
  443. },
  444. {
  445. "name": "cc_matWorldIT",
  446. "typename": "mat4",
  447. "type": 25,
  448. "count": 1,
  449. "precision": "highp "
  450. },
  451. {
  452. "name": "cc_lightingMapUVParam",
  453. "typename": "vec4",
  454. "type": 16,
  455. "count": 1,
  456. "precision": "highp "
  457. },
  458. {
  459. "name": "cc_localShadowBias",
  460. "typename": "vec4",
  461. "type": 16,
  462. "count": 1,
  463. "precision": "highp "
  464. },
  465. {
  466. "name": "cc_reflectionProbeData1",
  467. "typename": "vec4",
  468. "type": 16,
  469. "count": 1,
  470. "precision": "highp "
  471. },
  472. {
  473. "name": "cc_reflectionProbeData2",
  474. "typename": "vec4",
  475. "type": 16,
  476. "count": 1,
  477. "precision": "highp "
  478. },
  479. {
  480. "name": "cc_reflectionProbeBlendData1",
  481. "typename": "vec4",
  482. "type": 16,
  483. "count": 1,
  484. "precision": "highp "
  485. },
  486. {
  487. "name": "cc_reflectionProbeBlendData2",
  488. "typename": "vec4",
  489. "type": 16,
  490. "count": 1,
  491. "precision": "highp "
  492. }
  493. ],
  494. "defines": [],
  495. "stageFlags": 17
  496. },
  497. {
  498. "tags": {
  499. "builtin": "local"
  500. },
  501. "name": "CCMorph",
  502. "members": [
  503. {
  504. "name": "cc_displacementWeights",
  505. "typename": "vec4",
  506. "type": 16,
  507. "count": 15,
  508. "isArray": true
  509. },
  510. {
  511. "name": "cc_displacementTextureInfo",
  512. "typename": "vec4",
  513. "type": 16,
  514. "count": 1
  515. }
  516. ],
  517. "defines": [
  518. "CC_USE_MORPH"
  519. ],
  520. "stageFlags": 1
  521. },
  522. {
  523. "tags": {
  524. "builtin": "local"
  525. },
  526. "name": "CCSkinningTexture",
  527. "members": [
  528. {
  529. "name": "cc_jointTextureInfo",
  530. "typename": "vec4",
  531. "type": 16,
  532. "count": 1,
  533. "precision": "highp "
  534. }
  535. ],
  536. "defines": [
  537. "CC_USE_SKINNING",
  538. "CC_USE_BAKED_ANIMATION"
  539. ],
  540. "stageFlags": 1
  541. },
  542. {
  543. "tags": {
  544. "builtin": "local"
  545. },
  546. "name": "CCSkinningAnimation",
  547. "members": [
  548. {
  549. "name": "cc_jointAnimInfo",
  550. "typename": "vec4",
  551. "type": 16,
  552. "count": 1,
  553. "precision": "highp "
  554. }
  555. ],
  556. "defines": [
  557. "CC_USE_SKINNING",
  558. "CC_USE_BAKED_ANIMATION"
  559. ],
  560. "stageFlags": 1
  561. },
  562. {
  563. "tags": {
  564. "builtin": "local"
  565. },
  566. "name": "CCSkinning",
  567. "members": [
  568. {
  569. "name": "cc_joints",
  570. "typename": "vec4",
  571. "type": 16,
  572. "count": 0,
  573. "precision": "highp ",
  574. "isArray": true
  575. }
  576. ],
  577. "defines": [
  578. "CC_USE_SKINNING",
  579. "!CC_USE_BAKED_ANIMATION",
  580. "!CC_USE_REAL_TIME_JOINT_TEXTURE"
  581. ],
  582. "stageFlags": 1
  583. },
  584. {
  585. "tags": {
  586. "builtin": "local"
  587. },
  588. "name": "CCForwardLight",
  589. "members": [
  590. {
  591. "name": "cc_lightPos",
  592. "typename": "vec4",
  593. "type": 16,
  594. "count": 0,
  595. "precision": "highp ",
  596. "isArray": true
  597. },
  598. {
  599. "name": "cc_lightColor",
  600. "typename": "vec4",
  601. "type": 16,
  602. "count": 0,
  603. "isArray": true
  604. },
  605. {
  606. "name": "cc_lightSizeRangeAngle",
  607. "typename": "vec4",
  608. "type": 16,
  609. "count": 0,
  610. "isArray": true
  611. },
  612. {
  613. "name": "cc_lightDir",
  614. "typename": "vec4",
  615. "type": 16,
  616. "count": 0,
  617. "isArray": true
  618. },
  619. {
  620. "name": "cc_lightBoundingSizeVS",
  621. "typename": "vec4",
  622. "type": 16,
  623. "count": 0,
  624. "isArray": true
  625. }
  626. ],
  627. "defines": [
  628. "CC_FORWARD_ADD",
  629. "CC_ENABLE_CLUSTERED_LIGHT_CULLING"
  630. ],
  631. "stageFlags": 16
  632. },
  633. {
  634. "tags": {
  635. "builtin": "local"
  636. },
  637. "name": "CCSH",
  638. "members": [
  639. {
  640. "name": "cc_sh_linear_const_r",
  641. "typename": "vec4",
  642. "type": 16,
  643. "count": 1
  644. },
  645. {
  646. "name": "cc_sh_linear_const_g",
  647. "typename": "vec4",
  648. "type": 16,
  649. "count": 1
  650. },
  651. {
  652. "name": "cc_sh_linear_const_b",
  653. "typename": "vec4",
  654. "type": 16,
  655. "count": 1
  656. },
  657. {
  658. "name": "cc_sh_quadratic_r",
  659. "typename": "vec4",
  660. "type": 16,
  661. "count": 1
  662. },
  663. {
  664. "name": "cc_sh_quadratic_g",
  665. "typename": "vec4",
  666. "type": 16,
  667. "count": 1
  668. },
  669. {
  670. "name": "cc_sh_quadratic_b",
  671. "typename": "vec4",
  672. "type": 16,
  673. "count": 1
  674. },
  675. {
  676. "name": "cc_sh_quadratic_a",
  677. "typename": "vec4",
  678. "type": 16,
  679. "count": 1
  680. }
  681. ],
  682. "defines": [
  683. "CC_USE_LIGHT_PROBE"
  684. ],
  685. "stageFlags": 16
  686. }
  687. ],
  688. "samplerTextures": [
  689. {
  690. "tags": {
  691. "builtin": "local"
  692. },
  693. "name": "cc_PositionDisplacements",
  694. "typename": "sampler2D",
  695. "type": 28,
  696. "count": 1,
  697. "defines": [
  698. "CC_USE_MORPH",
  699. "CC_MORPH_TARGET_HAS_POSITION"
  700. ],
  701. "stageFlags": 1
  702. },
  703. {
  704. "tags": {
  705. "builtin": "local"
  706. },
  707. "name": "cc_NormalDisplacements",
  708. "typename": "sampler2D",
  709. "type": 28,
  710. "count": 1,
  711. "defines": [
  712. "CC_USE_MORPH",
  713. "CC_MORPH_TARGET_HAS_NORMAL"
  714. ],
  715. "stageFlags": 1
  716. },
  717. {
  718. "tags": {
  719. "builtin": "local"
  720. },
  721. "name": "cc_TangentDisplacements",
  722. "typename": "sampler2D",
  723. "type": 28,
  724. "count": 1,
  725. "defines": [
  726. "CC_USE_MORPH",
  727. "CC_MORPH_TARGET_HAS_TANGENT"
  728. ],
  729. "stageFlags": 1
  730. },
  731. {
  732. "tags": {
  733. "builtin": "local"
  734. },
  735. "name": "cc_jointTexture",
  736. "typename": "sampler2D",
  737. "type": 28,
  738. "count": 1,
  739. "precision": "highp ",
  740. "defines": [
  741. "CC_USE_SKINNING",
  742. "CC_USE_BAKED_ANIMATION"
  743. ],
  744. "stageFlags": 1
  745. },
  746. {
  747. "tags": {
  748. "builtin": "local"
  749. },
  750. "name": "cc_realtimeJoint",
  751. "typename": "sampler2D",
  752. "type": 28,
  753. "count": 1,
  754. "precision": "highp ",
  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": "cc_reflectionProbeCubemap",
  767. "typename": "samplerCube",
  768. "type": 31,
  769. "count": 1,
  770. "defines": [
  771. "CC_USE_REFLECTION_PROBE"
  772. ],
  773. "stageFlags": 16
  774. },
  775. {
  776. "tags": {
  777. "builtin": "local"
  778. },
  779. "name": "cc_reflectionProbePlanarMap",
  780. "typename": "sampler2D",
  781. "type": 28,
  782. "count": 1,
  783. "defines": [
  784. "CC_USE_REFLECTION_PROBE"
  785. ],
  786. "stageFlags": 16
  787. },
  788. {
  789. "tags": {
  790. "builtin": "local"
  791. },
  792. "name": "cc_reflectionProbeDataMap",
  793. "typename": "sampler2D",
  794. "type": 28,
  795. "count": 1,
  796. "defines": [
  797. "CC_USE_REFLECTION_PROBE"
  798. ],
  799. "stageFlags": 16
  800. },
  801. {
  802. "tags": {
  803. "builtin": "local"
  804. },
  805. "name": "cc_reflectionProbeBlendCubemap",
  806. "typename": "samplerCube",
  807. "type": 31,
  808. "count": 1,
  809. "defines": [
  810. "CC_USE_REFLECTION_PROBE"
  811. ],
  812. "stageFlags": 16
  813. },
  814. {
  815. "tags": {
  816. "builtin": "local"
  817. },
  818. "name": "cc_lightingMap",
  819. "typename": "sampler2D",
  820. "type": 28,
  821. "count": 1,
  822. "defines": [
  823. "CC_USE_LIGHTMAP",
  824. "!CC_FORWARD_ADD"
  825. ],
  826. "stageFlags": 16
  827. }
  828. ],
  829. "samplers": [],
  830. "textures": [],
  831. "buffers": [],
  832. "images": [],
  833. "subpassInputs": []
  834. },
  835. {
  836. "rate": 1,
  837. "blocks": [
  838. {
  839. "name": "Constants",
  840. "members": [
  841. {
  842. "name": "params",
  843. "type": 16,
  844. "count": 1
  845. }
  846. ],
  847. "defines": [],
  848. "stageFlags": 17,
  849. "binding": 0
  850. }
  851. ],
  852. "samplerTextures": [
  853. {
  854. "name": "environmentMap",
  855. "type": 31,
  856. "count": 1,
  857. "defines": [],
  858. "stageFlags": 16,
  859. "binding": 1
  860. },
  861. {
  862. "name": "blendEnvironmentMap",
  863. "type": 31,
  864. "count": 1,
  865. "defines": [
  866. "BLEND_ENV_MAP"
  867. ],
  868. "stageFlags": 16,
  869. "binding": 2
  870. }
  871. ],
  872. "samplers": [],
  873. "textures": [],
  874. "buffers": [],
  875. "images": [],
  876. "subpassInputs": []
  877. },
  878. {
  879. "rate": 2,
  880. "blocks": [],
  881. "samplerTextures": [],
  882. "samplers": [],
  883. "textures": [],
  884. "buffers": [],
  885. "images": [],
  886. "subpassInputs": []
  887. },
  888. {
  889. "rate": 3,
  890. "blocks": [
  891. {
  892. "tags": {
  893. "builtin": "global"
  894. },
  895. "name": "CCGlobal",
  896. "members": [
  897. {
  898. "name": "cc_time",
  899. "typename": "vec4",
  900. "type": 16,
  901. "count": 1,
  902. "precision": "highp "
  903. },
  904. {
  905. "name": "cc_screenSize",
  906. "typename": "vec4",
  907. "type": 16,
  908. "count": 1,
  909. "precision": "mediump "
  910. },
  911. {
  912. "name": "cc_nativeSize",
  913. "typename": "vec4",
  914. "type": 16,
  915. "count": 1,
  916. "precision": "mediump "
  917. },
  918. {
  919. "name": "cc_probeInfo",
  920. "typename": "vec4",
  921. "type": 16,
  922. "count": 1,
  923. "precision": "mediump "
  924. },
  925. {
  926. "name": "cc_debug_view_mode",
  927. "typename": "vec4",
  928. "type": 16,
  929. "count": 1,
  930. "precision": "mediump "
  931. }
  932. ],
  933. "defines": [],
  934. "stageFlags": 17
  935. },
  936. {
  937. "tags": {
  938. "builtin": "global"
  939. },
  940. "name": "CCCamera",
  941. "members": [
  942. {
  943. "name": "cc_matView",
  944. "typename": "mat4",
  945. "type": 25,
  946. "count": 1,
  947. "precision": "highp "
  948. },
  949. {
  950. "name": "cc_matViewInv",
  951. "typename": "mat4",
  952. "type": 25,
  953. "count": 1,
  954. "precision": "highp "
  955. },
  956. {
  957. "name": "cc_matProj",
  958. "typename": "mat4",
  959. "type": 25,
  960. "count": 1,
  961. "precision": "highp "
  962. },
  963. {
  964. "name": "cc_matProjInv",
  965. "typename": "mat4",
  966. "type": 25,
  967. "count": 1,
  968. "precision": "highp "
  969. },
  970. {
  971. "name": "cc_matViewProj",
  972. "typename": "mat4",
  973. "type": 25,
  974. "count": 1,
  975. "precision": "highp "
  976. },
  977. {
  978. "name": "cc_matViewProjInv",
  979. "typename": "mat4",
  980. "type": 25,
  981. "count": 1,
  982. "precision": "highp "
  983. },
  984. {
  985. "name": "cc_cameraPos",
  986. "typename": "vec4",
  987. "type": 16,
  988. "count": 1,
  989. "precision": "highp "
  990. },
  991. {
  992. "name": "cc_surfaceTransform",
  993. "typename": "vec4",
  994. "type": 16,
  995. "count": 1,
  996. "precision": "mediump "
  997. },
  998. {
  999. "name": "cc_screenScale",
  1000. "typename": "vec4",
  1001. "type": 16,
  1002. "count": 1,
  1003. "precision": "mediump "
  1004. },
  1005. {
  1006. "name": "cc_exposure",
  1007. "typename": "vec4",
  1008. "type": 16,
  1009. "count": 1,
  1010. "precision": "mediump "
  1011. },
  1012. {
  1013. "name": "cc_mainLitDir",
  1014. "typename": "vec4",
  1015. "type": 16,
  1016. "count": 1,
  1017. "precision": "mediump "
  1018. },
  1019. {
  1020. "name": "cc_mainLitColor",
  1021. "typename": "vec4",
  1022. "type": 16,
  1023. "count": 1,
  1024. "precision": "mediump "
  1025. },
  1026. {
  1027. "name": "cc_ambientSky",
  1028. "typename": "vec4",
  1029. "type": 16,
  1030. "count": 1,
  1031. "precision": "mediump "
  1032. },
  1033. {
  1034. "name": "cc_ambientGround",
  1035. "typename": "vec4",
  1036. "type": 16,
  1037. "count": 1,
  1038. "precision": "mediump "
  1039. },
  1040. {
  1041. "name": "cc_fogColor",
  1042. "typename": "vec4",
  1043. "type": 16,
  1044. "count": 1,
  1045. "precision": "mediump "
  1046. },
  1047. {
  1048. "name": "cc_fogBase",
  1049. "typename": "vec4",
  1050. "type": 16,
  1051. "count": 1,
  1052. "precision": "mediump "
  1053. },
  1054. {
  1055. "name": "cc_fogAdd",
  1056. "typename": "vec4",
  1057. "type": 16,
  1058. "count": 1,
  1059. "precision": "mediump "
  1060. },
  1061. {
  1062. "name": "cc_nearFar",
  1063. "typename": "vec4",
  1064. "type": 16,
  1065. "count": 1,
  1066. "precision": "mediump "
  1067. },
  1068. {
  1069. "name": "cc_viewPort",
  1070. "typename": "vec4",
  1071. "type": 16,
  1072. "count": 1,
  1073. "precision": "mediump "
  1074. }
  1075. ],
  1076. "defines": [],
  1077. "stageFlags": 17
  1078. },
  1079. {
  1080. "tags": {
  1081. "builtin": "global"
  1082. },
  1083. "name": "CCShadow",
  1084. "members": [
  1085. {
  1086. "name": "cc_matLightView",
  1087. "typename": "mat4",
  1088. "type": 25,
  1089. "count": 1,
  1090. "precision": "highp "
  1091. },
  1092. {
  1093. "name": "cc_matLightViewProj",
  1094. "typename": "mat4",
  1095. "type": 25,
  1096. "count": 1,
  1097. "precision": "highp "
  1098. },
  1099. {
  1100. "name": "cc_shadowInvProjDepthInfo",
  1101. "typename": "vec4",
  1102. "type": 16,
  1103. "count": 1,
  1104. "precision": "highp "
  1105. },
  1106. {
  1107. "name": "cc_shadowProjDepthInfo",
  1108. "typename": "vec4",
  1109. "type": 16,
  1110. "count": 1,
  1111. "precision": "highp "
  1112. },
  1113. {
  1114. "name": "cc_shadowProjInfo",
  1115. "typename": "vec4",
  1116. "type": 16,
  1117. "count": 1,
  1118. "precision": "highp "
  1119. },
  1120. {
  1121. "name": "cc_shadowNFLSInfo",
  1122. "typename": "vec4",
  1123. "type": 16,
  1124. "count": 1,
  1125. "precision": "mediump "
  1126. },
  1127. {
  1128. "name": "cc_shadowWHPBInfo",
  1129. "typename": "vec4",
  1130. "type": 16,
  1131. "count": 1,
  1132. "precision": "mediump "
  1133. },
  1134. {
  1135. "name": "cc_shadowLPNNInfo",
  1136. "typename": "vec4",
  1137. "type": 16,
  1138. "count": 1,
  1139. "precision": "mediump "
  1140. },
  1141. {
  1142. "name": "cc_shadowColor",
  1143. "typename": "vec4",
  1144. "type": 16,
  1145. "count": 1,
  1146. "precision": "lowp "
  1147. },
  1148. {
  1149. "name": "cc_planarNDInfo",
  1150. "typename": "vec4",
  1151. "type": 16,
  1152. "count": 1,
  1153. "precision": "mediump "
  1154. }
  1155. ],
  1156. "defines": [],
  1157. "stageFlags": 17
  1158. },
  1159. {
  1160. "tags": {
  1161. "builtin": "global"
  1162. },
  1163. "name": "CCCSM",
  1164. "members": [
  1165. {
  1166. "name": "cc_csmViewDir0",
  1167. "typename": "vec4",
  1168. "type": 16,
  1169. "count": 4,
  1170. "precision": "highp ",
  1171. "isArray": true
  1172. },
  1173. {
  1174. "name": "cc_csmViewDir1",
  1175. "typename": "vec4",
  1176. "type": 16,
  1177. "count": 4,
  1178. "precision": "highp ",
  1179. "isArray": true
  1180. },
  1181. {
  1182. "name": "cc_csmViewDir2",
  1183. "typename": "vec4",
  1184. "type": 16,
  1185. "count": 4,
  1186. "precision": "highp ",
  1187. "isArray": true
  1188. },
  1189. {
  1190. "name": "cc_csmAtlas",
  1191. "typename": "vec4",
  1192. "type": 16,
  1193. "count": 4,
  1194. "precision": "highp ",
  1195. "isArray": true
  1196. },
  1197. {
  1198. "name": "cc_matCSMViewProj",
  1199. "typename": "mat4",
  1200. "type": 25,
  1201. "count": 4,
  1202. "precision": "highp ",
  1203. "isArray": true
  1204. },
  1205. {
  1206. "name": "cc_csmProjDepthInfo",
  1207. "typename": "vec4",
  1208. "type": 16,
  1209. "count": 4,
  1210. "precision": "highp ",
  1211. "isArray": true
  1212. },
  1213. {
  1214. "name": "cc_csmProjInfo",
  1215. "typename": "vec4",
  1216. "type": 16,
  1217. "count": 4,
  1218. "precision": "highp ",
  1219. "isArray": true
  1220. },
  1221. {
  1222. "name": "cc_csmSplitsInfo",
  1223. "typename": "vec4",
  1224. "type": 16,
  1225. "count": 1,
  1226. "precision": "highp "
  1227. }
  1228. ],
  1229. "defines": [
  1230. "CC_SUPPORT_CASCADED_SHADOW_MAP"
  1231. ],
  1232. "stageFlags": 16
  1233. }
  1234. ],
  1235. "samplerTextures": [
  1236. {
  1237. "tags": {
  1238. "builtin": "global"
  1239. },
  1240. "name": "cc_environment",
  1241. "typename": "samplerCube",
  1242. "type": 31,
  1243. "count": 1,
  1244. "defines": [],
  1245. "stageFlags": 16
  1246. },
  1247. {
  1248. "tags": {
  1249. "builtin": "global"
  1250. },
  1251. "name": "cc_diffuseMap",
  1252. "typename": "samplerCube",
  1253. "type": 31,
  1254. "count": 1,
  1255. "defines": [
  1256. "CC_USE_IBL",
  1257. "CC_USE_DIFFUSEMAP"
  1258. ],
  1259. "stageFlags": 16
  1260. },
  1261. {
  1262. "tags": {
  1263. "builtin": "global"
  1264. },
  1265. "name": "cc_shadowMap",
  1266. "typename": "sampler2D",
  1267. "type": 28,
  1268. "count": 1,
  1269. "precision": "highp ",
  1270. "defines": [
  1271. "CC_RECEIVE_SHADOW"
  1272. ],
  1273. "stageFlags": 16
  1274. },
  1275. {
  1276. "tags": {
  1277. "builtin": "global"
  1278. },
  1279. "name": "cc_spotShadowMap",
  1280. "typename": "sampler2D",
  1281. "type": 28,
  1282. "count": 1,
  1283. "precision": "highp ",
  1284. "defines": [
  1285. "CC_RECEIVE_SHADOW"
  1286. ],
  1287. "stageFlags": 16
  1288. }
  1289. ],
  1290. "samplers": [],
  1291. "textures": [],
  1292. "buffers": [],
  1293. "images": [],
  1294. "subpassInputs": []
  1295. }
  1296. ],
  1297. "hash": 1451763171,
  1298. "glsl4": {
  1299. "vert": "#extension GL_EXT_shader_explicit_arithmetic_types_int32: require\nprecision highp float;\n#define CC_SURFACES_USE_TANGENT_SPACE 0\n#define CC_SURFACES_USE_VERTEX_COLOR 0\n#define CC_SURFACES_USE_SECOND_UV 0\n#define CC_SURFACES_USE_LIGHT_MAP 0\n#define CC_SURFACES_TRANSFER_LOCAL_POS 0\n#define CC_USE_SURFACE_SHADER 1\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 2) in vec2 a_texCoord;\n#if CC_SURFACES_USE_TANGENT_SPACE\n layout(location = 3) in vec4 a_tangent;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n layout(location = 6) in vec4 a_color;\n#endif\n#if CC_SURFACES_USE_SECOND_UV || CC_USE_LIGHTMAP\n layout(location = 7) in vec2 a_texCoord1;\n#endif\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 CC_USE_MORPH\n#endif\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\nlayout(location = 0) out highp vec3 v_worldPos;\nlayout(location = 1) out vec4 v_normal;\nlayout(location = 2) out vec2 v_uv;\n#if CC_SURFACES_USE_VERTEX_COLOR\n layout(location = 3) out lowp vec4 v_color;\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n layout(location = 4) out mediump vec4 v_tangent;\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n layout(location = 5) out mediump vec2 v_uv1;\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n layout(location = 6) out mediump vec3 v_luv;\n#endif\n#if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE\n layout(location = 7) out mediump vec4 v_shadowBiasAndProbeId;\n#endif\n#if CC_USE_REFLECTION_PROBE && 0\n layout(location = 8) out mediump vec4 v_reflectionProbeData;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n layout(location = 9) out mediump float v_fogFactor;\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n layout(location = 10) out highp vec4 v_localPos;\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n layout(location = 11) out highp vec4 v_clipPos;\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n#define VSOutput_worldPos v_worldPos\n#define VSOutput_worldNormal v_normal.xyz\n#define VSOutput_faceSideSign v_normal.w\n#define VSOutput_texcoord v_uv\n#if CC_SURFACES_USE_VERTEX_COLOR\n #define VSOutput_vertexColor v_color\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n #define VSOutput_worldTangent v_tangent.xyz\n #define VSOutput_mirrorNormal v_tangent.w\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n #define VSOutput_texcoord1 v_uv1\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n #define VSOutput_lightMapUV v_luv\n#endif\n#if CC_RECEIVE_SHADOW\n #define VSOutput_shadowBias v_shadowBiasAndProbeId.xy\n#endif\n#if CC_USE_REFLECTION_PROBE\n #define VSOutput_reflectionProbeId v_shadowBiasAndProbeId.z\n #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX\n #define VSOutput_reflectionProbeBlendId v_shadowBiasAndProbeId.w\n #endif\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n #define VSOutput_fogFactor v_fogFactor\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n #define VSOutput_localPos v_localPos\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n #define VSOutput_clipPos v_clipPos\n#endif\nstruct SurfacesStandardVertexIntermediate\n{\n highp vec4 position;\n vec3 normal;\n#if CC_SURFACES_USE_TANGENT_SPACE\n vec4 tangent;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n vec4 color;\n#endif\n vec2 texCoord;\n#if CC_SURFACES_USE_SECOND_UV\n vec2 texCoord1;\n#endif\n highp vec4 clipPos;\n highp vec3 worldPos;\n vec4 worldNormal;\n #if CC_SURFACES_USE_TANGENT_SPACE\n vec3 worldTangent, worldBinormal;\n #endif\n#if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE\n vec4 shadowBiasAndProbeId;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n float fogFactor;\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n vec3 lightmapUV;\n#endif\n};\n#if CC_USE_MORPH\n#endif\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(set = 0, binding = 2) uniform CCShadow {\n highp mat4 cc_matLightView;\n highp mat4 cc_matLightViewProj;\n highp vec4 cc_shadowInvProjDepthInfo;\n highp vec4 cc_shadowProjDepthInfo;\n highp vec4 cc_shadowProjInfo;\n mediump vec4 cc_shadowNFLSInfo;\n mediump vec4 cc_shadowWHPBInfo;\n mediump vec4 cc_shadowLPNNInfo;\n lowp vec4 cc_shadowColor;\n mediump vec4 cc_planarNDInfo;\n};\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#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 #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n #else\n #endif\n #if CC_MORPH_TARGET_HAS_POSITION\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n #endif\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 #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 #else\n #endif\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n #else\n #endif\n #else\n #endif\n #endif\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n #if CC_USE_FOG != 4\n #endif\n#endif\nlayout(set = 1, binding = 0) uniform Constants {\n vec4 params;\n};\n#define CC_SURFACES_VERTEX_MODIFY_WORLD_POS\nvec3 SurfacesVertexModifyWorldPos(in SurfacesStandardVertexIntermediate In)\n{\n return cc_cameraPos.xyz + In.worldPos * params.w;\n}\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_POS\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_NORMAL\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_TANGENT\n #if CC_SURFACES_USE_TANGENT_SPACE\n #endif\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_SHARED_DATA\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_WORLD_POS\nvec3 SurfacesVertexModifyWorldPos(in SurfacesStandardVertexIntermediate In)\n{\n return In.worldPos;\n}\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_CLIP_POS\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_UV\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_WORLD_NORMAL\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_SHADOW_BIAS\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_SHARED_DATA\n#endif\nvoid CCSurfacesVertexInput(out SurfacesStandardVertexIntermediate In)\n{\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n#if CC_SURFACES_USE_TANGENT_SPACE\n In.tangent = a_tangent;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n In.color = a_color;\n#endif\n In.texCoord = a_texCoord;\n#if CC_SURFACES_USE_SECOND_UV\n In.texCoord1 = a_texCoord1;\n#endif\n}\nvoid CCSurfacesVertexOutput(in SurfacesStandardVertexIntermediate In)\n{\n gl_Position = In.clipPos;\n VSOutput_worldNormal = In.worldNormal.xyz;\n VSOutput_faceSideSign = In.worldNormal.w;\n VSOutput_worldPos = In.worldPos;\n#if CC_SURFACES_USE_TANGENT_SPACE\n VSOutput_worldTangent = In.worldTangent.xyz;\n VSOutput_mirrorNormal = In.tangent.w > 0.0 ? 1.0 : -1.0;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n VSOutput_vertexColor = In.color;\n#endif\n VSOutput_texcoord = In.texCoord;\n#if CC_SURFACES_USE_SECOND_UV\n VSOutput_texcoord1 = In.texCoord1;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n VSOutput_fogFactor = In.fogFactor;\n#endif\n#if CC_RECEIVE_SHADOW\n VSOutput_shadowBias = In.shadowBiasAndProbeId.xy;\n#endif\n#if CC_USE_REFLECTION_PROBE\n VSOutput_reflectionProbeId = In.shadowBiasAndProbeId.z;\n #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX\n VSOutput_reflectionProbeBlendId = In.shadowBiasAndProbeId.w;\n #endif\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n VSOutput_lightMapUV = In.lightmapUV;\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n VSOutput_localPos = In.position;\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n VSOutput_clipPos = In.clipPos;\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n}\nvec4 CalcSkyClipPos(vec3 viewDir)\n{\n vec4 clipPos;\n mat4 matViewRotOnly = mat4(mat3(cc_matView));\n vec4 pos = matViewRotOnly * vec4(viewDir, 1.0);\n if (cc_matProj[3].w > 0.0) {\n mat4 matProj = cc_matProj;\n matProj[0].x = 5.2;\n matProj[1].y = 2.6;\n matProj[2].zw = vec2(-1.0);\n matProj[3].zw = vec2(0.0);\n clipPos = matProj * pos;\n }\n else {\n clipPos = cc_matProj * pos;\n }\n clipPos.z = 0.99999 * clipPos.w;\n return clipPos;\n}\nvoid main()\n{\n SurfacesStandardVertexIntermediate In;\n CCSurfacesVertexInput(In);\n In.worldPos = In.position.xyz;\n In.worldPos = SurfacesVertexModifyWorldPos(In);\n In.clipPos = CalcSkyClipPos(In.position.xyz);\n In.worldNormal.w = 1.0;\n In.worldNormal.xyz = normalize(In.position.xyz);\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n In.fogFactor = 0.0;\n#endif\n CCSurfacesVertexOutput(In);\n}",
  1300. "frag": "\nprecision highp float;\n#define CC_SURFACES_USE_TANGENT_SPACE 0\n#define CC_SURFACES_USE_VERTEX_COLOR 0\n#define CC_SURFACES_USE_SECOND_UV 0\n#define CC_SURFACES_USE_LIGHT_MAP 0\n#define CC_SURFACES_TRANSFER_LOCAL_POS 0\n#define CC_USE_SURFACE_SHADER 1\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\nlayout(location = 0) in highp vec3 v_worldPos;\nlayout(location = 1) in vec4 v_normal;\nlayout(location = 2) in vec2 v_uv;\n#if CC_SURFACES_USE_VERTEX_COLOR\n layout(location = 3) in lowp vec4 v_color;\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n layout(location = 4) in mediump vec4 v_tangent;\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n layout(location = 5) in mediump vec2 v_uv1;\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n layout(location = 6) in mediump vec3 v_luv;\n#endif\n#if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE\n layout(location = 7) in mediump vec4 v_shadowBiasAndProbeId;\n#endif\n#if CC_USE_REFLECTION_PROBE && 0\n layout(location = 8) in mediump vec4 v_reflectionProbeData;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n layout(location = 9) in mediump float v_fogFactor;\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n layout(location = 10) in highp vec4 v_localPos;\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n layout(location = 11) in highp vec4 v_clipPos;\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n#define FSInput_worldPos v_worldPos\n#define FSInput_worldNormal v_normal.xyz\n#define FSInput_faceSideSign v_normal.w\n#define FSInput_texcoord v_uv\n#if CC_SURFACES_USE_VERTEX_COLOR\n #define FSInput_vertexColor v_color\n#else\n #define FSInput_vertexColor vec4(1.0)\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n #define FSInput_worldTangent v_tangent.xyz\n #define FSInput_mirrorNormal v_tangent.w\n#else\n #define FSInput_worldTangent vec3(1.0, 1.0, 1.0)\n #define FSInput_mirrorNormal 1.0\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n #define FSInput_texcoord1 v_uv1\n#else\n #define FSInput_texcoord1 vec2(0.0, 0.0)\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n #define FSInput_lightMapUV v_luv\n#endif\n#if CC_RECEIVE_SHADOW\n #define FSInput_shadowBias v_shadowBiasAndProbeId.xy\n#endif\n#if CC_USE_REFLECTION_PROBE\n #define FSInput_reflectionProbeId v_shadowBiasAndProbeId.z\n #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX\n #define FSInput_reflectionProbeBlendId v_shadowBiasAndProbeId.w\n #endif\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n #define FSInput_fogFactor v_fogFactor\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n #define FSInput_localPos v_localPos\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n #define FSInput_clipPos v_clipPos\n#endif\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#define CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_WORLD_POS CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR CC_SURFACES_DEBUG_VIEW_WORLD_POS + 1\n#define CC_SURFACES_DEBUG_VIEW_FACE_SIDE CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR + 1\n#define CC_SURFACES_DEBUG_VIEW_UV0 CC_SURFACES_DEBUG_VIEW_FACE_SIDE + 1\n#define CC_SURFACES_DEBUG_VIEW_UV1 CC_SURFACES_DEBUG_VIEW_UV0 + 1\n#define CC_SURFACES_DEBUG_VIEW_UVLIGHTMAP CC_SURFACES_DEBUG_VIEW_UV1 + 1\n#define CC_SURFACES_DEBUG_VIEW_PROJ_DEPTH CC_SURFACES_DEBUG_VIEW_UVLIGHTMAP + 1\n#define CC_SURFACES_DEBUG_VIEW_LINEAR_DEPTH CC_SURFACES_DEBUG_VIEW_PROJ_DEPTH + 1\n#define CC_SURFACES_DEBUG_VIEW_FRAGMENT_NORMAL CC_SURFACES_DEBUG_VIEW_LINEAR_DEPTH + 1\n#define CC_SURFACES_DEBUG_VIEW_FRAGMENT_TANGENT CC_SURFACES_DEBUG_VIEW_FRAGMENT_NORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_FRAGMENT_BINORMAL CC_SURFACES_DEBUG_VIEW_FRAGMENT_TANGENT + 1\n#define CC_SURFACES_DEBUG_VIEW_BASE_COLOR CC_SURFACES_DEBUG_VIEW_FRAGMENT_BINORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_DIFFUSE_COLOR CC_SURFACES_DEBUG_VIEW_BASE_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_SPECULAR_COLOR CC_SURFACES_DEBUG_VIEW_DIFFUSE_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSPARENCY CC_SURFACES_DEBUG_VIEW_SPECULAR_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_METALLIC CC_SURFACES_DEBUG_VIEW_TRANSPARENCY + 1\n#define CC_SURFACES_DEBUG_VIEW_ROUGHNESS CC_SURFACES_DEBUG_VIEW_METALLIC + 1\n#define CC_SURFACES_DEBUG_VIEW_SPECULAR_INTENSITY CC_SURFACES_DEBUG_VIEW_ROUGHNESS + 1\n#define CC_SURFACES_DEBUG_VIEW_IOR CC_SURFACES_DEBUG_VIEW_SPECULAR_INTENSITY + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_DIFFUSE CC_SURFACES_DEBUG_VIEW_IOR + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_SPECULAR CC_SURFACES_DEBUG_VIEW_DIRECT_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_ALL CC_SURFACES_DEBUG_VIEW_DIRECT_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_ENV_DIFFUSE CC_SURFACES_DEBUG_VIEW_DIRECT_ALL + 1\n#define CC_SURFACES_DEBUG_VIEW_ENV_SPECULAR CC_SURFACES_DEBUG_VIEW_ENV_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_ENV_ALL CC_SURFACES_DEBUG_VIEW_ENV_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_EMISSIVE CC_SURFACES_DEBUG_VIEW_ENV_ALL + 1\n#define CC_SURFACES_DEBUG_VIEW_LIGHT_MAP CC_SURFACES_DEBUG_VIEW_EMISSIVE + 1\n#define CC_SURFACES_DEBUG_VIEW_SHADOW CC_SURFACES_DEBUG_VIEW_LIGHT_MAP + 1\n#define CC_SURFACES_DEBUG_VIEW_AO CC_SURFACES_DEBUG_VIEW_SHADOW + 1\n#define CC_SURFACES_DEBUG_VIEW_FRESNEL CC_SURFACES_DEBUG_VIEW_AO + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_DIFFUSE CC_SURFACES_DEBUG_VIEW_FRESNEL + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_SPECULAR CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_DIFFUSE CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_SPECULAR CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_ALL CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_2ND_SPECULAR CC_SURFACES_DEBUG_VIEW_TRANSMIT_ALL + 1\n#define CC_SURFACES_DEBUG_VIEW_ENVIRONMENT_2ND_SPECULAR CC_SURFACES_DEBUG_VIEW_DIRECT_2ND_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_2ND_SPECULAR_ALL CC_SURFACES_DEBUG_VIEW_ENVIRONMENT_2ND_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_FOG CC_SURFACES_DEBUG_VIEW_2ND_SPECULAR_ALL + 1\n#define IS_DEBUG_VIEW_ENABLE_WITH_CAMERA (cc_surfaceTransform.y != 3.0)\n#define IS_DEBUG_VIEW_LIGHTING_ENABLE_WITH_ALBEDO (UnpackBitFromFloat(cc_debug_view_mode.w, 6) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_MISC_ENABLE_CSM_LAYER_COLORATION (UnpackBitFromFloat(cc_debug_view_mode.w, 7) && IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_DIFFUSE (UnpackBitFromFloat(cc_debug_view_mode.y, 0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.y, 1) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_DIFFUSE (UnpackBitFromFloat(cc_debug_view_mode.y, 2) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.y, 3) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_EMISSIVE (UnpackBitFromFloat(cc_debug_view_mode.y, 4) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_LIGHT_MAP (UnpackBitFromFloat(cc_debug_view_mode.y, 5) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_SHADOW (UnpackBitFromFloat(cc_debug_view_mode.y, 6) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_AO (UnpackBitFromFloat(cc_debug_view_mode.y, 7) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_NORMAL_MAP (UnpackBitFromFloat(cc_debug_view_mode.z, 0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_FOG (UnpackBitFromFloat(cc_debug_view_mode.z, 1) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING (UnpackBitFromFloat(cc_debug_view_mode.z, 2) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION (UnpackBitFromFloat(cc_debug_view_mode.z, 3) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_FRESNEL (UnpackBitFromFloat(cc_debug_view_mode.z, 4) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TRANSMIT_DIFFUSE (UnpackBitFromFloat(cc_debug_view_mode.z, 5) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TRANSMIT_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.z, 6) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_2ND_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.z, 7) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TT (UnpackBitFromFloat(cc_debug_view_mode.w, 0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#if (CC_PIPELINE_TYPE == 0 || CC_FORCE_FORWARD_SHADING)\n #if CC_FORWARD_ADD\n #if CC_PIPELINE_TYPE == 0\n #define LIGHTS_PER_PASS 1\n #else\n #define LIGHTS_PER_PASS 10\n #endif\n #if CC_ENABLE_CLUSTERED_LIGHT_CULLING == 0\n layout(set = 2, binding = 1) uniform CCForwardLight {\n highp vec4 cc_lightPos[LIGHTS_PER_PASS];\n vec4 cc_lightColor[LIGHTS_PER_PASS];\n vec4 cc_lightSizeRangeAngle[LIGHTS_PER_PASS];\n vec4 cc_lightDir[LIGHTS_PER_PASS];\n vec4 cc_lightBoundingSizeVS[LIGHTS_PER_PASS];\n };\n #endif\n #endif\n#endif\n#if CC_USE_LIGHT_PROBE\n layout(set = 2, binding = 6) uniform CCSH {\n vec4 cc_sh_linear_const_r;\n vec4 cc_sh_linear_const_g;\n vec4 cc_sh_linear_const_b;\n vec4 cc_sh_quadratic_r;\n vec4 cc_sh_quadratic_g;\n vec4 cc_sh_quadratic_b;\n vec4 cc_sh_quadratic_a;\n };\n#endif\nlayout(set = 0, binding = 2) uniform CCShadow {\n highp mat4 cc_matLightView;\n highp mat4 cc_matLightViewProj;\n highp vec4 cc_shadowInvProjDepthInfo;\n highp vec4 cc_shadowProjDepthInfo;\n highp vec4 cc_shadowProjInfo;\n mediump vec4 cc_shadowNFLSInfo;\n mediump vec4 cc_shadowWHPBInfo;\n mediump vec4 cc_shadowLPNNInfo;\n lowp vec4 cc_shadowColor;\n mediump vec4 cc_planarNDInfo;\n};\n#if CC_SUPPORT_CASCADED_SHADOW_MAP\n layout(set = 0, binding = 3) uniform CCCSM {\n highp vec4 cc_csmViewDir0[4];\n highp vec4 cc_csmViewDir1[4];\n highp vec4 cc_csmViewDir2[4];\n highp vec4 cc_csmAtlas[4];\n highp mat4 cc_matCSMViewProj[4];\n highp vec4 cc_csmProjDepthInfo[4];\n highp vec4 cc_csmProjInfo[4];\n highp vec4 cc_csmSplitsInfo;\n };\n#endif\nlayout(set = 0, binding = 5) uniform samplerCube cc_environment;\n#if CC_USE_IBL\n #if CC_USE_DIFFUSEMAP\n layout(set = 0, binding = 7) uniform samplerCube cc_diffuseMap;\n #endif\n#endif\n#if CC_USE_REFLECTION_PROBE\n layout(set = 2, binding = 15) uniform samplerCube cc_reflectionProbeCubemap;\n layout(set = 2, binding = 16) uniform sampler2D cc_reflectionProbePlanarMap;\n layout(set = 2, binding = 17) uniform sampler2D cc_reflectionProbeDataMap;\n layout(set = 2, binding = 18) uniform samplerCube cc_reflectionProbeBlendCubemap;\n#endif\nvec4 fragTextureLod (sampler2D tex, vec2 coord, float lod) {\n return textureLod(tex, coord, lod);\n}\nvec4 fragTextureLod (samplerCube tex, vec3 coord, float lod) {\n return textureLod(tex, coord, lod);\n}\n#define UnpackBitFromFloat(value, bit) (mod(floor(value / pow(10.0, float(bit))), 10.0) > 0.0)\nvec4 packRGBE (vec3 rgb) {\n highp float maxComp = max(max(rgb.r, rgb.g), rgb.b);\n highp float e = 128.0;\n if (maxComp > 0.0001) {\n e = log(maxComp) / log(1.1);\n e = ceil(e);\n e = clamp(e + 128.0, 0.0, 255.0);\n }\n highp float sc = 1.0 / pow(1.1, e - 128.0);\n vec3 encode = clamp(rgb * sc, vec3(0.0), vec3(1.0)) * 255.0;\n vec3 encode_rounded = floor(encode) + step(encode - floor(encode), vec3(0.5));\n return vec4(encode_rounded, e) / 255.0;\n}\nvec3 unpackRGBE (vec4 rgbe) {\n return rgbe.rgb * pow(1.1, rgbe.a * 255.0 - 128.0);\n}\nvec3 ACESToneMap (vec3 color) {\n color = min(color, vec3(8.0));\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nvec3 HDRToLDR(vec3 color)\n{\n #if CC_USE_HDR\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING)\n #endif\n {\n #if CC_TONE_MAPPING_TYPE == HDR_TONE_MAPPING_ACES\n color.rgb = ACESToneMap(color.rgb);\n #endif\n }\n #endif\n return color;\n}\nvec3 SRGBToLinear (vec3 gamma) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return gamma;\n }\n #endif\n#endif\n return gamma * gamma;\n}\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\n#if defined(CC_USE_METAL) || defined(CC_USE_WGPU)\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y) y = -y\n#else\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y)\n#endif\nvec3 RotationVecFromAxisY(vec3 v, float cosTheta, float sinTheta)\n{\n vec3 result;\n result.x = dot(v, vec3(cosTheta, 0.0, -sinTheta));\n result.y = v.y;\n result.z = dot(v, vec3(sinTheta, 0.0, cosTheta));\n return result;\n}\nvec3 RotationVecFromAxisY(vec3 v, float rotateAngleArc)\n{\n return RotationVecFromAxisY(v, cos(rotateAngleArc), sin(rotateAngleArc));\n}\n#if CC_SUPPORT_CASCADED_SHADOW_MAP\n#endif\n#if CC_RECEIVE_SHADOW\n layout(set = 0, binding = 4) uniform highp sampler2D cc_shadowMap;\n layout(set = 0, binding = 6) uniform highp sampler2D cc_spotShadowMap;\n #if CC_SUPPORT_CASCADED_SHADOW_MAP\n #else\n #endif\n#endif\n#if CC_USE_FOG != 4\n float LinearFog(vec4 pos, vec3 cameraPos, float fogStart, float fogEnd) {\n vec4 wPos = pos;\n float cam_dis = distance(cameraPos, wPos.xyz);\n return clamp((fogEnd - cam_dis) / (fogEnd - fogStart), 0., 1.);\n }\n float ExpFog(vec4 pos, vec3 cameraPos, float fogStart, float fogDensity, float fogAtten) {\n vec4 wPos = pos;\n float cam_dis = max(distance(cameraPos, wPos.xyz) - fogStart, 0.0) / fogAtten * 4.;\n float f = exp(-cam_dis * fogDensity);\n return f;\n }\n float ExpSquaredFog(vec4 pos, vec3 cameraPos, float fogStart, float fogDensity, float fogAtten) {\n vec4 wPos = pos;\n float cam_dis = max(distance(cameraPos, wPos.xyz) - fogStart, 0.0) / fogAtten * 4.;\n float f = exp(-cam_dis * cam_dis * fogDensity * fogDensity);\n return f;\n }\n float LayeredFog(vec4 pos, vec3 cameraPos, float fogTop, float fogRange, float fogAtten) {\n vec4 wPos = pos;\n vec3 camWorldProj = cameraPos.xyz;\n camWorldProj.y = 0.;\n vec3 worldPosProj = wPos.xyz;\n worldPosProj.y = 0.;\n float fDeltaD = distance(worldPosProj, camWorldProj) / fogAtten * 2.0;\n float fDeltaY, fDensityIntegral;\n if (cameraPos.y > fogTop) {\n if (wPos.y < fogTop) {\n fDeltaY = (fogTop - wPos.y) / fogRange * 2.0;\n fDensityIntegral = fDeltaY * fDeltaY * 0.5;\n }\n else {\n fDeltaY = 0.;\n fDensityIntegral = 0.;\n }\n }\n else {\n if (wPos.y < fogTop) {\n float fDeltaA = (fogTop - cameraPos.y) / fogRange * 2.;\n float fDeltaB = (fogTop - wPos.y) / fogRange * 2.;\n fDeltaY = abs(fDeltaA - fDeltaB);\n fDensityIntegral = abs((fDeltaA * fDeltaA * 0.5) - (fDeltaB * fDeltaB * 0.5));\n }\n else {\n fDeltaY = abs(fogTop - cameraPos.y) / fogRange * 2.;\n fDensityIntegral = abs(fDeltaY * fDeltaY * 0.5);\n }\n }\n float fDensity;\n if (fDeltaY != 0.) {\n fDensity = (sqrt(1.0 + ((fDeltaD / fDeltaY) * (fDeltaD / fDeltaY)))) * fDensityIntegral;\n }\n else {\n fDensity = 0.;\n }\n float f = exp(-fDensity);\n return f;\n }\n#endif\nvoid CC_TRANSFER_FOG_BASE(vec4 pos, out float factor)\n{\n#if CC_USE_FOG == 0\n\tfactor = LinearFog(pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.y);\n#elif CC_USE_FOG == 1\n\tfactor = ExpFog(pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z);\n#elif CC_USE_FOG == 2\n\tfactor = ExpSquaredFog(pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z);\n#elif CC_USE_FOG == 3\n\tfactor = LayeredFog(pos, cc_cameraPos.xyz, cc_fogAdd.x, cc_fogAdd.y, cc_fogAdd.z);\n#else\n\tfactor = 1.0;\n#endif\n}\nvoid CC_APPLY_FOG_BASE(inout vec4 color, float factor) {\n\tcolor = vec4(mix(cc_fogColor.rgb, color.rgb, factor), color.a);\n}\n#if CC_USE_LIGHT_PROBE\n #if CC_USE_LIGHT_PROBE\n #endif\n#endif\n#if CC_USE_REFLECTION_PROBE\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\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n layout(set = 2, binding = 11) uniform sampler2D cc_lightingMap;\n#endif\nlayout(set = 1, binding = 0) uniform Constants {\n vec4 params;\n};\nlayout(set = 1, binding = 1) uniform samplerCube environmentMap;\n#if BLEND_ENV_MAP\n layout(set = 1, binding = 2) uniform samplerCube blendEnvironmentMap;\n#endif\n#define CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\nvec3 sampleEnvMap(samplerCube tex, vec3 R)\n{\n vec3 c = vec3(1.0);\n #if USE_RGBE_CUBEMAP\n c *= unpackRGBE(fragTextureLod(tex, R, 0.0));\n #else\n c *= SRGBToLinear(fragTextureLod(tex, R, 0.0).rgb);\n #endif\n return c;\n}\nvec4 SurfacesFragmentModifyBaseColorAndTransparency()\n{\n vec3 c = vec3(1.0);\n vec3 normal = normalize(FSInput_worldNormal);\n vec3 rotationDir = RotationVecFromAxisY(normal.xyz, cc_surfaceTransform.z, cc_surfaceTransform.w);\n c = sampleEnvMap(environmentMap, rotationDir);\n #if BLEND_ENV_MAP\n c = mix(c, sampleEnvMap(blendEnvironmentMap, rotationDir), params.x);\n #endif\n return vec4(c * cc_ambientSky.w * params.y, 1.0);\n}\n#ifndef CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\nvec4 SurfacesFragmentModifyBaseColorAndTransparency()\n{\n\treturn vec4(cc_ambientSky.xyz * cc_ambientSky.w, 1.0);\n}\n#endif\nlayout(location = 0) out vec4 fragColorX;\nvoid main() {\n vec4 color = SurfacesFragmentModifyBaseColorAndTransparency();\n color.a = 1.0;\n #if CC_USE_FOG != 4\n float fogFactor = 1.0;\n CC_TRANSFER_FOG_BASE(vec4(FSInput_worldPos, 1.0), fogFactor);\n CC_APPLY_FOG_BASE(color, fogFactor);\n #endif\n #if CC_USE_RGBE_OUTPUT\n color = packRGBE(color.rgb);\n #else\n color.rgb = HDRToLDR(color.rgb);\n color.rgb = LinearToSRGB(color.rgb);\n #endif\n fragColorX = color;\n}"
  1301. },
  1302. "glsl3": {
  1303. "vert": "\nprecision highp float;\n#define CC_SURFACES_USE_TANGENT_SPACE 0\n#define CC_SURFACES_USE_VERTEX_COLOR 0\n#define CC_SURFACES_USE_SECOND_UV 0\n#define CC_SURFACES_USE_LIGHT_MAP 0\n#define CC_SURFACES_TRANSFER_LOCAL_POS 0\n#define CC_USE_SURFACE_SHADER 1\nin vec3 a_position;\nin vec3 a_normal;\nin vec2 a_texCoord;\n#if CC_SURFACES_USE_TANGENT_SPACE\n in vec4 a_tangent;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n in vec4 a_color;\n#endif\n#if CC_SURFACES_USE_SECOND_UV || CC_USE_LIGHTMAP\n in vec2 a_texCoord1;\n#endif\n#if CC_USE_SKINNING\n in vec4 a_joints;\n in vec4 a_weights;\n#endif\n#if CC_USE_MORPH\n in float a_vertexId;\n#endif\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\nout highp vec3 v_worldPos;\nout vec4 v_normal;\nout vec2 v_uv;\n#if CC_SURFACES_USE_VERTEX_COLOR\n out lowp vec4 v_color;\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n out mediump vec4 v_tangent;\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n out mediump vec2 v_uv1;\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n out mediump vec3 v_luv;\n#endif\n#if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE\n out mediump vec4 v_shadowBiasAndProbeId;\n#endif\n#if CC_USE_REFLECTION_PROBE && 0\n out mediump vec4 v_reflectionProbeData;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n out mediump float v_fogFactor;\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n out highp vec4 v_localPos;\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n out highp vec4 v_clipPos;\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n#define VSOutput_worldPos v_worldPos\n#define VSOutput_worldNormal v_normal.xyz\n#define VSOutput_faceSideSign v_normal.w\n#define VSOutput_texcoord v_uv\n#if CC_SURFACES_USE_VERTEX_COLOR\n #define VSOutput_vertexColor v_color\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n #define VSOutput_worldTangent v_tangent.xyz\n #define VSOutput_mirrorNormal v_tangent.w\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n #define VSOutput_texcoord1 v_uv1\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n #define VSOutput_lightMapUV v_luv\n#endif\n#if CC_RECEIVE_SHADOW\n #define VSOutput_shadowBias v_shadowBiasAndProbeId.xy\n#endif\n#if CC_USE_REFLECTION_PROBE\n #define VSOutput_reflectionProbeId v_shadowBiasAndProbeId.z\n #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX\n #define VSOutput_reflectionProbeBlendId v_shadowBiasAndProbeId.w\n #endif\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n #define VSOutput_fogFactor v_fogFactor\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n #define VSOutput_localPos v_localPos\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n #define VSOutput_clipPos v_clipPos\n#endif\nstruct SurfacesStandardVertexIntermediate\n{\n highp vec4 position;\n vec3 normal;\n#if CC_SURFACES_USE_TANGENT_SPACE\n vec4 tangent;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n vec4 color;\n#endif\n vec2 texCoord;\n#if CC_SURFACES_USE_SECOND_UV\n vec2 texCoord1;\n#endif\n highp vec4 clipPos;\n highp vec3 worldPos;\n vec4 worldNormal;\n #if CC_SURFACES_USE_TANGENT_SPACE\n vec3 worldTangent, worldBinormal;\n #endif\n#if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE\n vec4 shadowBiasAndProbeId;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n float fogFactor;\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n vec3 lightmapUV;\n#endif\n};\n#if CC_USE_MORPH\n#endif\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};\nlayout(std140) uniform CCShadow {\n highp mat4 cc_matLightView;\n highp mat4 cc_matLightViewProj;\n highp vec4 cc_shadowInvProjDepthInfo;\n highp vec4 cc_shadowProjDepthInfo;\n highp vec4 cc_shadowProjInfo;\n mediump vec4 cc_shadowNFLSInfo;\n mediump vec4 cc_shadowWHPBInfo;\n mediump vec4 cc_shadowLPNNInfo;\n lowp vec4 cc_shadowColor;\n mediump vec4 cc_planarNDInfo;\n};\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#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 #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n #else\n #endif\n #if CC_MORPH_TARGET_HAS_POSITION\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n #endif\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 #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 #else\n #endif\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n #else\n #endif\n #else\n #endif\n #endif\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n #if CC_USE_FOG != 4\n #endif\n#endif\nlayout(std140) uniform Constants {\n vec4 params;\n};\n#define CC_SURFACES_VERTEX_MODIFY_WORLD_POS\nvec3 SurfacesVertexModifyWorldPos(in SurfacesStandardVertexIntermediate In)\n{\n return cc_cameraPos.xyz + In.worldPos * params.w;\n}\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_POS\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_NORMAL\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_TANGENT\n #if CC_SURFACES_USE_TANGENT_SPACE\n #endif\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_SHARED_DATA\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_WORLD_POS\nvec3 SurfacesVertexModifyWorldPos(in SurfacesStandardVertexIntermediate In)\n{\n return In.worldPos;\n}\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_CLIP_POS\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_UV\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_WORLD_NORMAL\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_SHADOW_BIAS\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_SHARED_DATA\n#endif\nvoid CCSurfacesVertexInput(out SurfacesStandardVertexIntermediate In)\n{\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n#if CC_SURFACES_USE_TANGENT_SPACE\n In.tangent = a_tangent;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n In.color = a_color;\n#endif\n In.texCoord = a_texCoord;\n#if CC_SURFACES_USE_SECOND_UV\n In.texCoord1 = a_texCoord1;\n#endif\n}\nvoid CCSurfacesVertexOutput(in SurfacesStandardVertexIntermediate In)\n{\n gl_Position = In.clipPos;\n VSOutput_worldNormal = In.worldNormal.xyz;\n VSOutput_faceSideSign = In.worldNormal.w;\n VSOutput_worldPos = In.worldPos;\n#if CC_SURFACES_USE_TANGENT_SPACE\n VSOutput_worldTangent = In.worldTangent.xyz;\n VSOutput_mirrorNormal = In.tangent.w > 0.0 ? 1.0 : -1.0;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n VSOutput_vertexColor = In.color;\n#endif\n VSOutput_texcoord = In.texCoord;\n#if CC_SURFACES_USE_SECOND_UV\n VSOutput_texcoord1 = In.texCoord1;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n VSOutput_fogFactor = In.fogFactor;\n#endif\n#if CC_RECEIVE_SHADOW\n VSOutput_shadowBias = In.shadowBiasAndProbeId.xy;\n#endif\n#if CC_USE_REFLECTION_PROBE\n VSOutput_reflectionProbeId = In.shadowBiasAndProbeId.z;\n #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX\n VSOutput_reflectionProbeBlendId = In.shadowBiasAndProbeId.w;\n #endif\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n VSOutput_lightMapUV = In.lightmapUV;\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n VSOutput_localPos = In.position;\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n VSOutput_clipPos = In.clipPos;\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n}\nvec4 CalcSkyClipPos(vec3 viewDir)\n{\n vec4 clipPos;\n mat4 matViewRotOnly = mat4(mat3(cc_matView));\n vec4 pos = matViewRotOnly * vec4(viewDir, 1.0);\n if (cc_matProj[3].w > 0.0) {\n mat4 matProj = cc_matProj;\n matProj[0].x = 5.2;\n matProj[1].y = 2.6;\n matProj[2].zw = vec2(-1.0);\n matProj[3].zw = vec2(0.0);\n clipPos = matProj * pos;\n }\n else {\n clipPos = cc_matProj * pos;\n }\n clipPos.z = 0.99999 * clipPos.w;\n return clipPos;\n}\nvoid main()\n{\n SurfacesStandardVertexIntermediate In;\n CCSurfacesVertexInput(In);\n In.worldPos = In.position.xyz;\n In.worldPos = SurfacesVertexModifyWorldPos(In);\n In.clipPos = CalcSkyClipPos(In.position.xyz);\n In.worldNormal.w = 1.0;\n In.worldNormal.xyz = normalize(In.position.xyz);\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n In.fogFactor = 0.0;\n#endif\n CCSurfacesVertexOutput(In);\n}",
  1304. "frag": "\nprecision highp float;\n#define CC_SURFACES_USE_TANGENT_SPACE 0\n#define CC_SURFACES_USE_VERTEX_COLOR 0\n#define CC_SURFACES_USE_SECOND_UV 0\n#define CC_SURFACES_USE_LIGHT_MAP 0\n#define CC_SURFACES_TRANSFER_LOCAL_POS 0\n#define CC_USE_SURFACE_SHADER 1\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\nin highp vec3 v_worldPos;\nin vec4 v_normal;\nin vec2 v_uv;\n#if CC_SURFACES_USE_VERTEX_COLOR\n in lowp vec4 v_color;\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n in mediump vec4 v_tangent;\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n in mediump vec2 v_uv1;\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n in mediump vec3 v_luv;\n#endif\n#if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE\n in mediump vec4 v_shadowBiasAndProbeId;\n#endif\n#if CC_USE_REFLECTION_PROBE && 0\n in mediump vec4 v_reflectionProbeData;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n in mediump float v_fogFactor;\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n in highp vec4 v_localPos;\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n in highp vec4 v_clipPos;\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n#define FSInput_worldPos v_worldPos\n#define FSInput_worldNormal v_normal.xyz\n#define FSInput_faceSideSign v_normal.w\n#define FSInput_texcoord v_uv\n#if CC_SURFACES_USE_VERTEX_COLOR\n #define FSInput_vertexColor v_color\n#else\n #define FSInput_vertexColor vec4(1.0)\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n #define FSInput_worldTangent v_tangent.xyz\n #define FSInput_mirrorNormal v_tangent.w\n#else\n #define FSInput_worldTangent vec3(1.0, 1.0, 1.0)\n #define FSInput_mirrorNormal 1.0\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n #define FSInput_texcoord1 v_uv1\n#else\n #define FSInput_texcoord1 vec2(0.0, 0.0)\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n #define FSInput_lightMapUV v_luv\n#endif\n#if CC_RECEIVE_SHADOW\n #define FSInput_shadowBias v_shadowBiasAndProbeId.xy\n#endif\n#if CC_USE_REFLECTION_PROBE\n #define FSInput_reflectionProbeId v_shadowBiasAndProbeId.z\n #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX\n #define FSInput_reflectionProbeBlendId v_shadowBiasAndProbeId.w\n #endif\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n #define FSInput_fogFactor v_fogFactor\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n #define FSInput_localPos v_localPos\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n #define FSInput_clipPos v_clipPos\n#endif\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#define CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_WORLD_POS CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR CC_SURFACES_DEBUG_VIEW_WORLD_POS + 1\n#define CC_SURFACES_DEBUG_VIEW_FACE_SIDE CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR + 1\n#define CC_SURFACES_DEBUG_VIEW_UV0 CC_SURFACES_DEBUG_VIEW_FACE_SIDE + 1\n#define CC_SURFACES_DEBUG_VIEW_UV1 CC_SURFACES_DEBUG_VIEW_UV0 + 1\n#define CC_SURFACES_DEBUG_VIEW_UVLIGHTMAP CC_SURFACES_DEBUG_VIEW_UV1 + 1\n#define CC_SURFACES_DEBUG_VIEW_PROJ_DEPTH CC_SURFACES_DEBUG_VIEW_UVLIGHTMAP + 1\n#define CC_SURFACES_DEBUG_VIEW_LINEAR_DEPTH CC_SURFACES_DEBUG_VIEW_PROJ_DEPTH + 1\n#define CC_SURFACES_DEBUG_VIEW_FRAGMENT_NORMAL CC_SURFACES_DEBUG_VIEW_LINEAR_DEPTH + 1\n#define CC_SURFACES_DEBUG_VIEW_FRAGMENT_TANGENT CC_SURFACES_DEBUG_VIEW_FRAGMENT_NORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_FRAGMENT_BINORMAL CC_SURFACES_DEBUG_VIEW_FRAGMENT_TANGENT + 1\n#define CC_SURFACES_DEBUG_VIEW_BASE_COLOR CC_SURFACES_DEBUG_VIEW_FRAGMENT_BINORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_DIFFUSE_COLOR CC_SURFACES_DEBUG_VIEW_BASE_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_SPECULAR_COLOR CC_SURFACES_DEBUG_VIEW_DIFFUSE_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSPARENCY CC_SURFACES_DEBUG_VIEW_SPECULAR_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_METALLIC CC_SURFACES_DEBUG_VIEW_TRANSPARENCY + 1\n#define CC_SURFACES_DEBUG_VIEW_ROUGHNESS CC_SURFACES_DEBUG_VIEW_METALLIC + 1\n#define CC_SURFACES_DEBUG_VIEW_SPECULAR_INTENSITY CC_SURFACES_DEBUG_VIEW_ROUGHNESS + 1\n#define CC_SURFACES_DEBUG_VIEW_IOR CC_SURFACES_DEBUG_VIEW_SPECULAR_INTENSITY + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_DIFFUSE CC_SURFACES_DEBUG_VIEW_IOR + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_SPECULAR CC_SURFACES_DEBUG_VIEW_DIRECT_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_ALL CC_SURFACES_DEBUG_VIEW_DIRECT_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_ENV_DIFFUSE CC_SURFACES_DEBUG_VIEW_DIRECT_ALL + 1\n#define CC_SURFACES_DEBUG_VIEW_ENV_SPECULAR CC_SURFACES_DEBUG_VIEW_ENV_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_ENV_ALL CC_SURFACES_DEBUG_VIEW_ENV_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_EMISSIVE CC_SURFACES_DEBUG_VIEW_ENV_ALL + 1\n#define CC_SURFACES_DEBUG_VIEW_LIGHT_MAP CC_SURFACES_DEBUG_VIEW_EMISSIVE + 1\n#define CC_SURFACES_DEBUG_VIEW_SHADOW CC_SURFACES_DEBUG_VIEW_LIGHT_MAP + 1\n#define CC_SURFACES_DEBUG_VIEW_AO CC_SURFACES_DEBUG_VIEW_SHADOW + 1\n#define CC_SURFACES_DEBUG_VIEW_FRESNEL CC_SURFACES_DEBUG_VIEW_AO + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_DIFFUSE CC_SURFACES_DEBUG_VIEW_FRESNEL + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_SPECULAR CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_DIFFUSE CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_SPECULAR CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_ALL CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_2ND_SPECULAR CC_SURFACES_DEBUG_VIEW_TRANSMIT_ALL + 1\n#define CC_SURFACES_DEBUG_VIEW_ENVIRONMENT_2ND_SPECULAR CC_SURFACES_DEBUG_VIEW_DIRECT_2ND_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_2ND_SPECULAR_ALL CC_SURFACES_DEBUG_VIEW_ENVIRONMENT_2ND_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_FOG CC_SURFACES_DEBUG_VIEW_2ND_SPECULAR_ALL + 1\n#define IS_DEBUG_VIEW_ENABLE_WITH_CAMERA (cc_surfaceTransform.y != 3.0)\n#define IS_DEBUG_VIEW_LIGHTING_ENABLE_WITH_ALBEDO (UnpackBitFromFloat(cc_debug_view_mode.w, 6) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_MISC_ENABLE_CSM_LAYER_COLORATION (UnpackBitFromFloat(cc_debug_view_mode.w, 7) && IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_DIFFUSE (UnpackBitFromFloat(cc_debug_view_mode.y, 0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.y, 1) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_DIFFUSE (UnpackBitFromFloat(cc_debug_view_mode.y, 2) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.y, 3) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_EMISSIVE (UnpackBitFromFloat(cc_debug_view_mode.y, 4) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_LIGHT_MAP (UnpackBitFromFloat(cc_debug_view_mode.y, 5) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_SHADOW (UnpackBitFromFloat(cc_debug_view_mode.y, 6) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_AO (UnpackBitFromFloat(cc_debug_view_mode.y, 7) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_NORMAL_MAP (UnpackBitFromFloat(cc_debug_view_mode.z, 0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_FOG (UnpackBitFromFloat(cc_debug_view_mode.z, 1) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING (UnpackBitFromFloat(cc_debug_view_mode.z, 2) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION (UnpackBitFromFloat(cc_debug_view_mode.z, 3) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_FRESNEL (UnpackBitFromFloat(cc_debug_view_mode.z, 4) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TRANSMIT_DIFFUSE (UnpackBitFromFloat(cc_debug_view_mode.z, 5) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TRANSMIT_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.z, 6) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_2ND_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.z, 7) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TT (UnpackBitFromFloat(cc_debug_view_mode.w, 0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#if (CC_PIPELINE_TYPE == 0 || CC_FORCE_FORWARD_SHADING)\n #if CC_FORWARD_ADD\n #if CC_PIPELINE_TYPE == 0\n #define LIGHTS_PER_PASS 1\n #else\n #define LIGHTS_PER_PASS 10\n #endif\n #if CC_ENABLE_CLUSTERED_LIGHT_CULLING == 0\n layout(std140) uniform CCForwardLight {\n highp vec4 cc_lightPos[LIGHTS_PER_PASS];\n vec4 cc_lightColor[LIGHTS_PER_PASS];\n vec4 cc_lightSizeRangeAngle[LIGHTS_PER_PASS];\n vec4 cc_lightDir[LIGHTS_PER_PASS];\n vec4 cc_lightBoundingSizeVS[LIGHTS_PER_PASS];\n };\n #endif\n #endif\n#endif\n#if CC_USE_LIGHT_PROBE\n layout(std140) uniform CCSH {\n vec4 cc_sh_linear_const_r;\n vec4 cc_sh_linear_const_g;\n vec4 cc_sh_linear_const_b;\n vec4 cc_sh_quadratic_r;\n vec4 cc_sh_quadratic_g;\n vec4 cc_sh_quadratic_b;\n vec4 cc_sh_quadratic_a;\n };\n#endif\nlayout(std140) uniform CCShadow {\n highp mat4 cc_matLightView;\n highp mat4 cc_matLightViewProj;\n highp vec4 cc_shadowInvProjDepthInfo;\n highp vec4 cc_shadowProjDepthInfo;\n highp vec4 cc_shadowProjInfo;\n mediump vec4 cc_shadowNFLSInfo;\n mediump vec4 cc_shadowWHPBInfo;\n mediump vec4 cc_shadowLPNNInfo;\n lowp vec4 cc_shadowColor;\n mediump vec4 cc_planarNDInfo;\n};\n#if CC_SUPPORT_CASCADED_SHADOW_MAP\n layout(std140) uniform CCCSM {\n highp vec4 cc_csmViewDir0[4];\n highp vec4 cc_csmViewDir1[4];\n highp vec4 cc_csmViewDir2[4];\n highp vec4 cc_csmAtlas[4];\n highp mat4 cc_matCSMViewProj[4];\n highp vec4 cc_csmProjDepthInfo[4];\n highp vec4 cc_csmProjInfo[4];\n highp vec4 cc_csmSplitsInfo;\n };\n#endif\nuniform samplerCube cc_environment;\n#if CC_USE_IBL\n #if CC_USE_DIFFUSEMAP\n uniform samplerCube cc_diffuseMap;\n #endif\n#endif\n#if CC_USE_REFLECTION_PROBE\n uniform samplerCube cc_reflectionProbeCubemap;\n uniform sampler2D cc_reflectionProbePlanarMap;\n uniform sampler2D cc_reflectionProbeDataMap;\n uniform samplerCube cc_reflectionProbeBlendCubemap;\n#endif\nvec4 fragTextureLod (sampler2D tex, vec2 coord, float lod) {\n return textureLod(tex, coord, lod);\n}\nvec4 fragTextureLod (samplerCube tex, vec3 coord, float lod) {\n return textureLod(tex, coord, lod);\n}\n#define UnpackBitFromFloat(value, bit) (mod(floor(value / pow(10.0, float(bit))), 10.0) > 0.0)\nvec4 packRGBE (vec3 rgb) {\n highp float maxComp = max(max(rgb.r, rgb.g), rgb.b);\n highp float e = 128.0;\n if (maxComp > 0.0001) {\n e = log(maxComp) / log(1.1);\n e = ceil(e);\n e = clamp(e + 128.0, 0.0, 255.0);\n }\n highp float sc = 1.0 / pow(1.1, e - 128.0);\n vec3 encode = clamp(rgb * sc, vec3(0.0), vec3(1.0)) * 255.0;\n vec3 encode_rounded = floor(encode) + step(encode - floor(encode), vec3(0.5));\n return vec4(encode_rounded, e) / 255.0;\n}\nvec3 unpackRGBE (vec4 rgbe) {\n return rgbe.rgb * pow(1.1, rgbe.a * 255.0 - 128.0);\n}\nvec3 ACESToneMap (vec3 color) {\n color = min(color, vec3(8.0));\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nvec3 HDRToLDR(vec3 color)\n{\n #if CC_USE_HDR\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING)\n #endif\n {\n #if CC_TONE_MAPPING_TYPE == HDR_TONE_MAPPING_ACES\n color.rgb = ACESToneMap(color.rgb);\n #endif\n }\n #endif\n return color;\n}\nvec3 SRGBToLinear (vec3 gamma) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return gamma;\n }\n #endif\n#endif\n return gamma * gamma;\n}\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\n#if defined(CC_USE_METAL) || defined(CC_USE_WGPU)\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y) y = -y\n#else\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y)\n#endif\nvec3 RotationVecFromAxisY(vec3 v, float cosTheta, float sinTheta)\n{\n vec3 result;\n result.x = dot(v, vec3(cosTheta, 0.0, -sinTheta));\n result.y = v.y;\n result.z = dot(v, vec3(sinTheta, 0.0, cosTheta));\n return result;\n}\nvec3 RotationVecFromAxisY(vec3 v, float rotateAngleArc)\n{\n return RotationVecFromAxisY(v, cos(rotateAngleArc), sin(rotateAngleArc));\n}\n#if CC_SUPPORT_CASCADED_SHADOW_MAP\n#endif\n#if CC_RECEIVE_SHADOW\n uniform highp sampler2D cc_shadowMap;\n uniform highp sampler2D cc_spotShadowMap;\n #if CC_SUPPORT_CASCADED_SHADOW_MAP\n #else\n #endif\n#endif\n#if CC_USE_FOG != 4\n float LinearFog(vec4 pos, vec3 cameraPos, float fogStart, float fogEnd) {\n vec4 wPos = pos;\n float cam_dis = distance(cameraPos, wPos.xyz);\n return clamp((fogEnd - cam_dis) / (fogEnd - fogStart), 0., 1.);\n }\n float ExpFog(vec4 pos, vec3 cameraPos, float fogStart, float fogDensity, float fogAtten) {\n vec4 wPos = pos;\n float cam_dis = max(distance(cameraPos, wPos.xyz) - fogStart, 0.0) / fogAtten * 4.;\n float f = exp(-cam_dis * fogDensity);\n return f;\n }\n float ExpSquaredFog(vec4 pos, vec3 cameraPos, float fogStart, float fogDensity, float fogAtten) {\n vec4 wPos = pos;\n float cam_dis = max(distance(cameraPos, wPos.xyz) - fogStart, 0.0) / fogAtten * 4.;\n float f = exp(-cam_dis * cam_dis * fogDensity * fogDensity);\n return f;\n }\n float LayeredFog(vec4 pos, vec3 cameraPos, float fogTop, float fogRange, float fogAtten) {\n vec4 wPos = pos;\n vec3 camWorldProj = cameraPos.xyz;\n camWorldProj.y = 0.;\n vec3 worldPosProj = wPos.xyz;\n worldPosProj.y = 0.;\n float fDeltaD = distance(worldPosProj, camWorldProj) / fogAtten * 2.0;\n float fDeltaY, fDensityIntegral;\n if (cameraPos.y > fogTop) {\n if (wPos.y < fogTop) {\n fDeltaY = (fogTop - wPos.y) / fogRange * 2.0;\n fDensityIntegral = fDeltaY * fDeltaY * 0.5;\n }\n else {\n fDeltaY = 0.;\n fDensityIntegral = 0.;\n }\n }\n else {\n if (wPos.y < fogTop) {\n float fDeltaA = (fogTop - cameraPos.y) / fogRange * 2.;\n float fDeltaB = (fogTop - wPos.y) / fogRange * 2.;\n fDeltaY = abs(fDeltaA - fDeltaB);\n fDensityIntegral = abs((fDeltaA * fDeltaA * 0.5) - (fDeltaB * fDeltaB * 0.5));\n }\n else {\n fDeltaY = abs(fogTop - cameraPos.y) / fogRange * 2.;\n fDensityIntegral = abs(fDeltaY * fDeltaY * 0.5);\n }\n }\n float fDensity;\n if (fDeltaY != 0.) {\n fDensity = (sqrt(1.0 + ((fDeltaD / fDeltaY) * (fDeltaD / fDeltaY)))) * fDensityIntegral;\n }\n else {\n fDensity = 0.;\n }\n float f = exp(-fDensity);\n return f;\n }\n#endif\nvoid CC_TRANSFER_FOG_BASE(vec4 pos, out float factor)\n{\n#if CC_USE_FOG == 0\n\tfactor = LinearFog(pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.y);\n#elif CC_USE_FOG == 1\n\tfactor = ExpFog(pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z);\n#elif CC_USE_FOG == 2\n\tfactor = ExpSquaredFog(pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z);\n#elif CC_USE_FOG == 3\n\tfactor = LayeredFog(pos, cc_cameraPos.xyz, cc_fogAdd.x, cc_fogAdd.y, cc_fogAdd.z);\n#else\n\tfactor = 1.0;\n#endif\n}\nvoid CC_APPLY_FOG_BASE(inout vec4 color, float factor) {\n\tcolor = vec4(mix(cc_fogColor.rgb, color.rgb, factor), color.a);\n}\n#if CC_USE_LIGHT_PROBE\n #if CC_USE_LIGHT_PROBE\n #endif\n#endif\n#if CC_USE_REFLECTION_PROBE\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\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n uniform sampler2D cc_lightingMap;\n#endif\nlayout(std140) uniform Constants {\n vec4 params;\n};\nuniform samplerCube environmentMap;\n#if BLEND_ENV_MAP\n uniform samplerCube blendEnvironmentMap;\n#endif\n#define CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\nvec3 sampleEnvMap(samplerCube tex, vec3 R)\n{\n vec3 c = vec3(1.0);\n #if USE_RGBE_CUBEMAP\n c *= unpackRGBE(fragTextureLod(tex, R, 0.0));\n #else\n c *= SRGBToLinear(fragTextureLod(tex, R, 0.0).rgb);\n #endif\n return c;\n}\nvec4 SurfacesFragmentModifyBaseColorAndTransparency()\n{\n vec3 c = vec3(1.0);\n vec3 normal = normalize(FSInput_worldNormal);\n vec3 rotationDir = RotationVecFromAxisY(normal.xyz, cc_surfaceTransform.z, cc_surfaceTransform.w);\n c = sampleEnvMap(environmentMap, rotationDir);\n #if BLEND_ENV_MAP\n c = mix(c, sampleEnvMap(blendEnvironmentMap, rotationDir), params.x);\n #endif\n return vec4(c * cc_ambientSky.w * params.y, 1.0);\n}\n#ifndef CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\nvec4 SurfacesFragmentModifyBaseColorAndTransparency()\n{\n\treturn vec4(cc_ambientSky.xyz * cc_ambientSky.w, 1.0);\n}\n#endif\nlayout(location = 0) out vec4 fragColorX;\nvoid main() {\n vec4 color = SurfacesFragmentModifyBaseColorAndTransparency();\n color.a = 1.0;\n #if CC_USE_FOG != 4\n float fogFactor = 1.0;\n CC_TRANSFER_FOG_BASE(vec4(FSInput_worldPos, 1.0), fogFactor);\n CC_APPLY_FOG_BASE(color, fogFactor);\n #endif\n #if CC_USE_RGBE_OUTPUT\n color = packRGBE(color.rgb);\n #else\n color.rgb = HDRToLDR(color.rgb);\n color.rgb = LinearToSRGB(color.rgb);\n #endif\n fragColorX = color;\n}"
  1305. },
  1306. "glsl1": {
  1307. "vert": "\nprecision highp float;\n#define CC_SURFACES_USE_TANGENT_SPACE 0\n#define CC_SURFACES_USE_VERTEX_COLOR 0\n#define CC_SURFACES_USE_SECOND_UV 0\n#define CC_SURFACES_USE_LIGHT_MAP 0\n#define CC_SURFACES_TRANSFER_LOCAL_POS 0\n#define CC_USE_SURFACE_SHADER 1\nattribute vec3 a_position;\nattribute vec3 a_normal;\nattribute vec2 a_texCoord;\n#if CC_SURFACES_USE_TANGENT_SPACE\n attribute vec4 a_tangent;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n attribute vec4 a_color;\n#endif\n#if CC_SURFACES_USE_SECOND_UV || CC_USE_LIGHTMAP\n attribute vec2 a_texCoord1;\n#endif\n#if CC_USE_SKINNING\n attribute vec4 a_joints;\n attribute vec4 a_weights;\n#endif\n#if CC_USE_MORPH\n attribute float a_vertexId;\n#endif\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\nvarying highp vec3 v_worldPos;\nvarying vec4 v_normal;\nvarying vec2 v_uv;\n#if CC_SURFACES_USE_VERTEX_COLOR\n varying lowp vec4 v_color;\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n varying mediump vec4 v_tangent;\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n varying mediump vec2 v_uv1;\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n varying mediump vec3 v_luv;\n#endif\n#if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE\n varying mediump vec4 v_shadowBiasAndProbeId;\n#endif\n#if CC_USE_REFLECTION_PROBE && 0\n varying mediump vec4 v_reflectionProbeData;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n varying mediump float v_fogFactor;\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n varying highp vec4 v_localPos;\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n varying highp vec4 v_clipPos;\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n#define VSOutput_worldPos v_worldPos\n#define VSOutput_worldNormal v_normal.xyz\n#define VSOutput_faceSideSign v_normal.w\n#define VSOutput_texcoord v_uv\n#if CC_SURFACES_USE_VERTEX_COLOR\n #define VSOutput_vertexColor v_color\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n #define VSOutput_worldTangent v_tangent.xyz\n #define VSOutput_mirrorNormal v_tangent.w\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n #define VSOutput_texcoord1 v_uv1\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n #define VSOutput_lightMapUV v_luv\n#endif\n#if CC_RECEIVE_SHADOW\n #define VSOutput_shadowBias v_shadowBiasAndProbeId.xy\n#endif\n#if CC_USE_REFLECTION_PROBE\n #define VSOutput_reflectionProbeId v_shadowBiasAndProbeId.z\n #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX\n #define VSOutput_reflectionProbeBlendId v_shadowBiasAndProbeId.w\n #endif\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n #define VSOutput_fogFactor v_fogFactor\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n #define VSOutput_localPos v_localPos\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n #define VSOutput_clipPos v_clipPos\n#endif\nstruct SurfacesStandardVertexIntermediate\n{\n highp vec4 position;\n vec3 normal;\n#if CC_SURFACES_USE_TANGENT_SPACE\n vec4 tangent;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n vec4 color;\n#endif\n vec2 texCoord;\n#if CC_SURFACES_USE_SECOND_UV\n vec2 texCoord1;\n#endif\n highp vec4 clipPos;\n highp vec3 worldPos;\n vec4 worldNormal;\n #if CC_SURFACES_USE_TANGENT_SPACE\n vec3 worldTangent, worldBinormal;\n #endif\n#if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE\n vec4 shadowBiasAndProbeId;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n float fogFactor;\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n vec3 lightmapUV;\n#endif\n};\n#if CC_USE_MORPH\n#endif\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\n uniform highp vec4 cc_cameraPos;\n#if CC_USE_MORPH\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 #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n #else\n #endif\n #if CC_MORPH_TARGET_HAS_POSITION\n #endif\n #if CC_MORPH_TARGET_HAS_NORMAL\n #endif\n #if CC_MORPH_TARGET_HAS_TANGENT\n #endif\n#endif\n#if CC_USE_SKINNING\n #if CC_USE_BAKED_ANIMATION\n uniform highp sampler2D cc_jointTexture;\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n uniform highp sampler2D cc_realtimeJoint;\n #else\n #endif\n #endif\n #if CC_USE_BAKED_ANIMATION\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n #else\n #endif\n #else\n #if CC_USE_REAL_TIME_JOINT_TEXTURE\n #if CC_DEVICE_SUPPORT_FLOAT_TEXTURE\n #else\n #endif\n #else\n #endif\n #endif\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n #if CC_USE_FOG != 4\n #endif\n#endif\n uniform vec4 params;\n#define CC_SURFACES_VERTEX_MODIFY_WORLD_POS\nvec3 SurfacesVertexModifyWorldPos(in SurfacesStandardVertexIntermediate In)\n{\n return cc_cameraPos.xyz + In.worldPos * params.w;\n}\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_POS\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_NORMAL\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_TANGENT\n #if CC_SURFACES_USE_TANGENT_SPACE\n #endif\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_LOCAL_SHARED_DATA\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_WORLD_POS\nvec3 SurfacesVertexModifyWorldPos(in SurfacesStandardVertexIntermediate In)\n{\n return In.worldPos;\n}\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_CLIP_POS\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_UV\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_WORLD_NORMAL\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_SHADOW_BIAS\n#endif\n#ifndef CC_SURFACES_VERTEX_MODIFY_SHARED_DATA\n#endif\nvoid CCSurfacesVertexInput(out SurfacesStandardVertexIntermediate In)\n{\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n#if CC_SURFACES_USE_TANGENT_SPACE\n In.tangent = a_tangent;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n In.color = a_color;\n#endif\n In.texCoord = a_texCoord;\n#if CC_SURFACES_USE_SECOND_UV\n In.texCoord1 = a_texCoord1;\n#endif\n}\nvoid CCSurfacesVertexOutput(in SurfacesStandardVertexIntermediate In)\n{\n gl_Position = In.clipPos;\n VSOutput_worldNormal = In.worldNormal.xyz;\n VSOutput_faceSideSign = In.worldNormal.w;\n VSOutput_worldPos = In.worldPos;\n#if CC_SURFACES_USE_TANGENT_SPACE\n VSOutput_worldTangent = In.worldTangent.xyz;\n VSOutput_mirrorNormal = In.tangent.w > 0.0 ? 1.0 : -1.0;\n#endif\n#if CC_SURFACES_USE_VERTEX_COLOR\n VSOutput_vertexColor = In.color;\n#endif\n VSOutput_texcoord = In.texCoord;\n#if CC_SURFACES_USE_SECOND_UV\n VSOutput_texcoord1 = In.texCoord1;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n VSOutput_fogFactor = In.fogFactor;\n#endif\n#if CC_RECEIVE_SHADOW\n VSOutput_shadowBias = In.shadowBiasAndProbeId.xy;\n#endif\n#if CC_USE_REFLECTION_PROBE\n VSOutput_reflectionProbeId = In.shadowBiasAndProbeId.z;\n #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX\n VSOutput_reflectionProbeBlendId = In.shadowBiasAndProbeId.w;\n #endif\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n VSOutput_lightMapUV = In.lightmapUV;\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n VSOutput_localPos = In.position;\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n VSOutput_clipPos = In.clipPos;\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n}\nvec4 CalcSkyClipPos(vec3 viewDir)\n{\n vec4 clipPos;\n mat4 matViewRotOnly = mat4(mat3(cc_matView));\n vec4 pos = matViewRotOnly * vec4(viewDir, 1.0);\n if (cc_matProj[3].w > 0.0) {\n mat4 matProj = cc_matProj;\n matProj[0].x = 5.2;\n matProj[1].y = 2.6;\n matProj[2].zw = vec2(-1.0);\n matProj[3].zw = vec2(0.0);\n clipPos = matProj * pos;\n }\n else {\n clipPos = cc_matProj * pos;\n }\n clipPos.z = 0.99999 * clipPos.w;\n return clipPos;\n}\nvoid main()\n{\n SurfacesStandardVertexIntermediate In;\n CCSurfacesVertexInput(In);\n In.worldPos = In.position.xyz;\n In.worldPos = SurfacesVertexModifyWorldPos(In);\n In.clipPos = CalcSkyClipPos(In.position.xyz);\n In.worldNormal.w = 1.0;\n In.worldNormal.xyz = normalize(In.position.xyz);\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n In.fogFactor = 0.0;\n#endif\n CCSurfacesVertexOutput(In);\n}",
  1308. "frag": "\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives: enable\n#endif\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod: enable\n#endif\nprecision highp float;\n#define CC_SURFACES_USE_TANGENT_SPACE 0\n#define CC_SURFACES_USE_VERTEX_COLOR 0\n#define CC_SURFACES_USE_SECOND_UV 0\n#define CC_SURFACES_USE_LIGHT_MAP 0\n#define CC_SURFACES_TRANSFER_LOCAL_POS 0\n#define CC_USE_SURFACE_SHADER 1\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\nvarying highp vec3 v_worldPos;\nvarying vec4 v_normal;\nvarying vec2 v_uv;\n#if CC_SURFACES_USE_VERTEX_COLOR\n varying lowp vec4 v_color;\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n varying mediump vec4 v_tangent;\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n varying mediump vec2 v_uv1;\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n varying mediump vec3 v_luv;\n#endif\n#if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE\n varying mediump vec4 v_shadowBiasAndProbeId;\n#endif\n#if CC_USE_REFLECTION_PROBE && 0\n varying mediump vec4 v_reflectionProbeData;\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n varying mediump float v_fogFactor;\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n varying highp vec4 v_localPos;\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n varying highp vec4 v_clipPos;\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n#define FSInput_worldPos v_worldPos\n#define FSInput_worldNormal v_normal.xyz\n#define FSInput_faceSideSign v_normal.w\n#define FSInput_texcoord v_uv\n#if CC_SURFACES_USE_VERTEX_COLOR\n #define FSInput_vertexColor v_color\n#else\n #define FSInput_vertexColor vec4(1.0)\n#endif\n#if CC_SURFACES_USE_TANGENT_SPACE\n #define FSInput_worldTangent v_tangent.xyz\n #define FSInput_mirrorNormal v_tangent.w\n#else\n #define FSInput_worldTangent vec3(1.0, 1.0, 1.0)\n #define FSInput_mirrorNormal 1.0\n#endif\n#if CC_SURFACES_USE_SECOND_UV\n #define FSInput_texcoord1 v_uv1\n#else\n #define FSInput_texcoord1 vec2(0.0, 0.0)\n#endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n #define FSInput_lightMapUV v_luv\n#endif\n#if CC_RECEIVE_SHADOW\n #define FSInput_shadowBias v_shadowBiasAndProbeId.xy\n#endif\n#if CC_USE_REFLECTION_PROBE\n #define FSInput_reflectionProbeId v_shadowBiasAndProbeId.z\n #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX\n #define FSInput_reflectionProbeBlendId v_shadowBiasAndProbeId.w\n #endif\n#endif\n#if CC_USE_FOG != 4 && !CC_USE_ACCURATE_FOG\n #define FSInput_fogFactor v_fogFactor\n#endif\n#if CC_SURFACES_TRANSFER_LOCAL_POS\n #define FSInput_localPos v_localPos\n#endif\n#if CC_SURFACES_TRANSFER_CLIP_POS\n #define FSInput_clipPos v_clipPos\n#endif\nuniform mediump vec4 cc_debug_view_mode;\nuniform highp vec4 cc_cameraPos;\n uniform mediump vec4 cc_surfaceTransform;\n uniform mediump vec4 cc_ambientSky;\n uniform mediump vec4 cc_fogColor;\n uniform mediump vec4 cc_fogBase;\n uniform mediump vec4 cc_fogAdd;\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_WORLD_POS CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR CC_SURFACES_DEBUG_VIEW_WORLD_POS + 1\n#define CC_SURFACES_DEBUG_VIEW_FACE_SIDE CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR + 1\n#define CC_SURFACES_DEBUG_VIEW_UV0 CC_SURFACES_DEBUG_VIEW_FACE_SIDE + 1\n#define CC_SURFACES_DEBUG_VIEW_UV1 CC_SURFACES_DEBUG_VIEW_UV0 + 1\n#define CC_SURFACES_DEBUG_VIEW_UVLIGHTMAP CC_SURFACES_DEBUG_VIEW_UV1 + 1\n#define CC_SURFACES_DEBUG_VIEW_PROJ_DEPTH CC_SURFACES_DEBUG_VIEW_UVLIGHTMAP + 1\n#define CC_SURFACES_DEBUG_VIEW_LINEAR_DEPTH CC_SURFACES_DEBUG_VIEW_PROJ_DEPTH + 1\n#define CC_SURFACES_DEBUG_VIEW_FRAGMENT_NORMAL CC_SURFACES_DEBUG_VIEW_LINEAR_DEPTH + 1\n#define CC_SURFACES_DEBUG_VIEW_FRAGMENT_TANGENT CC_SURFACES_DEBUG_VIEW_FRAGMENT_NORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_FRAGMENT_BINORMAL CC_SURFACES_DEBUG_VIEW_FRAGMENT_TANGENT + 1\n#define CC_SURFACES_DEBUG_VIEW_BASE_COLOR CC_SURFACES_DEBUG_VIEW_FRAGMENT_BINORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_DIFFUSE_COLOR CC_SURFACES_DEBUG_VIEW_BASE_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_SPECULAR_COLOR CC_SURFACES_DEBUG_VIEW_DIFFUSE_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSPARENCY CC_SURFACES_DEBUG_VIEW_SPECULAR_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_METALLIC CC_SURFACES_DEBUG_VIEW_TRANSPARENCY + 1\n#define CC_SURFACES_DEBUG_VIEW_ROUGHNESS CC_SURFACES_DEBUG_VIEW_METALLIC + 1\n#define CC_SURFACES_DEBUG_VIEW_SPECULAR_INTENSITY CC_SURFACES_DEBUG_VIEW_ROUGHNESS + 1\n#define CC_SURFACES_DEBUG_VIEW_IOR CC_SURFACES_DEBUG_VIEW_SPECULAR_INTENSITY + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_DIFFUSE CC_SURFACES_DEBUG_VIEW_IOR + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_SPECULAR CC_SURFACES_DEBUG_VIEW_DIRECT_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_ALL CC_SURFACES_DEBUG_VIEW_DIRECT_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_ENV_DIFFUSE CC_SURFACES_DEBUG_VIEW_DIRECT_ALL + 1\n#define CC_SURFACES_DEBUG_VIEW_ENV_SPECULAR CC_SURFACES_DEBUG_VIEW_ENV_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_ENV_ALL CC_SURFACES_DEBUG_VIEW_ENV_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_EMISSIVE CC_SURFACES_DEBUG_VIEW_ENV_ALL + 1\n#define CC_SURFACES_DEBUG_VIEW_LIGHT_MAP CC_SURFACES_DEBUG_VIEW_EMISSIVE + 1\n#define CC_SURFACES_DEBUG_VIEW_SHADOW CC_SURFACES_DEBUG_VIEW_LIGHT_MAP + 1\n#define CC_SURFACES_DEBUG_VIEW_AO CC_SURFACES_DEBUG_VIEW_SHADOW + 1\n#define CC_SURFACES_DEBUG_VIEW_FRESNEL CC_SURFACES_DEBUG_VIEW_AO + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_DIFFUSE CC_SURFACES_DEBUG_VIEW_FRESNEL + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_SPECULAR CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_DIFFUSE CC_SURFACES_DEBUG_VIEW_TRANSMIT_DIRECT_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_SPECULAR CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_DIFFUSE + 1\n#define CC_SURFACES_DEBUG_VIEW_TRANSMIT_ALL CC_SURFACES_DEBUG_VIEW_TRANSMIT_ENV_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_DIRECT_2ND_SPECULAR CC_SURFACES_DEBUG_VIEW_TRANSMIT_ALL + 1\n#define CC_SURFACES_DEBUG_VIEW_ENVIRONMENT_2ND_SPECULAR CC_SURFACES_DEBUG_VIEW_DIRECT_2ND_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_2ND_SPECULAR_ALL CC_SURFACES_DEBUG_VIEW_ENVIRONMENT_2ND_SPECULAR + 1\n#define CC_SURFACES_DEBUG_VIEW_FOG CC_SURFACES_DEBUG_VIEW_2ND_SPECULAR_ALL + 1\n#define IS_DEBUG_VIEW_ENABLE_WITH_CAMERA (cc_surfaceTransform.y != 3.0)\n#define IS_DEBUG_VIEW_LIGHTING_ENABLE_WITH_ALBEDO (UnpackBitFromFloat(cc_debug_view_mode.w, 6) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_MISC_ENABLE_CSM_LAYER_COLORATION (UnpackBitFromFloat(cc_debug_view_mode.w, 7) && IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_DIFFUSE (UnpackBitFromFloat(cc_debug_view_mode.y, 0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_DIRECT_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.y, 1) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_DIFFUSE (UnpackBitFromFloat(cc_debug_view_mode.y, 2) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_ENV_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.y, 3) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_EMISSIVE (UnpackBitFromFloat(cc_debug_view_mode.y, 4) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_LIGHT_MAP (UnpackBitFromFloat(cc_debug_view_mode.y, 5) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_SHADOW (UnpackBitFromFloat(cc_debug_view_mode.y, 6) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_AO (UnpackBitFromFloat(cc_debug_view_mode.y, 7) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_NORMAL_MAP (UnpackBitFromFloat(cc_debug_view_mode.z, 0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_FOG (UnpackBitFromFloat(cc_debug_view_mode.z, 1) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING (UnpackBitFromFloat(cc_debug_view_mode.z, 2) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION (UnpackBitFromFloat(cc_debug_view_mode.z, 3) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_FRESNEL (UnpackBitFromFloat(cc_debug_view_mode.z, 4) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TRANSMIT_DIFFUSE (UnpackBitFromFloat(cc_debug_view_mode.z, 5) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TRANSMIT_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.z, 6) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_2ND_SPECULAR (UnpackBitFromFloat(cc_debug_view_mode.z, 7) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#define IS_DEBUG_VIEW_COMPOSITE_ENABLE_TT (UnpackBitFromFloat(cc_debug_view_mode.w, 0) || !IS_DEBUG_VIEW_ENABLE_WITH_CAMERA)\n#if (CC_PIPELINE_TYPE == 0 || CC_FORCE_FORWARD_SHADING)\n #if CC_FORWARD_ADD\n #if CC_PIPELINE_TYPE == 0\n #define LIGHTS_PER_PASS 1\n #else\n #define LIGHTS_PER_PASS 10\n #endif\n #if CC_ENABLE_CLUSTERED_LIGHT_CULLING == 0\n #endif\n #endif\n#endif\n#if CC_USE_LIGHT_PROBE\n#endif\n#if CC_SUPPORT_CASCADED_SHADOW_MAP\n #endif\nuniform samplerCube cc_environment;\n#if CC_USE_IBL\n #if CC_USE_DIFFUSEMAP\n uniform samplerCube cc_diffuseMap;\n #endif\n#endif\n#if CC_USE_REFLECTION_PROBE\n uniform samplerCube cc_reflectionProbeCubemap;\n uniform sampler2D cc_reflectionProbePlanarMap;\n uniform sampler2D cc_reflectionProbeDataMap;\n uniform samplerCube cc_reflectionProbeBlendCubemap;\n#endif\nvec4 fragTextureLod (sampler2D tex, vec2 coord, float lod) {\n #ifdef GL_EXT_shader_texture_lod\n return texture2DLodEXT(tex, coord, lod);\n #else\n return texture2D(tex, coord, lod);\n #endif\n}\nvec4 fragTextureLod (samplerCube tex, vec3 coord, float lod) {\n #ifdef GL_EXT_shader_texture_lod\n return textureCubeLodEXT(tex, coord, lod);\n #else\n return textureCube(tex, coord, lod);\n #endif\n}\n#define UnpackBitFromFloat(value, bit) (mod(floor(value / pow(10.0, float(bit))), 10.0) > 0.0)\nvec4 packRGBE (vec3 rgb) {\n highp float maxComp = max(max(rgb.r, rgb.g), rgb.b);\n highp float e = 128.0;\n if (maxComp > 0.0001) {\n e = log(maxComp) / log(1.1);\n e = ceil(e);\n e = clamp(e + 128.0, 0.0, 255.0);\n }\n highp float sc = 1.0 / pow(1.1, e - 128.0);\n vec3 encode = clamp(rgb * sc, vec3(0.0), vec3(1.0)) * 255.0;\n vec3 encode_rounded = floor(encode) + step(encode - floor(encode), vec3(0.5));\n return vec4(encode_rounded, e) / 255.0;\n}\nvec3 unpackRGBE (vec4 rgbe) {\n return rgbe.rgb * pow(1.1, rgbe.a * 255.0 - 128.0);\n}\nvec3 ACESToneMap (vec3 color) {\n color = min(color, vec3(8.0));\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nvec3 HDRToLDR(vec3 color)\n{\n #if CC_USE_HDR\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING)\n #endif\n {\n #if CC_TONE_MAPPING_TYPE == HDR_TONE_MAPPING_ACES\n color.rgb = ACESToneMap(color.rgb);\n #endif\n }\n #endif\n return color;\n}\nvec3 SRGBToLinear (vec3 gamma) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return gamma;\n }\n #endif\n#endif\n return gamma * gamma;\n}\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\n#if defined(CC_USE_METAL) || defined(CC_USE_WGPU)\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y) y = -y\n#else\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y)\n#endif\nvec3 RotationVecFromAxisY(vec3 v, float cosTheta, float sinTheta)\n{\n vec3 result;\n result.x = dot(v, vec3(cosTheta, 0.0, -sinTheta));\n result.y = v.y;\n result.z = dot(v, vec3(sinTheta, 0.0, cosTheta));\n return result;\n}\nvec3 RotationVecFromAxisY(vec3 v, float rotateAngleArc)\n{\n return RotationVecFromAxisY(v, cos(rotateAngleArc), sin(rotateAngleArc));\n}\n#if CC_SUPPORT_CASCADED_SHADOW_MAP\n#endif\n#if CC_RECEIVE_SHADOW\n uniform highp sampler2D cc_shadowMap;\n uniform highp sampler2D cc_spotShadowMap;\n #if CC_SUPPORT_CASCADED_SHADOW_MAP\n #else\n #endif\n#endif\n#if CC_USE_FOG != 4\n float LinearFog(vec4 pos, vec3 cameraPos, float fogStart, float fogEnd) {\n vec4 wPos = pos;\n float cam_dis = distance(cameraPos, wPos.xyz);\n return clamp((fogEnd - cam_dis) / (fogEnd - fogStart), 0., 1.);\n }\n float ExpFog(vec4 pos, vec3 cameraPos, float fogStart, float fogDensity, float fogAtten) {\n vec4 wPos = pos;\n float cam_dis = max(distance(cameraPos, wPos.xyz) - fogStart, 0.0) / fogAtten * 4.;\n float f = exp(-cam_dis * fogDensity);\n return f;\n }\n float ExpSquaredFog(vec4 pos, vec3 cameraPos, float fogStart, float fogDensity, float fogAtten) {\n vec4 wPos = pos;\n float cam_dis = max(distance(cameraPos, wPos.xyz) - fogStart, 0.0) / fogAtten * 4.;\n float f = exp(-cam_dis * cam_dis * fogDensity * fogDensity);\n return f;\n }\n float LayeredFog(vec4 pos, vec3 cameraPos, float fogTop, float fogRange, float fogAtten) {\n vec4 wPos = pos;\n vec3 camWorldProj = cameraPos.xyz;\n camWorldProj.y = 0.;\n vec3 worldPosProj = wPos.xyz;\n worldPosProj.y = 0.;\n float fDeltaD = distance(worldPosProj, camWorldProj) / fogAtten * 2.0;\n float fDeltaY, fDensityIntegral;\n if (cameraPos.y > fogTop) {\n if (wPos.y < fogTop) {\n fDeltaY = (fogTop - wPos.y) / fogRange * 2.0;\n fDensityIntegral = fDeltaY * fDeltaY * 0.5;\n }\n else {\n fDeltaY = 0.;\n fDensityIntegral = 0.;\n }\n }\n else {\n if (wPos.y < fogTop) {\n float fDeltaA = (fogTop - cameraPos.y) / fogRange * 2.;\n float fDeltaB = (fogTop - wPos.y) / fogRange * 2.;\n fDeltaY = abs(fDeltaA - fDeltaB);\n fDensityIntegral = abs((fDeltaA * fDeltaA * 0.5) - (fDeltaB * fDeltaB * 0.5));\n }\n else {\n fDeltaY = abs(fogTop - cameraPos.y) / fogRange * 2.;\n fDensityIntegral = abs(fDeltaY * fDeltaY * 0.5);\n }\n }\n float fDensity;\n if (fDeltaY != 0.) {\n fDensity = (sqrt(1.0 + ((fDeltaD / fDeltaY) * (fDeltaD / fDeltaY)))) * fDensityIntegral;\n }\n else {\n fDensity = 0.;\n }\n float f = exp(-fDensity);\n return f;\n }\n#endif\nvoid CC_TRANSFER_FOG_BASE(vec4 pos, out float factor)\n{\n#if CC_USE_FOG == 0\n\tfactor = LinearFog(pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.y);\n#elif CC_USE_FOG == 1\n\tfactor = ExpFog(pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z);\n#elif CC_USE_FOG == 2\n\tfactor = ExpSquaredFog(pos, cc_cameraPos.xyz, cc_fogBase.x, cc_fogBase.z, cc_fogAdd.z);\n#elif CC_USE_FOG == 3\n\tfactor = LayeredFog(pos, cc_cameraPos.xyz, cc_fogAdd.x, cc_fogAdd.y, cc_fogAdd.z);\n#else\n\tfactor = 1.0;\n#endif\n}\nvoid CC_APPLY_FOG_BASE(inout vec4 color, float factor) {\n\tcolor = vec4(mix(cc_fogColor.rgb, color.rgb, factor), color.a);\n}\n#if CC_USE_LIGHT_PROBE\n #if CC_USE_LIGHT_PROBE\n #endif\n#endif\n#if CC_USE_REFLECTION_PROBE\n #endif\n#if CC_USE_LIGHTMAP && !CC_FORWARD_ADD\n uniform sampler2D cc_lightingMap;\n#endif\n uniform vec4 params;\nuniform samplerCube environmentMap;\n#if BLEND_ENV_MAP\n uniform samplerCube blendEnvironmentMap;\n#endif\n#define CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\nvec3 sampleEnvMap(samplerCube tex, vec3 R)\n{\n vec3 c = vec3(1.0);\n #if USE_RGBE_CUBEMAP\n c *= unpackRGBE(fragTextureLod(tex, R, 0.0));\n #else\n c *= SRGBToLinear(fragTextureLod(tex, R, 0.0).rgb);\n #endif\n return c;\n}\nvec4 SurfacesFragmentModifyBaseColorAndTransparency()\n{\n vec3 c = vec3(1.0);\n vec3 normal = normalize(FSInput_worldNormal);\n vec3 rotationDir = RotationVecFromAxisY(normal.xyz, cc_surfaceTransform.z, cc_surfaceTransform.w);\n c = sampleEnvMap(environmentMap, rotationDir);\n #if BLEND_ENV_MAP\n c = mix(c, sampleEnvMap(blendEnvironmentMap, rotationDir), params.x);\n #endif\n return vec4(c * cc_ambientSky.w * params.y, 1.0);\n}\n#ifndef CC_SURFACES_FRAGMENT_MODIFY_BASECOLOR_AND_TRANSPARENCY\nvec4 SurfacesFragmentModifyBaseColorAndTransparency()\n{\n\treturn vec4(cc_ambientSky.xyz * cc_ambientSky.w, 1.0);\n}\n#endif\nvoid main() {\n vec4 color = SurfacesFragmentModifyBaseColorAndTransparency();\n color.a = 1.0;\n #if CC_USE_FOG != 4\n float fogFactor = 1.0;\n CC_TRANSFER_FOG_BASE(vec4(FSInput_worldPos, 1.0), fogFactor);\n CC_APPLY_FOG_BASE(color, fogFactor);\n #endif\n #if CC_USE_RGBE_OUTPUT\n color = packRGBE(color.rgb);\n #else\n color.rgb = HDRToLDR(color.rgb);\n color.rgb = LinearToSRGB(color.rgb);\n #endif\n gl_FragColor = color;\n}"
  1309. },
  1310. "builtins": {
  1311. "globals": {
  1312. "blocks": [
  1313. {
  1314. "name": "CCGlobal",
  1315. "defines": []
  1316. },
  1317. {
  1318. "name": "CCCamera",
  1319. "defines": []
  1320. },
  1321. {
  1322. "name": "CCShadow",
  1323. "defines": []
  1324. },
  1325. {
  1326. "name": "CCCSM",
  1327. "defines": [
  1328. "CC_SUPPORT_CASCADED_SHADOW_MAP"
  1329. ]
  1330. }
  1331. ],
  1332. "samplerTextures": [
  1333. {
  1334. "name": "cc_environment",
  1335. "defines": []
  1336. },
  1337. {
  1338. "name": "cc_diffuseMap",
  1339. "defines": [
  1340. "CC_USE_IBL",
  1341. "CC_USE_DIFFUSEMAP"
  1342. ]
  1343. },
  1344. {
  1345. "name": "cc_shadowMap",
  1346. "defines": [
  1347. "CC_RECEIVE_SHADOW"
  1348. ]
  1349. },
  1350. {
  1351. "name": "cc_spotShadowMap",
  1352. "defines": [
  1353. "CC_RECEIVE_SHADOW"
  1354. ]
  1355. }
  1356. ],
  1357. "buffers": [],
  1358. "images": []
  1359. },
  1360. "locals": {
  1361. "blocks": [
  1362. {
  1363. "name": "CCLocal",
  1364. "defines": []
  1365. },
  1366. {
  1367. "name": "CCMorph",
  1368. "defines": [
  1369. "CC_USE_MORPH"
  1370. ]
  1371. },
  1372. {
  1373. "name": "CCSkinningTexture",
  1374. "defines": [
  1375. "CC_USE_SKINNING",
  1376. "CC_USE_BAKED_ANIMATION"
  1377. ]
  1378. },
  1379. {
  1380. "name": "CCSkinningAnimation",
  1381. "defines": [
  1382. "CC_USE_SKINNING",
  1383. "CC_USE_BAKED_ANIMATION"
  1384. ]
  1385. },
  1386. {
  1387. "name": "CCSkinning",
  1388. "defines": [
  1389. "CC_USE_SKINNING",
  1390. "!CC_USE_BAKED_ANIMATION",
  1391. "!CC_USE_REAL_TIME_JOINT_TEXTURE"
  1392. ]
  1393. },
  1394. {
  1395. "name": "CCForwardLight",
  1396. "defines": [
  1397. "CC_FORWARD_ADD",
  1398. "CC_ENABLE_CLUSTERED_LIGHT_CULLING"
  1399. ]
  1400. },
  1401. {
  1402. "name": "CCSH",
  1403. "defines": [
  1404. "CC_USE_LIGHT_PROBE"
  1405. ]
  1406. }
  1407. ],
  1408. "samplerTextures": [
  1409. {
  1410. "name": "cc_PositionDisplacements",
  1411. "defines": [
  1412. "CC_USE_MORPH",
  1413. "CC_MORPH_TARGET_HAS_POSITION"
  1414. ]
  1415. },
  1416. {
  1417. "name": "cc_NormalDisplacements",
  1418. "defines": [
  1419. "CC_USE_MORPH",
  1420. "CC_MORPH_TARGET_HAS_NORMAL"
  1421. ]
  1422. },
  1423. {
  1424. "name": "cc_TangentDisplacements",
  1425. "defines": [
  1426. "CC_USE_MORPH",
  1427. "CC_MORPH_TARGET_HAS_TANGENT"
  1428. ]
  1429. },
  1430. {
  1431. "name": "cc_jointTexture",
  1432. "defines": [
  1433. "CC_USE_SKINNING",
  1434. "CC_USE_BAKED_ANIMATION"
  1435. ]
  1436. },
  1437. {
  1438. "name": "cc_realtimeJoint",
  1439. "defines": [
  1440. "CC_USE_SKINNING",
  1441. "!CC_USE_BAKED_ANIMATION",
  1442. "CC_USE_REAL_TIME_JOINT_TEXTURE"
  1443. ]
  1444. },
  1445. {
  1446. "name": "cc_reflectionProbeCubemap",
  1447. "defines": [
  1448. "CC_USE_REFLECTION_PROBE"
  1449. ]
  1450. },
  1451. {
  1452. "name": "cc_reflectionProbePlanarMap",
  1453. "defines": [
  1454. "CC_USE_REFLECTION_PROBE"
  1455. ]
  1456. },
  1457. {
  1458. "name": "cc_reflectionProbeDataMap",
  1459. "defines": [
  1460. "CC_USE_REFLECTION_PROBE"
  1461. ]
  1462. },
  1463. {
  1464. "name": "cc_reflectionProbeBlendCubemap",
  1465. "defines": [
  1466. "CC_USE_REFLECTION_PROBE"
  1467. ]
  1468. },
  1469. {
  1470. "name": "cc_lightingMap",
  1471. "defines": [
  1472. "CC_USE_LIGHTMAP",
  1473. "!CC_FORWARD_ADD"
  1474. ]
  1475. }
  1476. ],
  1477. "buffers": [],
  1478. "images": []
  1479. },
  1480. "statistics": {
  1481. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 91,
  1482. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 121
  1483. }
  1484. },
  1485. "defines": [
  1486. {
  1487. "name": "CC_USE_LIGHTMAP",
  1488. "type": "boolean",
  1489. "defines": []
  1490. },
  1491. {
  1492. "name": "CC_USE_SKINNING",
  1493. "type": "boolean",
  1494. "defines": []
  1495. },
  1496. {
  1497. "name": "CC_USE_BAKED_ANIMATION",
  1498. "type": "boolean",
  1499. "defines": []
  1500. },
  1501. {
  1502. "name": "CC_RECEIVE_SHADOW",
  1503. "type": "boolean",
  1504. "defines": []
  1505. },
  1506. {
  1507. "name": "CC_USE_REFLECTION_PROBE",
  1508. "type": "number",
  1509. "defines": [],
  1510. "range": [
  1511. 0,
  1512. 3
  1513. ]
  1514. },
  1515. {
  1516. "name": "CC_USE_LIGHT_PROBE",
  1517. "type": "boolean",
  1518. "defines": [],
  1519. "default": 0
  1520. },
  1521. {
  1522. "name": "CC_USE_MORPH",
  1523. "type": "boolean",
  1524. "defines": []
  1525. },
  1526. {
  1527. "name": "CC_FORWARD_ADD",
  1528. "type": "boolean",
  1529. "defines": []
  1530. },
  1531. {
  1532. "name": "CC_USE_FOG",
  1533. "type": "number",
  1534. "defines": [],
  1535. "range": [
  1536. 0,
  1537. 4
  1538. ]
  1539. },
  1540. {
  1541. "name": "CC_USE_ACCURATE_FOG",
  1542. "type": "boolean",
  1543. "defines": [
  1544. "CC_USE_FOG"
  1545. ]
  1546. },
  1547. {
  1548. "name": "CC_SURFACES_TRANSFER_CLIP_POS",
  1549. "type": "boolean",
  1550. "defines": []
  1551. },
  1552. {
  1553. "name": "CC_MORPH_TARGET_COUNT",
  1554. "type": "number",
  1555. "defines": [
  1556. "CC_USE_MORPH"
  1557. ],
  1558. "range": [
  1559. 2,
  1560. 8
  1561. ]
  1562. },
  1563. {
  1564. "name": "CC_MORPH_TARGET_HAS_POSITION",
  1565. "type": "boolean",
  1566. "defines": [
  1567. "CC_USE_MORPH"
  1568. ]
  1569. },
  1570. {
  1571. "name": "CC_MORPH_TARGET_HAS_NORMAL",
  1572. "type": "boolean",
  1573. "defines": [
  1574. "CC_USE_MORPH"
  1575. ]
  1576. },
  1577. {
  1578. "name": "CC_MORPH_TARGET_HAS_TANGENT",
  1579. "type": "boolean",
  1580. "defines": [
  1581. "CC_USE_MORPH"
  1582. ]
  1583. },
  1584. {
  1585. "name": "CC_USE_REAL_TIME_JOINT_TEXTURE",
  1586. "type": "boolean",
  1587. "defines": [
  1588. "CC_USE_SKINNING",
  1589. "!CC_USE_BAKED_ANIMATION"
  1590. ]
  1591. },
  1592. {
  1593. "name": "CC_DISABLE_STRUCTURE_IN_FRAGMENT_SHADER",
  1594. "type": "number",
  1595. "defines": [],
  1596. "range": [
  1597. 0,
  1598. 1
  1599. ]
  1600. },
  1601. {
  1602. "name": "CC_PIPELINE_TYPE",
  1603. "type": "number",
  1604. "defines": [],
  1605. "range": [
  1606. 0,
  1607. 1
  1608. ]
  1609. },
  1610. {
  1611. "name": "CC_FORCE_FORWARD_SHADING",
  1612. "type": "boolean",
  1613. "defines": [
  1614. "CC_PIPELINE_TYPE"
  1615. ]
  1616. },
  1617. {
  1618. "name": "CC_ENABLE_CLUSTERED_LIGHT_CULLING",
  1619. "type": "number",
  1620. "defines": [
  1621. "CC_FORWARD_ADD"
  1622. ],
  1623. "range": [
  1624. 0,
  1625. 3
  1626. ]
  1627. },
  1628. {
  1629. "name": "CC_SUPPORT_CASCADED_SHADOW_MAP",
  1630. "type": "boolean",
  1631. "defines": []
  1632. },
  1633. {
  1634. "name": "CC_USE_IBL",
  1635. "type": "number",
  1636. "defines": [],
  1637. "range": [
  1638. 0,
  1639. 2
  1640. ]
  1641. },
  1642. {
  1643. "name": "CC_USE_DIFFUSEMAP",
  1644. "type": "number",
  1645. "defines": [
  1646. "CC_USE_IBL"
  1647. ],
  1648. "range": [
  1649. 0,
  1650. 2
  1651. ]
  1652. },
  1653. {
  1654. "name": "CC_USE_HDR",
  1655. "type": "boolean",
  1656. "defines": []
  1657. },
  1658. {
  1659. "name": "CC_USE_DEBUG_VIEW",
  1660. "type": "number",
  1661. "defines": [],
  1662. "range": [
  1663. 0,
  1664. 3
  1665. ]
  1666. },
  1667. {
  1668. "name": "CC_SURFACES_ENABLE_DEBUG_VIEW",
  1669. "type": "boolean",
  1670. "defines": [
  1671. "CC_USE_DEBUG_VIEW",
  1672. "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC"
  1673. ]
  1674. },
  1675. {
  1676. "name": "CC_TONE_MAPPING_TYPE",
  1677. "type": "number",
  1678. "defines": [
  1679. "CC_USE_HDR"
  1680. ],
  1681. "range": [
  1682. 0,
  1683. 3
  1684. ]
  1685. },
  1686. {
  1687. "name": "HDR_TONE_MAPPING_ACES",
  1688. "type": "boolean",
  1689. "defines": [
  1690. "CC_TONE_MAPPING_TYPE",
  1691. "CC_USE_HDR"
  1692. ]
  1693. },
  1694. {
  1695. "name": "BLEND_ENV_MAP",
  1696. "type": "boolean",
  1697. "defines": []
  1698. },
  1699. {
  1700. "name": "USE_RGBE_CUBEMAP",
  1701. "type": "boolean",
  1702. "defines": []
  1703. },
  1704. {
  1705. "name": "CC_USE_RGBE_OUTPUT",
  1706. "type": "boolean",
  1707. "defines": []
  1708. }
  1709. ],
  1710. "name": "advanced/sky|sky-vs|sky-fs"
  1711. }
  1712. ],
  1713. "combinations": [],
  1714. "hideInEditor": false
  1715. }