a3e72674-c38f-4336-a285-1826b1799cd7.json 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "internal/editor/terrain-circle-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-circle-brush|terrain-brush-vs:vert|terrain-brush-fs:frag",
  23. "depthStencilState": {
  24. "depthTest": true,
  25. "depthWrite": false
  26. },
  27. "properties": {
  28. "BrushPos": {
  29. "value": [
  30. 0,
  31. 0,
  32. 0,
  33. 1
  34. ],
  35. "type": 16
  36. },
  37. "BrushParams": {
  38. "value": [
  39. 2.5,
  40. 2.5,
  41. 0,
  42. 0
  43. ],
  44. "type": 16
  45. },
  46. "BrushDepthOffset": {
  47. "value": [
  48. 0.05
  49. ],
  50. "type": 13
  51. }
  52. }
  53. }
  54. ]
  55. }
  56. ],
  57. "shaders": [
  58. {
  59. "blocks": [
  60. {
  61. "name": "Constant",
  62. "members": [
  63. {
  64. "name": "BrushDepthOffset",
  65. "type": 13,
  66. "count": 1
  67. }
  68. ],
  69. "defines": [],
  70. "stageFlags": 1,
  71. "binding": 0
  72. },
  73. {
  74. "name": "TexCoords",
  75. "members": [
  76. {
  77. "name": "BrushPos",
  78. "type": 16,
  79. "count": 1
  80. },
  81. {
  82. "name": "BrushParams",
  83. "type": 16,
  84. "count": 1
  85. }
  86. ],
  87. "defines": [],
  88. "stageFlags": 16,
  89. "binding": 1
  90. }
  91. ],
  92. "samplerTextures": [],
  93. "samplers": [],
  94. "textures": [],
  95. "buffers": [],
  96. "images": [],
  97. "subpassInputs": [],
  98. "attributes": [
  99. {
  100. "name": "a_position",
  101. "defines": [],
  102. "format": 32,
  103. "location": 0
  104. }
  105. ],
  106. "varyings": [
  107. {
  108. "name": "wposition",
  109. "type": 16,
  110. "count": 1,
  111. "defines": [],
  112. "stageFlags": 17,
  113. "location": 0
  114. }
  115. ],
  116. "fragColors": [
  117. {
  118. "name": "cc_FragColor",
  119. "typename": "vec4",
  120. "type": 16,
  121. "count": 1,
  122. "defines": [],
  123. "stageFlags": 16,
  124. "location": 0
  125. }
  126. ],
  127. "descriptors": [
  128. {
  129. "rate": 0,
  130. "blocks": [
  131. {
  132. "tags": {
  133. "builtin": "local"
  134. },
  135. "name": "CCLocal",
  136. "members": [
  137. {
  138. "name": "cc_matWorld",
  139. "typename": "mat4",
  140. "type": 25,
  141. "count": 1,
  142. "precision": "highp "
  143. },
  144. {
  145. "name": "cc_matWorldIT",
  146. "typename": "mat4",
  147. "type": 25,
  148. "count": 1,
  149. "precision": "highp "
  150. },
  151. {
  152. "name": "cc_lightingMapUVParam",
  153. "typename": "vec4",
  154. "type": 16,
  155. "count": 1,
  156. "precision": "highp "
  157. },
  158. {
  159. "name": "cc_localShadowBias",
  160. "typename": "vec4",
  161. "type": 16,
  162. "count": 1,
  163. "precision": "highp "
  164. },
  165. {
  166. "name": "cc_reflectionProbeData1",
  167. "typename": "vec4",
  168. "type": 16,
  169. "count": 1,
  170. "precision": "highp "
  171. },
  172. {
  173. "name": "cc_reflectionProbeData2",
  174. "typename": "vec4",
  175. "type": 16,
  176. "count": 1,
  177. "precision": "highp "
  178. },
  179. {
  180. "name": "cc_reflectionProbeBlendData1",
  181. "typename": "vec4",
  182. "type": 16,
  183. "count": 1,
  184. "precision": "highp "
  185. },
  186. {
  187. "name": "cc_reflectionProbeBlendData2",
  188. "typename": "vec4",
  189. "type": 16,
  190. "count": 1,
  191. "precision": "highp "
  192. }
  193. ],
  194. "defines": [],
  195. "stageFlags": 1
  196. }
  197. ],
  198. "samplerTextures": [],
  199. "samplers": [],
  200. "textures": [],
  201. "buffers": [],
  202. "images": [],
  203. "subpassInputs": []
  204. },
  205. {
  206. "rate": 1,
  207. "blocks": [
  208. {
  209. "name": "Constant",
  210. "members": [
  211. {
  212. "name": "BrushDepthOffset",
  213. "type": 13,
  214. "count": 1
  215. }
  216. ],
  217. "defines": [],
  218. "stageFlags": 1,
  219. "binding": 0
  220. },
  221. {
  222. "name": "TexCoords",
  223. "members": [
  224. {
  225. "name": "BrushPos",
  226. "type": 16,
  227. "count": 1
  228. },
  229. {
  230. "name": "BrushParams",
  231. "type": 16,
  232. "count": 1
  233. }
  234. ],
  235. "defines": [],
  236. "stageFlags": 16,
  237. "binding": 1
  238. }
  239. ],
  240. "samplerTextures": [],
  241. "samplers": [],
  242. "textures": [],
  243. "buffers": [],
  244. "images": [],
  245. "subpassInputs": []
  246. },
  247. {
  248. "rate": 2,
  249. "blocks": [],
  250. "samplerTextures": [],
  251. "samplers": [],
  252. "textures": [],
  253. "buffers": [],
  254. "images": [],
  255. "subpassInputs": []
  256. },
  257. {
  258. "rate": 3,
  259. "blocks": [
  260. {
  261. "tags": {
  262. "builtin": "global"
  263. },
  264. "name": "CCGlobal",
  265. "members": [
  266. {
  267. "name": "cc_time",
  268. "typename": "vec4",
  269. "type": 16,
  270. "count": 1,
  271. "precision": "highp "
  272. },
  273. {
  274. "name": "cc_screenSize",
  275. "typename": "vec4",
  276. "type": 16,
  277. "count": 1,
  278. "precision": "mediump "
  279. },
  280. {
  281. "name": "cc_nativeSize",
  282. "typename": "vec4",
  283. "type": 16,
  284. "count": 1,
  285. "precision": "mediump "
  286. },
  287. {
  288. "name": "cc_probeInfo",
  289. "typename": "vec4",
  290. "type": 16,
  291. "count": 1,
  292. "precision": "mediump "
  293. },
  294. {
  295. "name": "cc_debug_view_mode",
  296. "typename": "vec4",
  297. "type": 16,
  298. "count": 1,
  299. "precision": "mediump "
  300. }
  301. ],
  302. "defines": [],
  303. "stageFlags": 17
  304. },
  305. {
  306. "tags": {
  307. "builtin": "global"
  308. },
  309. "name": "CCCamera",
  310. "members": [
  311. {
  312. "name": "cc_matView",
  313. "typename": "mat4",
  314. "type": 25,
  315. "count": 1,
  316. "precision": "highp "
  317. },
  318. {
  319. "name": "cc_matViewInv",
  320. "typename": "mat4",
  321. "type": 25,
  322. "count": 1,
  323. "precision": "highp "
  324. },
  325. {
  326. "name": "cc_matProj",
  327. "typename": "mat4",
  328. "type": 25,
  329. "count": 1,
  330. "precision": "highp "
  331. },
  332. {
  333. "name": "cc_matProjInv",
  334. "typename": "mat4",
  335. "type": 25,
  336. "count": 1,
  337. "precision": "highp "
  338. },
  339. {
  340. "name": "cc_matViewProj",
  341. "typename": "mat4",
  342. "type": 25,
  343. "count": 1,
  344. "precision": "highp "
  345. },
  346. {
  347. "name": "cc_matViewProjInv",
  348. "typename": "mat4",
  349. "type": 25,
  350. "count": 1,
  351. "precision": "highp "
  352. },
  353. {
  354. "name": "cc_cameraPos",
  355. "typename": "vec4",
  356. "type": 16,
  357. "count": 1,
  358. "precision": "highp "
  359. },
  360. {
  361. "name": "cc_surfaceTransform",
  362. "typename": "vec4",
  363. "type": 16,
  364. "count": 1,
  365. "precision": "mediump "
  366. },
  367. {
  368. "name": "cc_screenScale",
  369. "typename": "vec4",
  370. "type": 16,
  371. "count": 1,
  372. "precision": "mediump "
  373. },
  374. {
  375. "name": "cc_exposure",
  376. "typename": "vec4",
  377. "type": 16,
  378. "count": 1,
  379. "precision": "mediump "
  380. },
  381. {
  382. "name": "cc_mainLitDir",
  383. "typename": "vec4",
  384. "type": 16,
  385. "count": 1,
  386. "precision": "mediump "
  387. },
  388. {
  389. "name": "cc_mainLitColor",
  390. "typename": "vec4",
  391. "type": 16,
  392. "count": 1,
  393. "precision": "mediump "
  394. },
  395. {
  396. "name": "cc_ambientSky",
  397. "typename": "vec4",
  398. "type": 16,
  399. "count": 1,
  400. "precision": "mediump "
  401. },
  402. {
  403. "name": "cc_ambientGround",
  404. "typename": "vec4",
  405. "type": 16,
  406. "count": 1,
  407. "precision": "mediump "
  408. },
  409. {
  410. "name": "cc_fogColor",
  411. "typename": "vec4",
  412. "type": 16,
  413. "count": 1,
  414. "precision": "mediump "
  415. },
  416. {
  417. "name": "cc_fogBase",
  418. "typename": "vec4",
  419. "type": 16,
  420. "count": 1,
  421. "precision": "mediump "
  422. },
  423. {
  424. "name": "cc_fogAdd",
  425. "typename": "vec4",
  426. "type": 16,
  427. "count": 1,
  428. "precision": "mediump "
  429. },
  430. {
  431. "name": "cc_nearFar",
  432. "typename": "vec4",
  433. "type": 16,
  434. "count": 1,
  435. "precision": "mediump "
  436. },
  437. {
  438. "name": "cc_viewPort",
  439. "typename": "vec4",
  440. "type": 16,
  441. "count": 1,
  442. "precision": "mediump "
  443. }
  444. ],
  445. "defines": [],
  446. "stageFlags": 17
  447. }
  448. ],
  449. "samplerTextures": [],
  450. "samplers": [],
  451. "textures": [],
  452. "buffers": [],
  453. "images": [],
  454. "subpassInputs": []
  455. }
  456. ],
  457. "hash": 2179893753,
  458. "glsl4": {
  459. "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(location = 0) out vec4 wposition;\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 wposition = vec4(worldPos, 1);\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  460. "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 wposition;\nlayout(set = 1, binding = 1) uniform TexCoords {\n vec4 BrushPos;\n vec4 BrushParams;\n};\nvec4 frag () {\n float Radius = BrushParams.x;\n float Falloff = BrushParams.y;\n float Distance = length(wposition.xz - BrushPos.xz);\n float k = 0.0;\n #if LINEAR\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n k = max(0.0, 1.0 - (Distance - Radius) / Falloff);\n }\n #elif SMOOTH\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n float y = (Distance - Radius) / Falloff;\n k = sqrt(1.0 - y * y);\n }\n #elif SPHERICAL\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n k = max(0.0, 1.0 - (Distance - Radius) / Falloff);\n }\n k = k*k*(3.0 - 2.0 * k);\n #elif TIP\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n float y = (Falloff + Radius - Distance) / Falloff;\n k = 1.0 - sqrt(1.0 - y * y);\n }\n #endif\n vec4 color = vec4(0.0, 0.0, 0.0, 1.0);\n color.rgb = vec3(100, 100, 135) / 255.0;\n color.a = 0.85 * k;\n return CCFragOutput(color);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  461. },
  462. "glsl3": {
  463. "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;\nout vec4 wposition;\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 wposition = vec4(worldPos, 1);\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  464. "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 wposition;\nlayout(std140) uniform TexCoords {\n vec4 BrushPos;\n vec4 BrushParams;\n};\nvec4 frag () {\n float Radius = BrushParams.x;\n float Falloff = BrushParams.y;\n float Distance = length(wposition.xz - BrushPos.xz);\n float k = 0.0;\n #if LINEAR\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n k = max(0.0, 1.0 - (Distance - Radius) / Falloff);\n }\n #elif SMOOTH\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n float y = (Distance - Radius) / Falloff;\n k = sqrt(1.0 - y * y);\n }\n #elif SPHERICAL\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n k = max(0.0, 1.0 - (Distance - Radius) / Falloff);\n }\n k = k*k*(3.0 - 2.0 * k);\n #elif TIP\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n float y = (Falloff + Radius - Distance) / Falloff;\n k = 1.0 - sqrt(1.0 - y * y);\n }\n #endif\n vec4 color = vec4(0.0, 0.0, 0.0, 1.0);\n color.rgb = vec3(100, 100, 135) / 255.0;\n color.a = 0.85 * k;\n return CCFragOutput(color);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  465. },
  466. "glsl1": {
  467. "vert": "\nprecision mediump float;\nuniform highp mat4 cc_matViewProj;\nuniform highp mat4 cc_matWorld;\nattribute vec3 a_position;\nvarying vec4 wposition;\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 wposition = vec4(worldPos, 1);\n return pos;\n}\nvoid main() { gl_Position = vert(); }",
  468. "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nvarying vec4 wposition;\n uniform vec4 BrushPos;\n uniform vec4 BrushParams;\nvec4 frag () {\n float Radius = BrushParams.x;\n float Falloff = BrushParams.y;\n float Distance = length(wposition.xz - BrushPos.xz);\n float k = 0.0;\n #if LINEAR\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n k = max(0.0, 1.0 - (Distance - Radius) / Falloff);\n }\n #elif SMOOTH\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n float y = (Distance - Radius) / Falloff;\n k = sqrt(1.0 - y * y);\n }\n #elif SPHERICAL\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n k = max(0.0, 1.0 - (Distance - Radius) / Falloff);\n }\n k = k*k*(3.0 - 2.0 * k);\n #elif TIP\n if (Distance <= Radius) {\n k = 1.0;\n }\n else if (Distance > Radius + Falloff) {\n k = 0.0;\n }\n else {\n float y = (Falloff + Radius - Distance) / Falloff;\n k = 1.0 - sqrt(1.0 - y * y);\n }\n #endif\n vec4 color = vec4(0.0, 0.0, 0.0, 1.0);\n color.rgb = vec3(100, 100, 135) / 255.0;\n color.a = 0.85 * k;\n return CCFragOutput(color);\n}\nvoid main() { gl_FragColor = frag(); }"
  469. },
  470. "builtins": {
  471. "globals": {
  472. "blocks": [
  473. {
  474. "name": "CCGlobal",
  475. "defines": []
  476. },
  477. {
  478. "name": "CCCamera",
  479. "defines": []
  480. }
  481. ],
  482. "samplerTextures": [],
  483. "buffers": [],
  484. "images": []
  485. },
  486. "locals": {
  487. "blocks": [
  488. {
  489. "name": "CCLocal",
  490. "defines": []
  491. }
  492. ],
  493. "samplerTextures": [],
  494. "buffers": [],
  495. "images": []
  496. },
  497. "statistics": {
  498. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 57,
  499. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 44
  500. }
  501. },
  502. "defines": [
  503. {
  504. "name": "LINEAR",
  505. "type": "boolean",
  506. "defines": []
  507. },
  508. {
  509. "name": "SMOOTH",
  510. "type": "boolean",
  511. "defines": [
  512. "!LINEAR"
  513. ]
  514. },
  515. {
  516. "name": "SPHERICAL",
  517. "type": "boolean",
  518. "defines": [
  519. "!LINEAR",
  520. "!SMOOTH"
  521. ]
  522. },
  523. {
  524. "name": "TIP",
  525. "type": "boolean",
  526. "defines": [
  527. "!LINEAR",
  528. "!SMOOTH",
  529. "!SPHERICAL"
  530. ]
  531. }
  532. ],
  533. "name": "internal/editor/terrain-circle-brush|terrain-brush-vs:vert|terrain-brush-fs:frag"
  534. }
  535. ],
  536. "combinations": [],
  537. "hideInEditor": true
  538. }