9b4d3fa5-89bf-4715-b69a-dbbd1efaf6a5.json 18 KB

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