ba35f02e-a81c-464c-bfc5-c788328da667.json 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "internal/editor/grid",
  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. "program": "internal/editor/grid|grid-vs:vert|grid-fs:frag",
  22. "priority": 11,
  23. "depthStencilState": {
  24. "depthTest": true,
  25. "depthWrite": false
  26. }
  27. }
  28. ]
  29. }
  30. ],
  31. "shaders": [
  32. {
  33. "blocks": [],
  34. "samplerTextures": [],
  35. "samplers": [],
  36. "textures": [],
  37. "buffers": [],
  38. "images": [],
  39. "subpassInputs": [],
  40. "attributes": [
  41. {
  42. "name": "a_position",
  43. "defines": [],
  44. "format": 21,
  45. "location": 0
  46. },
  47. {
  48. "name": "a_color",
  49. "defines": [],
  50. "format": 44,
  51. "location": 1
  52. }
  53. ],
  54. "varyings": [
  55. {
  56. "name": "color",
  57. "type": 16,
  58. "count": 1,
  59. "defines": [],
  60. "stageFlags": 17,
  61. "location": 0
  62. },
  63. {
  64. "name": "pos_w",
  65. "type": 15,
  66. "count": 1,
  67. "defines": [],
  68. "stageFlags": 17,
  69. "location": 1
  70. }
  71. ],
  72. "fragColors": [
  73. {
  74. "name": "cc_FragColor",
  75. "typename": "vec4",
  76. "type": 16,
  77. "count": 1,
  78. "defines": [],
  79. "stageFlags": 16,
  80. "location": 0
  81. }
  82. ],
  83. "descriptors": [
  84. {
  85. "rate": 0,
  86. "blocks": [
  87. {
  88. "tags": {
  89. "builtin": "local"
  90. },
  91. "name": "CCLocal",
  92. "members": [
  93. {
  94. "name": "cc_matWorld",
  95. "typename": "mat4",
  96. "type": 25,
  97. "count": 1,
  98. "precision": "highp "
  99. },
  100. {
  101. "name": "cc_matWorldIT",
  102. "typename": "mat4",
  103. "type": 25,
  104. "count": 1,
  105. "precision": "highp "
  106. },
  107. {
  108. "name": "cc_lightingMapUVParam",
  109. "typename": "vec4",
  110. "type": 16,
  111. "count": 1,
  112. "precision": "highp "
  113. },
  114. {
  115. "name": "cc_localShadowBias",
  116. "typename": "vec4",
  117. "type": 16,
  118. "count": 1,
  119. "precision": "highp "
  120. },
  121. {
  122. "name": "cc_reflectionProbeData1",
  123. "typename": "vec4",
  124. "type": 16,
  125. "count": 1,
  126. "precision": "highp "
  127. },
  128. {
  129. "name": "cc_reflectionProbeData2",
  130. "typename": "vec4",
  131. "type": 16,
  132. "count": 1,
  133. "precision": "highp "
  134. },
  135. {
  136. "name": "cc_reflectionProbeBlendData1",
  137. "typename": "vec4",
  138. "type": 16,
  139. "count": 1,
  140. "precision": "highp "
  141. },
  142. {
  143. "name": "cc_reflectionProbeBlendData2",
  144. "typename": "vec4",
  145. "type": 16,
  146. "count": 1,
  147. "precision": "highp "
  148. }
  149. ],
  150. "defines": [],
  151. "stageFlags": 1
  152. }
  153. ],
  154. "samplerTextures": [],
  155. "samplers": [],
  156. "textures": [],
  157. "buffers": [],
  158. "images": [],
  159. "subpassInputs": []
  160. },
  161. {
  162. "rate": 1,
  163. "blocks": [],
  164. "samplerTextures": [],
  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": 1213951693,
  382. "glsl4": {
  383. "vert": "\nprecision mediump float;\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(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 vec2 a_position;\nlayout(location = 1) in vec4 a_color;\nlayout(location = 0) out vec4 color;\nlayout(location = 1) out vec3 pos_w;\nvec4 vert () {\n vec4 position = vec4(a_position, 0, 1);\n vec4 pos = cc_matWorld * position;\n pos_w = pos.xyz;\n color = a_color;\n pos = cc_matProj * (cc_matView * cc_matWorld) * position;\n return pos;\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 vec4 color;\nlayout(location = 1) in vec3 pos_w;\nvec4 frag () {\n vec4 o = color;\n float scale = abs(normalize(cc_cameraPos.xyz - pos_w).y);\n if (scale < 0.5) o.a *= max(0.3, scale * 2.0);\n return CCFragOutput(o);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  385. },
  386. "glsl3": {
  387. "vert": "\nprecision mediump float;\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};\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 vec2 a_position;\nin vec4 a_color;\nout vec4 color;\nout vec3 pos_w;\nvec4 vert () {\n vec4 position = vec4(a_position, 0, 1);\n vec4 pos = cc_matWorld * position;\n pos_w = pos.xyz;\n color = a_color;\n pos = cc_matProj * (cc_matView * cc_matWorld) * position;\n return pos;\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 vec4 color;\nin vec3 pos_w;\nvec4 frag () {\n vec4 o = color;\n float scale = abs(normalize(cc_cameraPos.xyz - pos_w).y);\n if (scale < 0.5) o.a *= max(0.3, scale * 2.0);\n return CCFragOutput(o);\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_matWorld;\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\nattribute vec2 a_position;\nattribute vec4 a_color;\nvarying vec4 color;\nvarying vec3 pos_w;\nvec4 vert () {\n vec4 position = vec4(a_position, 0, 1);\n vec4 pos = cc_matWorld * position;\n pos_w = pos.xyz;\n color = a_color;\n pos = cc_matProj * (cc_matView * cc_matWorld) * position;\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  392. "frag": "\nprecision mediump float;\nuniform highp vec4 cc_cameraPos;\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nvarying vec4 color;\nvarying vec3 pos_w;\nvec4 frag () {\n vec4 o = color;\n float scale = abs(normalize(cc_cameraPos.xyz - pos_w).y);\n if (scale < 0.5) o.a *= max(0.3, scale * 2.0);\n return CCFragOutput(o);\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. {
  413. "name": "CCLocal",
  414. "defines": []
  415. }
  416. ],
  417. "samplerTextures": [],
  418. "buffers": [],
  419. "images": []
  420. },
  421. "statistics": {
  422. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 56,
  423. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 42
  424. }
  425. },
  426. "defines": [],
  427. "name": "internal/editor/grid|grid-vs:vert|grid-fs:frag"
  428. }
  429. ],
  430. "combinations": [],
  431. "hideInEditor": true
  432. }