1c02ae6f-4492-4915-b8f8-7492a3b1e4cd.json 16 KB

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