084eba38-5336-4444-8c8c-aebb75d5c627.json 21 KB

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