6ef1defe-7997-477a-9b35-c18859ff8066.json 16 KB

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