debug.json 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. [
  2. 1,
  3. 0,
  4. 0,
  5. [
  6. [
  7. "cc.EffectAsset",
  8. [
  9. "_name",
  10. "shaders",
  11. "techniques"
  12. ],
  13. 0
  14. ]
  15. ],
  16. [
  17. [
  18. 0,
  19. 0,
  20. 1,
  21. 2,
  22. 4
  23. ]
  24. ],
  25. [
  26. [
  27. 0,
  28. "pipeline/post-process/tone-mapping",
  29. [
  30. {
  31. "hash": 879047950,
  32. "name": "pipeline/post-process/tone-mapping|vs|fs-tonemap",
  33. "blocks": [],
  34. "samplerTextures": [],
  35. "samplers": [],
  36. "textures": [],
  37. "buffers": [],
  38. "images": [],
  39. "subpassInputs": [],
  40. "attributes": [
  41. {
  42. "name": "a_position",
  43. "format": 32,
  44. "location": 0,
  45. "defines": []
  46. },
  47. {
  48. "name": "a_normal",
  49. "format": 32,
  50. "location": 1,
  51. "defines": []
  52. },
  53. {
  54. "name": "a_texCoord",
  55. "format": 21,
  56. "location": 2,
  57. "defines": []
  58. },
  59. {
  60. "name": "a_tangent",
  61. "format": 44,
  62. "location": 3,
  63. "defines": []
  64. },
  65. {
  66. "name": "a_joints",
  67. "location": 4,
  68. "defines": [
  69. "CC_USE_SKINNING"
  70. ]
  71. },
  72. {
  73. "name": "a_weights",
  74. "format": 44,
  75. "location": 5,
  76. "defines": [
  77. "CC_USE_SKINNING"
  78. ]
  79. },
  80. {
  81. "name": "a_jointAnimInfo",
  82. "format": 44,
  83. "isInstanced": true,
  84. "location": 6,
  85. "defines": [
  86. "USE_INSTANCING",
  87. "CC_USE_BAKED_ANIMATION"
  88. ]
  89. },
  90. {
  91. "name": "a_matWorld0",
  92. "format": 44,
  93. "isInstanced": true,
  94. "location": 7,
  95. "defines": [
  96. "USE_INSTANCING"
  97. ]
  98. },
  99. {
  100. "name": "a_matWorld1",
  101. "format": 44,
  102. "isInstanced": true,
  103. "location": 8,
  104. "defines": [
  105. "USE_INSTANCING"
  106. ]
  107. },
  108. {
  109. "name": "a_matWorld2",
  110. "format": 44,
  111. "isInstanced": true,
  112. "location": 9,
  113. "defines": [
  114. "USE_INSTANCING"
  115. ]
  116. },
  117. {
  118. "name": "a_lightingMapUVParam",
  119. "format": 44,
  120. "isInstanced": true,
  121. "location": 10,
  122. "defines": [
  123. "USE_INSTANCING",
  124. "CC_USE_LIGHTMAP"
  125. ]
  126. },
  127. {
  128. "name": "a_localShadowBiasAndProbeId",
  129. "format": 44,
  130. "isInstanced": true,
  131. "location": 11,
  132. "defines": [
  133. "USE_INSTANCING"
  134. ]
  135. },
  136. {
  137. "name": "a_reflectionProbeData",
  138. "format": 44,
  139. "isInstanced": true,
  140. "location": 12,
  141. "defines": [
  142. "USE_INSTANCING",
  143. "CC_USE_REFLECTION_PROBE"
  144. ]
  145. },
  146. {
  147. "name": "a_sh_linear_const_r",
  148. "format": 44,
  149. "isInstanced": true,
  150. "location": 13,
  151. "defines": [
  152. "USE_INSTANCING",
  153. "CC_USE_LIGHT_PROBE"
  154. ]
  155. },
  156. {
  157. "name": "a_sh_linear_const_g",
  158. "format": 44,
  159. "isInstanced": true,
  160. "location": 14,
  161. "defines": [
  162. "USE_INSTANCING",
  163. "CC_USE_LIGHT_PROBE"
  164. ]
  165. },
  166. {
  167. "name": "a_sh_linear_const_b",
  168. "format": 44,
  169. "isInstanced": true,
  170. "location": 15,
  171. "defines": [
  172. "USE_INSTANCING",
  173. "CC_USE_LIGHT_PROBE"
  174. ]
  175. },
  176. {
  177. "name": "a_vertexId",
  178. "format": 11,
  179. "location": 16,
  180. "defines": [
  181. "CC_USE_MORPH"
  182. ]
  183. }
  184. ],
  185. "fragColors": [
  186. {
  187. "name": "fragColor",
  188. "typename": "vec4",
  189. "type": 16,
  190. "count": 1,
  191. "stageFlags": 16,
  192. "location": 0,
  193. "defines": []
  194. }
  195. ],
  196. "descriptors": [
  197. {
  198. "rate": 0,
  199. "blocks": [],
  200. "samplerTextures": [],
  201. "samplers": [],
  202. "textures": [],
  203. "buffers": [],
  204. "images": [],
  205. "subpassInputs": []
  206. },
  207. {
  208. "rate": 1,
  209. "blocks": [],
  210. "samplerTextures": [],
  211. "samplers": [],
  212. "textures": [],
  213. "buffers": [],
  214. "images": [],
  215. "subpassInputs": []
  216. },
  217. {
  218. "rate": 2,
  219. "blocks": [],
  220. "samplerTextures": [],
  221. "samplers": [],
  222. "textures": [],
  223. "buffers": [],
  224. "images": [],
  225. "subpassInputs": []
  226. },
  227. {
  228. "rate": 3,
  229. "blocks": [
  230. {
  231. "name": "Pipeline",
  232. "stageFlags": 1,
  233. "binding": 0,
  234. "members": [
  235. {
  236. "name": "g_platform",
  237. "type": 16,
  238. "count": 1
  239. }
  240. ],
  241. "defines": []
  242. }
  243. ],
  244. "samplerTextures": [
  245. {
  246. "name": "inputTexture",
  247. "type": 28,
  248. "count": 1,
  249. "stageFlags": 16,
  250. "binding": 1,
  251. "defines": []
  252. }
  253. ],
  254. "samplers": [],
  255. "textures": [],
  256. "buffers": [],
  257. "images": [],
  258. "subpassInputs": []
  259. }
  260. ],
  261. "glsl3": {
  262. "vert": "\nprecision highp float;\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nin vec3 a_position;\nin vec3 a_normal;\nin vec2 a_texCoord;\nin vec4 a_tangent;\n#if CC_USE_SKINNING\n in vec4 a_joints;\n in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n in highp vec4 a_jointAnimInfo;\n #endif\n in vec4 a_matWorld0;\n in vec4 a_matWorld1;\n in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n in vec4 a_sh_linear_const_r;\n in vec4 a_sh_linear_const_g;\n in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n in float a_vertexId;\n#endif\nlayout(std140) uniform Pipeline {\n vec4 g_platform;\n};\nout vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  263. "frag": "\nprecision highp float;\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec3 ACESToneMap (vec3 color) {\n color = min(color, vec3(8.0));\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nvec3 HDRToLDR(vec3 color)\n{\n #if CC_USE_HDR\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING)\n #endif\n {\n #if CC_TONE_MAPPING_TYPE == HDR_TONE_MAPPING_ACES\n color.rgb = ACESToneMap(color.rgb);\n #endif\n }\n #endif\n return color;\n}\nin vec2 v_uv;\nuniform sampler2D inputTexture;\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n fragColor = texture(inputTexture, v_uv);\n #if CC_USE_FLOAT_OUTPUT\n fragColor.rgb = HDRToLDR(fragColor.rgb);\n fragColor.rgb = LinearToSRGB(fragColor.rgb);\n #endif\n}"
  264. },
  265. "glsl1": {
  266. "vert": "\nprecision highp float;\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nattribute vec3 a_position;\nattribute vec3 a_normal;\nattribute vec2 a_texCoord;\nattribute vec4 a_tangent;\n#if CC_USE_SKINNING\n attribute vec4 a_joints;\n attribute vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n attribute highp vec4 a_jointAnimInfo;\n #endif\n attribute vec4 a_matWorld0;\n attribute vec4 a_matWorld1;\n attribute vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n attribute vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n attribute vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n attribute vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n attribute vec4 a_sh_linear_const_r;\n attribute vec4 a_sh_linear_const_g;\n attribute vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n attribute float a_vertexId;\n#endif\n uniform vec4 g_platform;\nvarying vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  267. "frag": "\nprecision highp float;\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec3 ACESToneMap (vec3 color) {\n color = min(color, vec3(8.0));\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nvec3 HDRToLDR(vec3 color)\n{\n #if CC_USE_HDR\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING)\n #endif\n {\n #if CC_TONE_MAPPING_TYPE == HDR_TONE_MAPPING_ACES\n color.rgb = ACESToneMap(color.rgb);\n #endif\n }\n #endif\n return color;\n}\nvarying vec2 v_uv;\nuniform sampler2D inputTexture;\nvoid main () {\n gl_FragColor = texture2D(inputTexture, v_uv);\n #if CC_USE_FLOAT_OUTPUT\n gl_FragColor.rgb = HDRToLDR(gl_FragColor.rgb);\n gl_FragColor.rgb = LinearToSRGB(gl_FragColor.rgb);\n #endif\n}"
  268. },
  269. "builtins": {
  270. "globals": {
  271. "blocks": [],
  272. "samplerTextures": [],
  273. "buffers": [],
  274. "images": []
  275. },
  276. "locals": {
  277. "blocks": [],
  278. "samplerTextures": [],
  279. "buffers": [],
  280. "images": []
  281. },
  282. "statistics": {
  283. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  284. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 0
  285. }
  286. },
  287. "defines": [
  288. {
  289. "name": "USE_INSTANCING",
  290. "type": "boolean"
  291. },
  292. {
  293. "name": "CC_USE_SKINNING",
  294. "type": "boolean"
  295. },
  296. {
  297. "name": "CC_USE_BAKED_ANIMATION",
  298. "type": "boolean"
  299. },
  300. {
  301. "name": "CC_USE_LIGHTMAP",
  302. "type": "boolean"
  303. },
  304. {
  305. "name": "CC_USE_REFLECTION_PROBE",
  306. "type": "boolean"
  307. },
  308. {
  309. "name": "CC_RECEIVE_SHADOW",
  310. "type": "boolean"
  311. },
  312. {
  313. "name": "CC_USE_LIGHT_PROBE",
  314. "type": "boolean"
  315. },
  316. {
  317. "name": "CC_USE_MORPH",
  318. "type": "boolean"
  319. },
  320. {
  321. "name": "CC_USE_DEBUG_VIEW",
  322. "type": "number",
  323. "range": [
  324. 0,
  325. 3
  326. ]
  327. },
  328. {
  329. "name": "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC",
  330. "type": "boolean"
  331. },
  332. {
  333. "name": "CC_SURFACES_ENABLE_DEBUG_VIEW",
  334. "type": "boolean"
  335. },
  336. {
  337. "name": "CC_USE_HDR",
  338. "type": "boolean"
  339. },
  340. {
  341. "name": "CC_TONE_MAPPING_TYPE",
  342. "type": "number",
  343. "range": [
  344. 0,
  345. 3
  346. ]
  347. },
  348. {
  349. "name": "HDR_TONE_MAPPING_ACES",
  350. "type": "boolean"
  351. },
  352. {
  353. "name": "CC_USE_FLOAT_OUTPUT",
  354. "type": "boolean"
  355. }
  356. ]
  357. },
  358. {
  359. "hash": 4126709291,
  360. "name": "pipeline/post-process/tone-mapping|vs|fs-copy",
  361. "blocks": [],
  362. "samplerTextures": [],
  363. "samplers": [],
  364. "textures": [],
  365. "buffers": [],
  366. "images": [],
  367. "subpassInputs": [],
  368. "attributes": [
  369. {
  370. "name": "a_position",
  371. "format": 32,
  372. "location": 0,
  373. "defines": []
  374. },
  375. {
  376. "name": "a_normal",
  377. "format": 32,
  378. "location": 1,
  379. "defines": []
  380. },
  381. {
  382. "name": "a_texCoord",
  383. "format": 21,
  384. "location": 2,
  385. "defines": []
  386. },
  387. {
  388. "name": "a_tangent",
  389. "format": 44,
  390. "location": 3,
  391. "defines": []
  392. },
  393. {
  394. "name": "a_joints",
  395. "location": 4,
  396. "defines": [
  397. "CC_USE_SKINNING"
  398. ]
  399. },
  400. {
  401. "name": "a_weights",
  402. "format": 44,
  403. "location": 5,
  404. "defines": [
  405. "CC_USE_SKINNING"
  406. ]
  407. },
  408. {
  409. "name": "a_jointAnimInfo",
  410. "format": 44,
  411. "isInstanced": true,
  412. "location": 6,
  413. "defines": [
  414. "USE_INSTANCING",
  415. "CC_USE_BAKED_ANIMATION"
  416. ]
  417. },
  418. {
  419. "name": "a_matWorld0",
  420. "format": 44,
  421. "isInstanced": true,
  422. "location": 7,
  423. "defines": [
  424. "USE_INSTANCING"
  425. ]
  426. },
  427. {
  428. "name": "a_matWorld1",
  429. "format": 44,
  430. "isInstanced": true,
  431. "location": 8,
  432. "defines": [
  433. "USE_INSTANCING"
  434. ]
  435. },
  436. {
  437. "name": "a_matWorld2",
  438. "format": 44,
  439. "isInstanced": true,
  440. "location": 9,
  441. "defines": [
  442. "USE_INSTANCING"
  443. ]
  444. },
  445. {
  446. "name": "a_lightingMapUVParam",
  447. "format": 44,
  448. "isInstanced": true,
  449. "location": 10,
  450. "defines": [
  451. "USE_INSTANCING",
  452. "CC_USE_LIGHTMAP"
  453. ]
  454. },
  455. {
  456. "name": "a_localShadowBiasAndProbeId",
  457. "format": 44,
  458. "isInstanced": true,
  459. "location": 11,
  460. "defines": [
  461. "USE_INSTANCING"
  462. ]
  463. },
  464. {
  465. "name": "a_reflectionProbeData",
  466. "format": 44,
  467. "isInstanced": true,
  468. "location": 12,
  469. "defines": [
  470. "USE_INSTANCING",
  471. "CC_USE_REFLECTION_PROBE"
  472. ]
  473. },
  474. {
  475. "name": "a_sh_linear_const_r",
  476. "format": 44,
  477. "isInstanced": true,
  478. "location": 13,
  479. "defines": [
  480. "USE_INSTANCING",
  481. "CC_USE_LIGHT_PROBE"
  482. ]
  483. },
  484. {
  485. "name": "a_sh_linear_const_g",
  486. "format": 44,
  487. "isInstanced": true,
  488. "location": 14,
  489. "defines": [
  490. "USE_INSTANCING",
  491. "CC_USE_LIGHT_PROBE"
  492. ]
  493. },
  494. {
  495. "name": "a_sh_linear_const_b",
  496. "format": 44,
  497. "isInstanced": true,
  498. "location": 15,
  499. "defines": [
  500. "USE_INSTANCING",
  501. "CC_USE_LIGHT_PROBE"
  502. ]
  503. },
  504. {
  505. "name": "a_vertexId",
  506. "format": 11,
  507. "location": 16,
  508. "defines": [
  509. "CC_USE_MORPH"
  510. ]
  511. }
  512. ],
  513. "fragColors": [
  514. {
  515. "name": "fragColor",
  516. "typename": "vec4",
  517. "type": 16,
  518. "count": 1,
  519. "stageFlags": 16,
  520. "location": 0,
  521. "defines": []
  522. }
  523. ],
  524. "descriptors": [
  525. {
  526. "rate": 0,
  527. "blocks": [],
  528. "samplerTextures": [],
  529. "samplers": [],
  530. "textures": [],
  531. "buffers": [],
  532. "images": [],
  533. "subpassInputs": []
  534. },
  535. {
  536. "rate": 1,
  537. "blocks": [],
  538. "samplerTextures": [],
  539. "samplers": [],
  540. "textures": [],
  541. "buffers": [],
  542. "images": [],
  543. "subpassInputs": []
  544. },
  545. {
  546. "rate": 2,
  547. "blocks": [],
  548. "samplerTextures": [],
  549. "samplers": [],
  550. "textures": [],
  551. "buffers": [],
  552. "images": [],
  553. "subpassInputs": []
  554. },
  555. {
  556. "rate": 3,
  557. "blocks": [
  558. {
  559. "name": "Pipeline",
  560. "stageFlags": 1,
  561. "binding": 0,
  562. "members": [
  563. {
  564. "name": "g_platform",
  565. "type": 16,
  566. "count": 1
  567. }
  568. ],
  569. "defines": []
  570. }
  571. ],
  572. "samplerTextures": [
  573. {
  574. "name": "inputTexture",
  575. "type": 28,
  576. "count": 1,
  577. "stageFlags": 16,
  578. "binding": 1,
  579. "defines": []
  580. }
  581. ],
  582. "samplers": [],
  583. "textures": [],
  584. "buffers": [],
  585. "images": [],
  586. "subpassInputs": []
  587. }
  588. ],
  589. "glsl3": {
  590. "vert": "\nprecision highp float;\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nin vec3 a_position;\nin vec3 a_normal;\nin vec2 a_texCoord;\nin vec4 a_tangent;\n#if CC_USE_SKINNING\n in vec4 a_joints;\n in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n in highp vec4 a_jointAnimInfo;\n #endif\n in vec4 a_matWorld0;\n in vec4 a_matWorld1;\n in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n in vec4 a_sh_linear_const_r;\n in vec4 a_sh_linear_const_g;\n in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n in float a_vertexId;\n#endif\nlayout(std140) uniform Pipeline {\n vec4 g_platform;\n};\nout vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  591. "frag": "\nprecision highp float;\nin vec2 v_uv;\nuniform sampler2D inputTexture;\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n fragColor = texture(inputTexture, v_uv);\n}"
  592. },
  593. "glsl1": {
  594. "vert": "\nprecision highp float;\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nattribute vec3 a_position;\nattribute vec3 a_normal;\nattribute vec2 a_texCoord;\nattribute vec4 a_tangent;\n#if CC_USE_SKINNING\n attribute vec4 a_joints;\n attribute vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n attribute highp vec4 a_jointAnimInfo;\n #endif\n attribute vec4 a_matWorld0;\n attribute vec4 a_matWorld1;\n attribute vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n attribute vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n attribute vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n attribute vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n attribute vec4 a_sh_linear_const_r;\n attribute vec4 a_sh_linear_const_g;\n attribute vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n attribute float a_vertexId;\n#endif\n uniform vec4 g_platform;\nvarying vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  595. "frag": "\nprecision highp float;\nvarying vec2 v_uv;\nuniform sampler2D inputTexture;\nvoid main () {\n gl_FragColor = texture2D(inputTexture, v_uv);\n}"
  596. },
  597. "builtins": {
  598. "globals": {
  599. "blocks": [],
  600. "samplerTextures": [],
  601. "buffers": [],
  602. "images": []
  603. },
  604. "locals": {
  605. "blocks": [],
  606. "samplerTextures": [],
  607. "buffers": [],
  608. "images": []
  609. },
  610. "statistics": {
  611. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  612. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 0
  613. }
  614. },
  615. "defines": [
  616. {
  617. "name": "USE_INSTANCING",
  618. "type": "boolean"
  619. },
  620. {
  621. "name": "CC_USE_SKINNING",
  622. "type": "boolean"
  623. },
  624. {
  625. "name": "CC_USE_BAKED_ANIMATION",
  626. "type": "boolean"
  627. },
  628. {
  629. "name": "CC_USE_LIGHTMAP",
  630. "type": "boolean"
  631. },
  632. {
  633. "name": "CC_USE_REFLECTION_PROBE",
  634. "type": "boolean"
  635. },
  636. {
  637. "name": "CC_RECEIVE_SHADOW",
  638. "type": "boolean"
  639. },
  640. {
  641. "name": "CC_USE_LIGHT_PROBE",
  642. "type": "boolean"
  643. },
  644. {
  645. "name": "CC_USE_MORPH",
  646. "type": "boolean"
  647. }
  648. ]
  649. }
  650. ],
  651. [
  652. {
  653. "passes": [
  654. {
  655. "pass": "cc-tone-mapping",
  656. "program": "pipeline/post-process/tone-mapping|vs|fs-tonemap",
  657. "rasterizerState": {
  658. "cullMode": 0
  659. },
  660. "depthStencilState": {
  661. "depthTest": false,
  662. "depthWrite": false
  663. }
  664. },
  665. {
  666. "pass": "cc-tone-mapping",
  667. "program": "pipeline/post-process/tone-mapping|vs|fs-copy",
  668. "rasterizerState": {
  669. "cullMode": 0
  670. },
  671. "depthStencilState": {
  672. "depthTest": false,
  673. "depthWrite": false
  674. }
  675. }
  676. ]
  677. }
  678. ]
  679. ]
  680. ],
  681. 0,
  682. 0,
  683. [],
  684. [],
  685. []
  686. ]