970b0598-bcb0-4714-91fb-2e81440dccd8.json 9.9 KB

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