e38f81af-70ec-4f7a-b377-767b0ec76377.json 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "particles/builtin-particle-xr-trail",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "name": "add",
  10. "passes": [
  11. {
  12. "rasterizerState": {
  13. "cullMode": 0
  14. },
  15. "blendState": {
  16. "targets": [
  17. {
  18. "blend": true,
  19. "blendSrc": 2,
  20. "blendDst": 4,
  21. "blendSrcAlpha": 2,
  22. "blendDstAlpha": 4
  23. }
  24. ]
  25. },
  26. "program": "particles/builtin-particle-xr-trail|builtin/internal/particle-trail:vs_main|tinted-fs:add",
  27. "depthStencilState": {
  28. "depthTest": true,
  29. "depthWrite": false
  30. },
  31. "properties": {
  32. "mainTexture": {
  33. "value": "white",
  34. "type": 28
  35. },
  36. "mainTiling_Offset": {
  37. "value": [
  38. 1,
  39. 1,
  40. 0,
  41. 0
  42. ],
  43. "type": 16
  44. },
  45. "frameTile_velLenScale": {
  46. "value": [
  47. 1,
  48. 1,
  49. 0,
  50. 0
  51. ],
  52. "type": 16
  53. },
  54. "tintColor": {
  55. "value": [
  56. 0.5,
  57. 0.5,
  58. 0.5,
  59. 0.5
  60. ],
  61. "editor": {
  62. "type": "color"
  63. },
  64. "type": 16
  65. }
  66. }
  67. },
  68. {
  69. "phase": "deferred-forward",
  70. "rasterizerState": {
  71. "cullMode": 0
  72. },
  73. "blendState": {
  74. "targets": [
  75. {
  76. "blend": true,
  77. "blendSrc": 2,
  78. "blendDst": 4,
  79. "blendSrcAlpha": 2,
  80. "blendDstAlpha": 4
  81. }
  82. ]
  83. },
  84. "propertyIndex": 0,
  85. "program": "particles/builtin-particle-xr-trail|builtin/internal/particle-trail:vs_main|tinted-fs:add",
  86. "depthStencilState": {
  87. "depthTest": true,
  88. "depthWrite": false
  89. }
  90. }
  91. ]
  92. }
  93. ],
  94. "shaders": [
  95. {
  96. "blocks": [
  97. {
  98. "name": "Constants",
  99. "members": [
  100. {
  101. "name": "mainTiling_Offset",
  102. "type": 16,
  103. "count": 1
  104. },
  105. {
  106. "name": "frameTile_velLenScale",
  107. "type": 16,
  108. "count": 1
  109. },
  110. {
  111. "name": "scale",
  112. "type": 16,
  113. "count": 1
  114. },
  115. {
  116. "name": "nodeRotation",
  117. "type": 16,
  118. "count": 1
  119. }
  120. ],
  121. "defines": [],
  122. "stageFlags": 1,
  123. "binding": 0
  124. },
  125. {
  126. "name": "FragConstants",
  127. "members": [
  128. {
  129. "name": "tintColor",
  130. "type": 16,
  131. "count": 1
  132. }
  133. ],
  134. "defines": [],
  135. "stageFlags": 16,
  136. "binding": 1
  137. }
  138. ],
  139. "samplerTextures": [
  140. {
  141. "name": "mainTexture",
  142. "type": 28,
  143. "count": 1,
  144. "defines": [],
  145. "stageFlags": 16,
  146. "binding": 2
  147. }
  148. ],
  149. "samplers": [],
  150. "textures": [],
  151. "buffers": [],
  152. "images": [],
  153. "subpassInputs": [],
  154. "attributes": [
  155. {
  156. "name": "a_position",
  157. "defines": [],
  158. "format": 32,
  159. "location": 0
  160. },
  161. {
  162. "name": "a_texCoord",
  163. "defines": [],
  164. "format": 44,
  165. "location": 1
  166. },
  167. {
  168. "name": "a_texCoord1",
  169. "defines": [],
  170. "format": 32,
  171. "location": 2
  172. },
  173. {
  174. "name": "a_texCoord2",
  175. "defines": [],
  176. "format": 32,
  177. "location": 3
  178. },
  179. {
  180. "name": "a_color",
  181. "defines": [],
  182. "format": 44,
  183. "location": 4
  184. }
  185. ],
  186. "varyings": [
  187. {
  188. "name": "uv",
  189. "type": 14,
  190. "count": 1,
  191. "defines": [],
  192. "stageFlags": 17,
  193. "location": 0
  194. },
  195. {
  196. "name": "color",
  197. "type": 16,
  198. "count": 1,
  199. "defines": [],
  200. "stageFlags": 17,
  201. "location": 1
  202. },
  203. {
  204. "name": "vBarycentric",
  205. "type": 15,
  206. "count": 1,
  207. "defines": [
  208. "CC_DRAW_WIRE_FRAME"
  209. ],
  210. "stageFlags": 17,
  211. "location": 2
  212. }
  213. ],
  214. "fragColors": [
  215. {
  216. "name": "cc_FragColor",
  217. "typename": "vec4",
  218. "type": 16,
  219. "count": 1,
  220. "defines": [],
  221. "stageFlags": 16,
  222. "location": 0
  223. }
  224. ],
  225. "descriptors": [
  226. {
  227. "rate": 0,
  228. "blocks": [
  229. {
  230. "tags": {
  231. "builtin": "local"
  232. },
  233. "name": "CCLocal",
  234. "members": [
  235. {
  236. "name": "cc_matWorld",
  237. "typename": "mat4",
  238. "type": 25,
  239. "count": 1,
  240. "precision": "highp "
  241. },
  242. {
  243. "name": "cc_matWorldIT",
  244. "typename": "mat4",
  245. "type": 25,
  246. "count": 1,
  247. "precision": "highp "
  248. },
  249. {
  250. "name": "cc_lightingMapUVParam",
  251. "typename": "vec4",
  252. "type": 16,
  253. "count": 1,
  254. "precision": "highp "
  255. },
  256. {
  257. "name": "cc_localShadowBias",
  258. "typename": "vec4",
  259. "type": 16,
  260. "count": 1,
  261. "precision": "highp "
  262. },
  263. {
  264. "name": "cc_reflectionProbeData1",
  265. "typename": "vec4",
  266. "type": 16,
  267. "count": 1,
  268. "precision": "highp "
  269. },
  270. {
  271. "name": "cc_reflectionProbeData2",
  272. "typename": "vec4",
  273. "type": 16,
  274. "count": 1,
  275. "precision": "highp "
  276. },
  277. {
  278. "name": "cc_reflectionProbeBlendData1",
  279. "typename": "vec4",
  280. "type": 16,
  281. "count": 1,
  282. "precision": "highp "
  283. },
  284. {
  285. "name": "cc_reflectionProbeBlendData2",
  286. "typename": "vec4",
  287. "type": 16,
  288. "count": 1,
  289. "precision": "highp "
  290. }
  291. ],
  292. "defines": [],
  293. "stageFlags": 1
  294. }
  295. ],
  296. "samplerTextures": [],
  297. "samplers": [],
  298. "textures": [],
  299. "buffers": [],
  300. "images": [],
  301. "subpassInputs": []
  302. },
  303. {
  304. "rate": 1,
  305. "blocks": [
  306. {
  307. "name": "Constants",
  308. "members": [
  309. {
  310. "name": "mainTiling_Offset",
  311. "type": 16,
  312. "count": 1
  313. },
  314. {
  315. "name": "frameTile_velLenScale",
  316. "type": 16,
  317. "count": 1
  318. },
  319. {
  320. "name": "scale",
  321. "type": 16,
  322. "count": 1
  323. },
  324. {
  325. "name": "nodeRotation",
  326. "type": 16,
  327. "count": 1
  328. }
  329. ],
  330. "defines": [],
  331. "stageFlags": 1,
  332. "binding": 0
  333. },
  334. {
  335. "name": "FragConstants",
  336. "members": [
  337. {
  338. "name": "tintColor",
  339. "type": 16,
  340. "count": 1
  341. }
  342. ],
  343. "defines": [],
  344. "stageFlags": 16,
  345. "binding": 1
  346. }
  347. ],
  348. "samplerTextures": [
  349. {
  350. "name": "mainTexture",
  351. "type": 28,
  352. "count": 1,
  353. "defines": [],
  354. "stageFlags": 16,
  355. "binding": 2
  356. }
  357. ],
  358. "samplers": [],
  359. "textures": [],
  360. "buffers": [],
  361. "images": [],
  362. "subpassInputs": []
  363. },
  364. {
  365. "rate": 2,
  366. "blocks": [],
  367. "samplerTextures": [],
  368. "samplers": [],
  369. "textures": [],
  370. "buffers": [],
  371. "images": [],
  372. "subpassInputs": []
  373. },
  374. {
  375. "rate": 3,
  376. "blocks": [
  377. {
  378. "tags": {
  379. "builtin": "global"
  380. },
  381. "name": "CCGlobal",
  382. "members": [
  383. {
  384. "name": "cc_time",
  385. "typename": "vec4",
  386. "type": 16,
  387. "count": 1,
  388. "precision": "highp "
  389. },
  390. {
  391. "name": "cc_screenSize",
  392. "typename": "vec4",
  393. "type": 16,
  394. "count": 1,
  395. "precision": "mediump "
  396. },
  397. {
  398. "name": "cc_nativeSize",
  399. "typename": "vec4",
  400. "type": 16,
  401. "count": 1,
  402. "precision": "mediump "
  403. },
  404. {
  405. "name": "cc_probeInfo",
  406. "typename": "vec4",
  407. "type": 16,
  408. "count": 1,
  409. "precision": "mediump "
  410. },
  411. {
  412. "name": "cc_debug_view_mode",
  413. "typename": "vec4",
  414. "type": 16,
  415. "count": 1,
  416. "precision": "mediump "
  417. }
  418. ],
  419. "defines": [],
  420. "stageFlags": 17
  421. },
  422. {
  423. "tags": {
  424. "builtin": "global"
  425. },
  426. "name": "CCCamera",
  427. "members": [
  428. {
  429. "name": "cc_matView",
  430. "typename": "mat4",
  431. "type": 25,
  432. "count": 1,
  433. "precision": "highp "
  434. },
  435. {
  436. "name": "cc_matViewInv",
  437. "typename": "mat4",
  438. "type": 25,
  439. "count": 1,
  440. "precision": "highp "
  441. },
  442. {
  443. "name": "cc_matProj",
  444. "typename": "mat4",
  445. "type": 25,
  446. "count": 1,
  447. "precision": "highp "
  448. },
  449. {
  450. "name": "cc_matProjInv",
  451. "typename": "mat4",
  452. "type": 25,
  453. "count": 1,
  454. "precision": "highp "
  455. },
  456. {
  457. "name": "cc_matViewProj",
  458. "typename": "mat4",
  459. "type": 25,
  460. "count": 1,
  461. "precision": "highp "
  462. },
  463. {
  464. "name": "cc_matViewProjInv",
  465. "typename": "mat4",
  466. "type": 25,
  467. "count": 1,
  468. "precision": "highp "
  469. },
  470. {
  471. "name": "cc_cameraPos",
  472. "typename": "vec4",
  473. "type": 16,
  474. "count": 1,
  475. "precision": "highp "
  476. },
  477. {
  478. "name": "cc_surfaceTransform",
  479. "typename": "vec4",
  480. "type": 16,
  481. "count": 1,
  482. "precision": "mediump "
  483. },
  484. {
  485. "name": "cc_screenScale",
  486. "typename": "vec4",
  487. "type": 16,
  488. "count": 1,
  489. "precision": "mediump "
  490. },
  491. {
  492. "name": "cc_exposure",
  493. "typename": "vec4",
  494. "type": 16,
  495. "count": 1,
  496. "precision": "mediump "
  497. },
  498. {
  499. "name": "cc_mainLitDir",
  500. "typename": "vec4",
  501. "type": 16,
  502. "count": 1,
  503. "precision": "mediump "
  504. },
  505. {
  506. "name": "cc_mainLitColor",
  507. "typename": "vec4",
  508. "type": 16,
  509. "count": 1,
  510. "precision": "mediump "
  511. },
  512. {
  513. "name": "cc_ambientSky",
  514. "typename": "vec4",
  515. "type": 16,
  516. "count": 1,
  517. "precision": "mediump "
  518. },
  519. {
  520. "name": "cc_ambientGround",
  521. "typename": "vec4",
  522. "type": 16,
  523. "count": 1,
  524. "precision": "mediump "
  525. },
  526. {
  527. "name": "cc_fogColor",
  528. "typename": "vec4",
  529. "type": 16,
  530. "count": 1,
  531. "precision": "mediump "
  532. },
  533. {
  534. "name": "cc_fogBase",
  535. "typename": "vec4",
  536. "type": 16,
  537. "count": 1,
  538. "precision": "mediump "
  539. },
  540. {
  541. "name": "cc_fogAdd",
  542. "typename": "vec4",
  543. "type": 16,
  544. "count": 1,
  545. "precision": "mediump "
  546. },
  547. {
  548. "name": "cc_nearFar",
  549. "typename": "vec4",
  550. "type": 16,
  551. "count": 1,
  552. "precision": "mediump "
  553. },
  554. {
  555. "name": "cc_viewPort",
  556. "typename": "vec4",
  557. "type": 16,
  558. "count": 1,
  559. "precision": "mediump "
  560. }
  561. ],
  562. "defines": [],
  563. "stageFlags": 17
  564. }
  565. ],
  566. "samplerTextures": [],
  567. "samplers": [],
  568. "textures": [],
  569. "buffers": [],
  570. "images": [],
  571. "subpassInputs": []
  572. }
  573. ],
  574. "hash": 2100859085,
  575. "glsl4": {
  576. "vert": "\nprecision mediump float;\nlayout(set = 1, binding = 0) uniform Constants {\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n vec4 nodeRotation;\n};\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(set = 2, binding = 0) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nlayout(location = 0) out mediump vec2 uv;\nlayout(location = 1) out mediump vec4 color;\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec4 a_texCoord;\nlayout(location = 2) in vec3 a_texCoord1;\nlayout(location = 3) in vec3 a_texCoord2;\nlayout(location = 4) in vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n layout(location = 2) out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n #if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n #endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n #if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n #endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }",
  577. "frag": "\n precision mediump float;\n layout(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 };\n layout(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 vec4 CCFragOutput (vec4 color) {\n return color;\n }\n layout(location = 0) in vec2 uv;\n layout(location = 1) in vec4 color;\n #if CC_DRAW_WIRE_FRAME\n layout(location = 2) in vec3 vBarycentric;\n #endif\n layout(set = 1, binding = 2) uniform sampler2D mainTexture;\n layout(set = 1, binding = 1) uniform FragConstants {\n vec4 tintColor;\n };\n vec4 add () {\n vec4 col = 2.0 * color * tintColor * texture(mainTexture, uv);\n#if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., 1.);\n }\n#endif\n return CCFragOutput(col);\n }\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = add(); }"
  578. },
  579. "glsl3": {
  580. "vert": "\nprecision mediump float;\nlayout(std140) uniform Constants {\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n vec4 nodeRotation;\n};\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(std140) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n highp vec4 cc_reflectionProbeBlendData1;\n highp vec4 cc_reflectionProbeBlendData2;\n};\nout mediump vec2 uv;\nout mediump vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n #if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n #endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n #if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n #endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }",
  581. "frag": "\n precision mediump float;\n layout(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 };\n layout(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 vec4 CCFragOutput (vec4 color) {\n return color;\n }\n in vec2 uv;\n in vec4 color;\n #if CC_DRAW_WIRE_FRAME\n in vec3 vBarycentric;\n #endif\n uniform sampler2D mainTexture;\n layout(std140) uniform FragConstants {\n vec4 tintColor;\n };\n vec4 add () {\n vec4 col = 2.0 * color * tintColor * texture(mainTexture, uv);\n#if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., 1.);\n }\n#endif\n return CCFragOutput(col);\n }\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = add(); }"
  582. },
  583. "glsl1": {
  584. "vert": "\nprecision mediump float;\n uniform vec4 mainTiling_Offset;\nuniform highp mat4 cc_matViewProj;\n uniform highp vec4 cc_cameraPos;\nuniform highp mat4 cc_matWorld;\nvarying mediump vec2 uv;\nvarying mediump vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n #if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n #endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n #if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n #endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }",
  585. "frag": "\n precision mediump float;\n vec4 CCFragOutput (vec4 color) {\n return color;\n }\n varying vec2 uv;\n varying vec4 color;\n #if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n #endif\n uniform sampler2D mainTexture;\n uniform vec4 tintColor;\n vec4 add () {\n vec4 col = 2.0 * color * tintColor * texture2D(mainTexture, uv);\n#if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., 1.);\n }\n#endif\n return CCFragOutput(col);\n }\nvoid main() { gl_FragColor = add(); }"
  586. },
  587. "builtins": {
  588. "globals": {
  589. "blocks": [
  590. {
  591. "name": "CCGlobal",
  592. "defines": []
  593. },
  594. {
  595. "name": "CCCamera",
  596. "defines": []
  597. }
  598. ],
  599. "samplerTextures": [],
  600. "buffers": [],
  601. "images": []
  602. },
  603. "locals": {
  604. "blocks": [
  605. {
  606. "name": "CCLocal",
  607. "defines": []
  608. }
  609. ],
  610. "samplerTextures": [],
  611. "buffers": [],
  612. "images": []
  613. },
  614. "statistics": {
  615. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 60,
  616. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 43
  617. }
  618. },
  619. "defines": [
  620. {
  621. "name": "CC_RENDER_MODE",
  622. "type": "number",
  623. "defines": [],
  624. "range": [
  625. 0,
  626. 4
  627. ]
  628. },
  629. {
  630. "name": "CC_DRAW_WIRE_FRAME",
  631. "type": "boolean",
  632. "defines": []
  633. },
  634. {
  635. "name": "CC_USE_WORLD_SPACE",
  636. "type": "boolean",
  637. "defines": []
  638. }
  639. ],
  640. "name": "particles/builtin-particle-xr-trail|builtin/internal/particle-trail:vs_main|tinted-fs:add"
  641. }
  642. ],
  643. "combinations": [],
  644. "hideInEditor": false
  645. }