debug.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. [
  2. 1,
  3. 0,
  4. 0,
  5. [
  6. [
  7. "cc.EffectAsset",
  8. [
  9. "_name",
  10. "shaders",
  11. "techniques"
  12. ],
  13. 0
  14. ]
  15. ],
  16. [
  17. [
  18. 0,
  19. 0,
  20. 1,
  21. 2,
  22. 4
  23. ]
  24. ],
  25. [
  26. [
  27. 0,
  28. "util/splash-screen",
  29. [
  30. {
  31. "hash": 3189094080,
  32. "name": "util/splash-screen|splash-screen-vs:vert|splash-screen-fs:frag",
  33. "blocks": [
  34. {
  35. "name": "Constant",
  36. "stageFlags": 1,
  37. "binding": 0,
  38. "members": [
  39. {
  40. "name": "u_buffer0",
  41. "type": 16,
  42. "count": 1
  43. },
  44. {
  45. "name": "u_buffer1",
  46. "type": 16,
  47. "count": 1
  48. },
  49. {
  50. "name": "u_projection",
  51. "type": 25,
  52. "count": 1
  53. }
  54. ],
  55. "defines": []
  56. },
  57. {
  58. "name": "Factor",
  59. "stageFlags": 16,
  60. "binding": 1,
  61. "members": [
  62. {
  63. "name": "u_percent",
  64. "type": 13,
  65. "count": 1
  66. }
  67. ],
  68. "defines": []
  69. }
  70. ],
  71. "samplerTextures": [
  72. {
  73. "name": "mainTexture",
  74. "type": 28,
  75. "count": 1,
  76. "stageFlags": 16,
  77. "binding": 2,
  78. "defines": []
  79. }
  80. ],
  81. "samplers": [],
  82. "textures": [],
  83. "buffers": [],
  84. "images": [],
  85. "subpassInputs": [],
  86. "attributes": [
  87. {
  88. "name": "a_position",
  89. "format": 21,
  90. "location": 0,
  91. "defines": []
  92. },
  93. {
  94. "name": "a_texCoord",
  95. "format": 21,
  96. "location": 1,
  97. "defines": []
  98. }
  99. ],
  100. "fragColors": [
  101. {
  102. "name": "cc_FragColor",
  103. "typename": "vec4",
  104. "type": 16,
  105. "count": 1,
  106. "stageFlags": 16,
  107. "location": 0,
  108. "defines": []
  109. }
  110. ],
  111. "descriptors": [
  112. {
  113. "rate": 0,
  114. "blocks": [],
  115. "samplerTextures": [],
  116. "samplers": [],
  117. "textures": [],
  118. "buffers": [],
  119. "images": [],
  120. "subpassInputs": []
  121. },
  122. {
  123. "rate": 1,
  124. "blocks": [
  125. {
  126. "name": "Constant",
  127. "stageFlags": 1,
  128. "binding": 0,
  129. "members": [
  130. {
  131. "name": "u_buffer0",
  132. "type": 16,
  133. "count": 1
  134. },
  135. {
  136. "name": "u_buffer1",
  137. "type": 16,
  138. "count": 1
  139. },
  140. {
  141. "name": "u_projection",
  142. "type": 25,
  143. "count": 1
  144. }
  145. ],
  146. "defines": []
  147. },
  148. {
  149. "name": "Factor",
  150. "stageFlags": 16,
  151. "binding": 1,
  152. "members": [
  153. {
  154. "name": "u_percent",
  155. "type": 13,
  156. "count": 1
  157. }
  158. ],
  159. "defines": []
  160. }
  161. ],
  162. "samplerTextures": [
  163. {
  164. "name": "mainTexture",
  165. "type": 28,
  166. "count": 1,
  167. "stageFlags": 16,
  168. "binding": 2,
  169. "defines": []
  170. }
  171. ],
  172. "samplers": [],
  173. "textures": [],
  174. "buffers": [],
  175. "images": [],
  176. "subpassInputs": []
  177. },
  178. {
  179. "rate": 2,
  180. "blocks": [],
  181. "samplerTextures": [],
  182. "samplers": [],
  183. "textures": [],
  184. "buffers": [],
  185. "images": [],
  186. "subpassInputs": []
  187. },
  188. {
  189. "rate": 3,
  190. "blocks": [],
  191. "samplerTextures": [],
  192. "samplers": [],
  193. "textures": [],
  194. "buffers": [],
  195. "images": [],
  196. "subpassInputs": []
  197. }
  198. ],
  199. "glsl3": {
  200. "vert": "\nprecision mediump float;\nin vec2 a_position;\nin vec2 a_texCoord;\nout vec2 v_uv;\nlayout(std140) uniform Constant {\n vec4 u_buffer0;\n vec4 u_buffer1;\n mat4 u_projection;\n};\nvec4 vert () {\n vec2 worldPos = a_position * u_buffer1.xy + u_buffer1.zw;\n vec2 clipSpace = worldPos / u_buffer0.xy * 2.0 - 1.0;\n vec4 screenPos = u_projection * vec4(clipSpace, 0.0, 1.0);\n v_uv = a_texCoord;\n return screenPos;\n}\nvoid main() { gl_Position = vert(); }",
  201. "frag": "\nprecision mediump float;\nin vec2 v_uv;\nlayout(std140) uniform Factor {\n float u_percent;\n};\nuniform sampler2D mainTexture;\nvec4 frag () {\n vec4 color = texture(mainTexture, v_uv);\n float percent = clamp(u_percent, 0.0, 1.0);\n color.xyz *= percent;\n return color;\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  202. },
  203. "glsl1": {
  204. "vert": "\nprecision mediump float;\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nvarying vec2 v_uv;\n uniform vec4 u_buffer0;\n uniform vec4 u_buffer1;\n uniform mat4 u_projection;\nvec4 vert () {\n vec2 worldPos = a_position * u_buffer1.xy + u_buffer1.zw;\n vec2 clipSpace = worldPos / u_buffer0.xy * 2.0 - 1.0;\n vec4 screenPos = u_projection * vec4(clipSpace, 0.0, 1.0);\n v_uv = a_texCoord;\n return screenPos;\n}\nvoid main() { gl_Position = vert(); }",
  205. "frag": "\nprecision mediump float;\nvarying vec2 v_uv;\n uniform float u_percent;\nuniform sampler2D mainTexture;\nvec4 frag () {\n vec4 color = texture2D(mainTexture, v_uv);\n float percent = clamp(u_percent, 0.0, 1.0);\n color.xyz *= percent;\n return color;\n}\nvoid main() { gl_FragColor = frag(); }"
  206. },
  207. "builtins": {
  208. "globals": {
  209. "blocks": [],
  210. "samplerTextures": [],
  211. "buffers": [],
  212. "images": []
  213. },
  214. "locals": {
  215. "blocks": [],
  216. "samplerTextures": [],
  217. "buffers": [],
  218. "images": []
  219. },
  220. "statistics": {
  221. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 6,
  222. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 1
  223. }
  224. },
  225. "defines": []
  226. }
  227. ],
  228. [
  229. {
  230. "name": "default",
  231. "passes": [
  232. {
  233. "program": "util/splash-screen|splash-screen-vs:vert|splash-screen-fs:frag",
  234. "blendState": {
  235. "targets": [
  236. {
  237. "blend": true,
  238. "blendSrc": 2,
  239. "blendDst": 4,
  240. "blendDstAlpha": 4
  241. }
  242. ]
  243. },
  244. "rasterizerState": {
  245. "cullMode": 0
  246. },
  247. "depthStencilState": {
  248. "depthTest": false,
  249. "depthWrite": false
  250. },
  251. "properties": {
  252. "mainTexture": {
  253. "value": "grey",
  254. "type": 28
  255. },
  256. "resolution": {
  257. "type": 14,
  258. "value": [
  259. 640,
  260. 960
  261. ],
  262. "handleInfo": [
  263. "u_buffer0",
  264. 0,
  265. 14
  266. ]
  267. },
  268. "percent": {
  269. "type": 13,
  270. "value": [
  271. 0.5
  272. ],
  273. "handleInfo": [
  274. "u_percent",
  275. 0,
  276. 13
  277. ]
  278. },
  279. "scale": {
  280. "type": 14,
  281. "value": [
  282. 200,
  283. 500
  284. ],
  285. "handleInfo": [
  286. "u_buffer1",
  287. 0,
  288. 14
  289. ]
  290. },
  291. "translate": {
  292. "type": 14,
  293. "value": [
  294. 320,
  295. 480
  296. ],
  297. "handleInfo": [
  298. "u_buffer1",
  299. 2,
  300. 14
  301. ]
  302. },
  303. "u_buffer0": {
  304. "type": 16,
  305. "value": [
  306. 640,
  307. 960,
  308. 0,
  309. 0
  310. ]
  311. },
  312. "u_percent": {
  313. "type": 13,
  314. "value": [
  315. 0.5
  316. ]
  317. },
  318. "u_buffer1": {
  319. "type": 16,
  320. "value": [
  321. 200,
  322. 500,
  323. 320,
  324. 480
  325. ]
  326. }
  327. }
  328. }
  329. ]
  330. }
  331. ]
  332. ]
  333. ],
  334. 0,
  335. 0,
  336. [],
  337. [],
  338. []
  339. ]