871c3b6c-7379-419d-bda3-794b239ab90d.json 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "util/profiler",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "passes": [
  10. {
  11. "blendState": {
  12. "targets": [
  13. {
  14. "blend": true,
  15. "blendSrc": 2,
  16. "blendDst": 4,
  17. "blendDstAlpha": 4
  18. }
  19. ]
  20. },
  21. "rasterizerState": {
  22. "cullMode": 0
  23. },
  24. "program": "util/profiler|profiler-vs:vert|profiler-fs:frag",
  25. "priority": 255,
  26. "depthStencilState": {
  27. "depthTest": false,
  28. "depthWrite": false
  29. }
  30. }
  31. ]
  32. }
  33. ],
  34. "shaders": [
  35. {
  36. "blocks": [
  37. {
  38. "name": "Constants",
  39. "members": [
  40. {
  41. "name": "offset",
  42. "type": 16,
  43. "count": 1
  44. }
  45. ],
  46. "defines": [],
  47. "stageFlags": 1,
  48. "binding": 0
  49. },
  50. {
  51. "name": "PerFrameInfo",
  52. "members": [
  53. {
  54. "name": "digits",
  55. "type": 16,
  56. "count": 22
  57. }
  58. ],
  59. "defines": [],
  60. "stageFlags": 1,
  61. "binding": 1
  62. }
  63. ],
  64. "samplerTextures": [
  65. {
  66. "name": "mainTexture",
  67. "type": 28,
  68. "count": 1,
  69. "defines": [],
  70. "stageFlags": 16,
  71. "binding": 2
  72. }
  73. ],
  74. "samplers": [],
  75. "textures": [],
  76. "buffers": [],
  77. "images": [],
  78. "subpassInputs": [],
  79. "attributes": [
  80. {
  81. "name": "a_position",
  82. "defines": [],
  83. "format": 32,
  84. "location": 0
  85. },
  86. {
  87. "name": "a_color",
  88. "defines": [],
  89. "format": 44,
  90. "location": 1
  91. }
  92. ],
  93. "varyings": [
  94. {
  95. "name": "v_uv",
  96. "type": 14,
  97. "count": 1,
  98. "defines": [],
  99. "stageFlags": 17,
  100. "location": 0
  101. }
  102. ],
  103. "fragColors": [
  104. {
  105. "name": "cc_FragColor",
  106. "typename": "vec4",
  107. "type": 16,
  108. "count": 1,
  109. "defines": [],
  110. "stageFlags": 16,
  111. "location": 0
  112. }
  113. ],
  114. "descriptors": [
  115. {
  116. "rate": 0,
  117. "blocks": [],
  118. "samplerTextures": [],
  119. "samplers": [],
  120. "textures": [],
  121. "buffers": [],
  122. "images": [],
  123. "subpassInputs": []
  124. },
  125. {
  126. "rate": 1,
  127. "blocks": [
  128. {
  129. "name": "Constants",
  130. "members": [
  131. {
  132. "name": "offset",
  133. "type": 16,
  134. "count": 1
  135. }
  136. ],
  137. "defines": [],
  138. "stageFlags": 1,
  139. "binding": 0
  140. },
  141. {
  142. "name": "PerFrameInfo",
  143. "members": [
  144. {
  145. "name": "digits",
  146. "type": 16,
  147. "count": 22
  148. }
  149. ],
  150. "defines": [],
  151. "stageFlags": 1,
  152. "binding": 1
  153. }
  154. ],
  155. "samplerTextures": [
  156. {
  157. "name": "mainTexture",
  158. "type": 28,
  159. "count": 1,
  160. "defines": [],
  161. "stageFlags": 16,
  162. "binding": 2
  163. }
  164. ],
  165. "samplers": [],
  166. "textures": [],
  167. "buffers": [],
  168. "images": [],
  169. "subpassInputs": []
  170. },
  171. {
  172. "rate": 2,
  173. "blocks": [],
  174. "samplerTextures": [],
  175. "samplers": [],
  176. "textures": [],
  177. "buffers": [],
  178. "images": [],
  179. "subpassInputs": []
  180. },
  181. {
  182. "rate": 3,
  183. "blocks": [
  184. {
  185. "tags": {
  186. "builtin": "global"
  187. },
  188. "name": "CCGlobal",
  189. "members": [
  190. {
  191. "name": "cc_time",
  192. "typename": "vec4",
  193. "type": 16,
  194. "count": 1,
  195. "precision": "highp "
  196. },
  197. {
  198. "name": "cc_screenSize",
  199. "typename": "vec4",
  200. "type": 16,
  201. "count": 1,
  202. "precision": "mediump "
  203. },
  204. {
  205. "name": "cc_nativeSize",
  206. "typename": "vec4",
  207. "type": 16,
  208. "count": 1,
  209. "precision": "mediump "
  210. },
  211. {
  212. "name": "cc_probeInfo",
  213. "typename": "vec4",
  214. "type": 16,
  215. "count": 1,
  216. "precision": "mediump "
  217. },
  218. {
  219. "name": "cc_debug_view_mode",
  220. "typename": "vec4",
  221. "type": 16,
  222. "count": 1,
  223. "precision": "mediump "
  224. }
  225. ],
  226. "defines": [],
  227. "stageFlags": 17
  228. },
  229. {
  230. "tags": {
  231. "builtin": "global"
  232. },
  233. "name": "CCCamera",
  234. "members": [
  235. {
  236. "name": "cc_matView",
  237. "typename": "mat4",
  238. "type": 25,
  239. "count": 1,
  240. "precision": "highp "
  241. },
  242. {
  243. "name": "cc_matViewInv",
  244. "typename": "mat4",
  245. "type": 25,
  246. "count": 1,
  247. "precision": "highp "
  248. },
  249. {
  250. "name": "cc_matProj",
  251. "typename": "mat4",
  252. "type": 25,
  253. "count": 1,
  254. "precision": "highp "
  255. },
  256. {
  257. "name": "cc_matProjInv",
  258. "typename": "mat4",
  259. "type": 25,
  260. "count": 1,
  261. "precision": "highp "
  262. },
  263. {
  264. "name": "cc_matViewProj",
  265. "typename": "mat4",
  266. "type": 25,
  267. "count": 1,
  268. "precision": "highp "
  269. },
  270. {
  271. "name": "cc_matViewProjInv",
  272. "typename": "mat4",
  273. "type": 25,
  274. "count": 1,
  275. "precision": "highp "
  276. },
  277. {
  278. "name": "cc_cameraPos",
  279. "typename": "vec4",
  280. "type": 16,
  281. "count": 1,
  282. "precision": "highp "
  283. },
  284. {
  285. "name": "cc_surfaceTransform",
  286. "typename": "vec4",
  287. "type": 16,
  288. "count": 1,
  289. "precision": "mediump "
  290. },
  291. {
  292. "name": "cc_screenScale",
  293. "typename": "vec4",
  294. "type": 16,
  295. "count": 1,
  296. "precision": "mediump "
  297. },
  298. {
  299. "name": "cc_exposure",
  300. "typename": "vec4",
  301. "type": 16,
  302. "count": 1,
  303. "precision": "mediump "
  304. },
  305. {
  306. "name": "cc_mainLitDir",
  307. "typename": "vec4",
  308. "type": 16,
  309. "count": 1,
  310. "precision": "mediump "
  311. },
  312. {
  313. "name": "cc_mainLitColor",
  314. "typename": "vec4",
  315. "type": 16,
  316. "count": 1,
  317. "precision": "mediump "
  318. },
  319. {
  320. "name": "cc_ambientSky",
  321. "typename": "vec4",
  322. "type": 16,
  323. "count": 1,
  324. "precision": "mediump "
  325. },
  326. {
  327. "name": "cc_ambientGround",
  328. "typename": "vec4",
  329. "type": 16,
  330. "count": 1,
  331. "precision": "mediump "
  332. },
  333. {
  334. "name": "cc_fogColor",
  335. "typename": "vec4",
  336. "type": 16,
  337. "count": 1,
  338. "precision": "mediump "
  339. },
  340. {
  341. "name": "cc_fogBase",
  342. "typename": "vec4",
  343. "type": 16,
  344. "count": 1,
  345. "precision": "mediump "
  346. },
  347. {
  348. "name": "cc_fogAdd",
  349. "typename": "vec4",
  350. "type": 16,
  351. "count": 1,
  352. "precision": "mediump "
  353. },
  354. {
  355. "name": "cc_nearFar",
  356. "typename": "vec4",
  357. "type": 16,
  358. "count": 1,
  359. "precision": "mediump "
  360. },
  361. {
  362. "name": "cc_viewPort",
  363. "typename": "vec4",
  364. "type": 16,
  365. "count": 1,
  366. "precision": "mediump "
  367. }
  368. ],
  369. "defines": [],
  370. "stageFlags": 17
  371. }
  372. ],
  373. "samplerTextures": [],
  374. "samplers": [],
  375. "textures": [],
  376. "buffers": [],
  377. "images": [],
  378. "subpassInputs": []
  379. }
  380. ],
  381. "hash": 394204838,
  382. "glsl4": {
  383. "vert": "\nprecision mediump float;\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec4 a_color;\nlayout(location = 0) out vec2 v_uv;\nlayout(set = 1, binding = 0) uniform Constants {\n vec4 offset;\n};\nlayout(set = 1, binding = 1) uniform PerFrameInfo {\n vec4 digits[8 * 11 / 4];\n};\nfloat getComponent(vec4 v, float i) {\n if (i < 1.0) { return v.x; }\n else if (i < 2.0) { return v.y; }\n else if (i < 3.0) { return v.z; }\n else { return v.w; }\n}\nvec4 vert () {\n mat2 proj = mat2(cc_matProj[0].xy, cc_matProj[1].xy);\n proj /= abs(proj[1].x + proj[1].y);\n vec2 position = proj * a_position.xy + offset.xy;\n v_uv = a_color.xy;\n if (a_color.z >= 0.0) {\n float n = getComponent(digits[int(a_color.z)], a_color.w);\n v_uv += vec2(offset.z * n, 0.0);\n }\n return vec4(position, 0.0, 1.0);\n}\nvoid main() { gl_Position = vert(); }",
  384. "frag": "\nprecision mediump float;\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nlayout(location = 0) in vec2 v_uv;\nlayout(set = 1, binding = 2) uniform sampler2D mainTexture;\nvec4 frag () {\n return CCFragOutput(texture(mainTexture, v_uv));\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  385. },
  386. "glsl3": {
  387. "vert": "\nprecision mediump float;\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec2 v_uv;\nlayout(std140) uniform Constants {\n vec4 offset;\n};\nlayout(std140) uniform PerFrameInfo {\n vec4 digits[8 * 11 / 4];\n};\nfloat getComponent(vec4 v, float i) {\n if (i < 1.0) { return v.x; }\n else if (i < 2.0) { return v.y; }\n else if (i < 3.0) { return v.z; }\n else { return v.w; }\n}\nvec4 vert () {\n mat2 proj = mat2(cc_matProj[0].xy, cc_matProj[1].xy);\n proj /= abs(proj[1].x + proj[1].y);\n vec2 position = proj * a_position.xy + offset.xy;\n v_uv = a_color.xy;\n if (a_color.z >= 0.0) {\n float n = getComponent(digits[int(a_color.z)], a_color.w);\n v_uv += vec2(offset.z * n, 0.0);\n }\n return vec4(position, 0.0, 1.0);\n}\nvoid main() { gl_Position = vert(); }",
  388. "frag": "\nprecision mediump float;\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nin vec2 v_uv;\nuniform sampler2D mainTexture;\nvec4 frag () {\n return CCFragOutput(texture(mainTexture, v_uv));\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  389. },
  390. "glsl1": {
  391. "vert": "\nprecision mediump float;\nuniform highp mat4 cc_matProj;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec2 v_uv;\n uniform vec4 offset;\n uniform vec4 digits[22];\nfloat getComponent(vec4 v, float i) {\n if (i < 1.0) { return v.x; }\n else if (i < 2.0) { return v.y; }\n else if (i < 3.0) { return v.z; }\n else { return v.w; }\n}\nvec4 vert () {\n mat2 proj = mat2(cc_matProj[0].xy, cc_matProj[1].xy);\n proj /= abs(proj[1].x + proj[1].y);\n vec2 position = proj * a_position.xy + offset.xy;\n v_uv = a_color.xy;\n if (a_color.z >= 0.0) {\n float n = getComponent(digits[int(a_color.z)], a_color.w);\n v_uv += vec2(offset.z * n, 0.0);\n }\n return vec4(position, 0.0, 1.0);\n}\nvoid main() { gl_Position = vert(); }",
  392. "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nvarying vec2 v_uv;\nuniform sampler2D mainTexture;\nvec4 frag () {\n return CCFragOutput(texture2D(mainTexture, v_uv));\n}\nvoid main() { gl_FragColor = frag(); }"
  393. },
  394. "builtins": {
  395. "globals": {
  396. "blocks": [
  397. {
  398. "name": "CCGlobal",
  399. "defines": []
  400. },
  401. {
  402. "name": "CCCamera",
  403. "defines": []
  404. }
  405. ],
  406. "samplerTextures": [],
  407. "buffers": [],
  408. "images": []
  409. },
  410. "locals": {
  411. "blocks": [],
  412. "samplerTextures": [],
  413. "buffers": [],
  414. "images": []
  415. },
  416. "statistics": {
  417. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 65,
  418. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 42
  419. }
  420. },
  421. "defines": [],
  422. "name": "util/profiler|profiler-vs:vert|profiler-fs:frag"
  423. }
  424. ],
  425. "combinations": [],
  426. "hideInEditor": false
  427. }