2a7c0036-e0b3-4fe1-8998-89a54b8a2bec.json 27 KB

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