10f0d9bc-5c9e-4216-9a94-f3a2ff53bb5f.json 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "pipeline/post-process/bloom1",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "passes": [
  10. {
  11. "pass": "cc-bloom-prefilter",
  12. "rasterizerState": {
  13. "cullMode": 0
  14. },
  15. "program": "pipeline/post-process/bloom1|bloom-vs|prefilter-fs",
  16. "depthStencilState": {
  17. "depthTest": false,
  18. "depthWrite": false
  19. }
  20. },
  21. {
  22. "pass": "cc-bloom-downsample",
  23. "rasterizerState": {
  24. "cullMode": 0
  25. },
  26. "program": "pipeline/post-process/bloom1|bloom-vs|downsample-fs",
  27. "depthStencilState": {
  28. "depthTest": false,
  29. "depthWrite": false
  30. }
  31. },
  32. {
  33. "pass": "cc-bloom-upsample",
  34. "rasterizerState": {
  35. "cullMode": 0
  36. },
  37. "program": "pipeline/post-process/bloom1|bloom-vs|upsample-fs",
  38. "depthStencilState": {
  39. "depthTest": false,
  40. "depthWrite": false
  41. }
  42. },
  43. {
  44. "pass": "cc-bloom-combine",
  45. "rasterizerState": {
  46. "cullMode": 0
  47. },
  48. "blendState": {
  49. "targets": [
  50. {
  51. "blend": true,
  52. "blendSrc": 1,
  53. "blendDst": 1,
  54. "blendSrcAlpha": 0,
  55. "blendDstAlpha": 1
  56. }
  57. ]
  58. },
  59. "program": "pipeline/post-process/bloom1|bloom-vs|combine-fs",
  60. "depthStencilState": {
  61. "depthTest": false,
  62. "depthWrite": false
  63. }
  64. }
  65. ]
  66. }
  67. ],
  68. "shaders": [
  69. {
  70. "blocks": [],
  71. "samplerTextures": [],
  72. "samplers": [],
  73. "textures": [],
  74. "buffers": [],
  75. "images": [],
  76. "subpassInputs": [],
  77. "attributes": [
  78. {
  79. "name": "a_position",
  80. "defines": [],
  81. "format": 32,
  82. "location": 0
  83. },
  84. {
  85. "name": "a_normal",
  86. "defines": [],
  87. "format": 32,
  88. "location": 1
  89. },
  90. {
  91. "name": "a_texCoord",
  92. "defines": [],
  93. "format": 21,
  94. "location": 2
  95. },
  96. {
  97. "name": "a_tangent",
  98. "defines": [],
  99. "format": 44,
  100. "location": 3
  101. },
  102. {
  103. "name": "a_joints",
  104. "defines": [
  105. "CC_USE_SKINNING"
  106. ],
  107. "location": 4
  108. },
  109. {
  110. "name": "a_weights",
  111. "defines": [
  112. "CC_USE_SKINNING"
  113. ],
  114. "format": 44,
  115. "location": 5
  116. },
  117. {
  118. "name": "a_jointAnimInfo",
  119. "defines": [
  120. "USE_INSTANCING",
  121. "CC_USE_BAKED_ANIMATION"
  122. ],
  123. "format": 44,
  124. "isInstanced": true,
  125. "location": 6
  126. },
  127. {
  128. "name": "a_matWorld0",
  129. "defines": [
  130. "USE_INSTANCING"
  131. ],
  132. "format": 44,
  133. "isInstanced": true,
  134. "location": 7
  135. },
  136. {
  137. "name": "a_matWorld1",
  138. "defines": [
  139. "USE_INSTANCING"
  140. ],
  141. "format": 44,
  142. "isInstanced": true,
  143. "location": 8
  144. },
  145. {
  146. "name": "a_matWorld2",
  147. "defines": [
  148. "USE_INSTANCING"
  149. ],
  150. "format": 44,
  151. "isInstanced": true,
  152. "location": 9
  153. },
  154. {
  155. "name": "a_lightingMapUVParam",
  156. "defines": [
  157. "USE_INSTANCING",
  158. "CC_USE_LIGHTMAP"
  159. ],
  160. "format": 44,
  161. "isInstanced": true,
  162. "location": 10
  163. },
  164. {
  165. "name": "a_localShadowBiasAndProbeId",
  166. "defines": [
  167. "USE_INSTANCING"
  168. ],
  169. "format": 44,
  170. "isInstanced": true,
  171. "location": 11
  172. },
  173. {
  174. "name": "a_reflectionProbeData",
  175. "defines": [
  176. "USE_INSTANCING",
  177. "CC_USE_REFLECTION_PROBE"
  178. ],
  179. "format": 44,
  180. "isInstanced": true,
  181. "location": 12
  182. },
  183. {
  184. "name": "a_sh_linear_const_r",
  185. "defines": [
  186. "USE_INSTANCING",
  187. "CC_USE_LIGHT_PROBE"
  188. ],
  189. "format": 44,
  190. "isInstanced": true,
  191. "location": 13
  192. },
  193. {
  194. "name": "a_sh_linear_const_g",
  195. "defines": [
  196. "USE_INSTANCING",
  197. "CC_USE_LIGHT_PROBE"
  198. ],
  199. "format": 44,
  200. "isInstanced": true,
  201. "location": 14
  202. },
  203. {
  204. "name": "a_sh_linear_const_b",
  205. "defines": [
  206. "USE_INSTANCING",
  207. "CC_USE_LIGHT_PROBE"
  208. ],
  209. "format": 44,
  210. "isInstanced": true,
  211. "location": 15
  212. },
  213. {
  214. "name": "a_vertexId",
  215. "defines": [
  216. "CC_USE_MORPH"
  217. ],
  218. "format": 11,
  219. "location": 16
  220. }
  221. ],
  222. "varyings": [
  223. {
  224. "name": "v_uv",
  225. "type": 14,
  226. "count": 1,
  227. "defines": [],
  228. "stageFlags": 17,
  229. "location": 0
  230. }
  231. ],
  232. "fragColors": [
  233. {
  234. "name": "fragColor",
  235. "typename": "vec4",
  236. "type": 16,
  237. "count": 1,
  238. "defines": [],
  239. "stageFlags": 16,
  240. "location": 0
  241. }
  242. ],
  243. "descriptors": [
  244. {
  245. "rate": 0,
  246. "blocks": [],
  247. "samplerTextures": [],
  248. "samplers": [],
  249. "textures": [],
  250. "buffers": [],
  251. "images": [],
  252. "subpassInputs": []
  253. },
  254. {
  255. "rate": 1,
  256. "blocks": [],
  257. "samplerTextures": [],
  258. "samplers": [],
  259. "textures": [],
  260. "buffers": [],
  261. "images": [],
  262. "subpassInputs": []
  263. },
  264. {
  265. "rate": 2,
  266. "blocks": [],
  267. "samplerTextures": [],
  268. "samplers": [],
  269. "textures": [],
  270. "buffers": [],
  271. "images": [],
  272. "subpassInputs": []
  273. },
  274. {
  275. "rate": 3,
  276. "blocks": [
  277. {
  278. "name": "Pipeline",
  279. "members": [
  280. {
  281. "name": "g_platform",
  282. "type": 16,
  283. "count": 1
  284. }
  285. ],
  286. "defines": [],
  287. "stageFlags": 1,
  288. "binding": 0
  289. },
  290. {
  291. "name": "BloomUBO",
  292. "members": [
  293. {
  294. "name": "bloomParams",
  295. "type": 16,
  296. "count": 1
  297. }
  298. ],
  299. "defines": [],
  300. "stageFlags": 16,
  301. "binding": 1
  302. }
  303. ],
  304. "samplerTextures": [
  305. {
  306. "name": "inputTexture",
  307. "type": 28,
  308. "count": 1,
  309. "defines": [],
  310. "stageFlags": 16,
  311. "binding": 2
  312. }
  313. ],
  314. "samplers": [],
  315. "textures": [],
  316. "buffers": [],
  317. "images": [],
  318. "subpassInputs": []
  319. }
  320. ],
  321. "hash": 1435529345,
  322. "glsl4": {
  323. "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};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 2) in vec2 a_texCoord;\nlayout(location = 3) in vec4 a_tangent;\n#if CC_USE_SKINNING\n layout(location = 4) in u32vec4 a_joints;\n layout(location = 5) in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n layout(location = 6) in highp vec4 a_jointAnimInfo;\n #endif\n layout(location = 7) in vec4 a_matWorld0;\n layout(location = 8) in vec4 a_matWorld1;\n layout(location = 9) in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n layout(location = 10) in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n layout(location = 11) in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n layout(location = 12) in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n layout(location = 13) in vec4 a_sh_linear_const_r;\n layout(location = 14) in vec4 a_sh_linear_const_g;\n layout(location = 15) in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n#endif\nlayout(set = 1, binding = 0) uniform Pipeline {\n vec4 g_platform;\n};\nlayout(location = 0) out 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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  324. "frag": "\nprecision highp float;\nlayout(location = 0) in vec2 v_uv;\nlayout(set = 1, binding = 1) uniform BloomUBO {\n mediump vec4 bloomParams;\n};\nlayout(set = 1, binding = 2) uniform sampler2D inputTexture;\nlayout(location = 0) out vec4 fragColor;\nfloat luminance(vec3 color) {\n return dot(color, vec3(0.3, 0.5, 0.2));\n}\nvoid main() {\n vec4 color = texture(inputTexture, v_uv);\n float contribute = step(bloomParams.z, luminance(color.rgb));\n contribute *= mix(1.0, step(253.0 / 255.0, color.a), bloomParams.w);\n fragColor = vec4(color.xyz * contribute, 1.0);\n}"
  325. },
  326. "glsl3": {
  327. "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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  328. "frag": "\nprecision highp float;\nin vec2 v_uv;\nlayout(std140) uniform BloomUBO {\n mediump vec4 bloomParams;\n};\nuniform sampler2D inputTexture;\nlayout(location = 0) out vec4 fragColor;\nfloat luminance(vec3 color) {\n return dot(color, vec3(0.3, 0.5, 0.2));\n}\nvoid main() {\n vec4 color = texture(inputTexture, v_uv);\n float contribute = step(bloomParams.z, luminance(color.rgb));\n contribute *= mix(1.0, step(253.0 / 255.0, color.a), bloomParams.w);\n fragColor = vec4(color.xyz * contribute, 1.0);\n}"
  329. },
  330. "glsl1": {
  331. "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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  332. "frag": "\nprecision highp float;\nvarying vec2 v_uv;\n uniform mediump vec4 bloomParams;\nuniform sampler2D inputTexture;\nfloat luminance(vec3 color) {\n return dot(color, vec3(0.3, 0.5, 0.2));\n}\nvoid main() {\n vec4 color = texture2D(inputTexture, v_uv);\n float contribute = step(bloomParams.z, luminance(color.rgb));\n contribute *= mix(1.0, step(253.0 / 255.0, color.a), bloomParams.w);\n gl_FragColor = vec4(color.xyz * contribute, 1.0);\n}"
  333. },
  334. "builtins": {
  335. "globals": {
  336. "blocks": [],
  337. "samplerTextures": [],
  338. "buffers": [],
  339. "images": []
  340. },
  341. "locals": {
  342. "blocks": [],
  343. "samplerTextures": [],
  344. "buffers": [],
  345. "images": []
  346. },
  347. "statistics": {
  348. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  349. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 1
  350. }
  351. },
  352. "defines": [
  353. {
  354. "name": "USE_INSTANCING",
  355. "type": "boolean",
  356. "defines": [],
  357. "editor": {
  358. "elevated": true
  359. }
  360. },
  361. {
  362. "name": "CC_USE_SKINNING",
  363. "type": "boolean",
  364. "defines": []
  365. },
  366. {
  367. "name": "CC_USE_BAKED_ANIMATION",
  368. "type": "boolean",
  369. "defines": [
  370. "USE_INSTANCING"
  371. ]
  372. },
  373. {
  374. "name": "CC_USE_LIGHTMAP",
  375. "type": "boolean",
  376. "defines": [
  377. "USE_INSTANCING"
  378. ]
  379. },
  380. {
  381. "name": "CC_USE_REFLECTION_PROBE",
  382. "type": "boolean",
  383. "defines": [
  384. "USE_INSTANCING"
  385. ]
  386. },
  387. {
  388. "name": "CC_RECEIVE_SHADOW",
  389. "type": "boolean",
  390. "defines": [
  391. "USE_INSTANCING"
  392. ]
  393. },
  394. {
  395. "name": "CC_USE_LIGHT_PROBE",
  396. "type": "boolean",
  397. "defines": [
  398. "USE_INSTANCING"
  399. ]
  400. },
  401. {
  402. "name": "CC_USE_MORPH",
  403. "type": "boolean",
  404. "defines": []
  405. }
  406. ],
  407. "name": "pipeline/post-process/bloom1|bloom-vs|prefilter-fs"
  408. },
  409. {
  410. "blocks": [],
  411. "samplerTextures": [],
  412. "samplers": [],
  413. "textures": [],
  414. "buffers": [],
  415. "images": [],
  416. "subpassInputs": [],
  417. "attributes": [
  418. {
  419. "name": "a_position",
  420. "defines": [],
  421. "format": 32,
  422. "location": 0
  423. },
  424. {
  425. "name": "a_normal",
  426. "defines": [],
  427. "format": 32,
  428. "location": 1
  429. },
  430. {
  431. "name": "a_texCoord",
  432. "defines": [],
  433. "format": 21,
  434. "location": 2
  435. },
  436. {
  437. "name": "a_tangent",
  438. "defines": [],
  439. "format": 44,
  440. "location": 3
  441. },
  442. {
  443. "name": "a_joints",
  444. "defines": [
  445. "CC_USE_SKINNING"
  446. ],
  447. "location": 4
  448. },
  449. {
  450. "name": "a_weights",
  451. "defines": [
  452. "CC_USE_SKINNING"
  453. ],
  454. "format": 44,
  455. "location": 5
  456. },
  457. {
  458. "name": "a_jointAnimInfo",
  459. "defines": [
  460. "USE_INSTANCING",
  461. "CC_USE_BAKED_ANIMATION"
  462. ],
  463. "format": 44,
  464. "isInstanced": true,
  465. "location": 6
  466. },
  467. {
  468. "name": "a_matWorld0",
  469. "defines": [
  470. "USE_INSTANCING"
  471. ],
  472. "format": 44,
  473. "isInstanced": true,
  474. "location": 7
  475. },
  476. {
  477. "name": "a_matWorld1",
  478. "defines": [
  479. "USE_INSTANCING"
  480. ],
  481. "format": 44,
  482. "isInstanced": true,
  483. "location": 8
  484. },
  485. {
  486. "name": "a_matWorld2",
  487. "defines": [
  488. "USE_INSTANCING"
  489. ],
  490. "format": 44,
  491. "isInstanced": true,
  492. "location": 9
  493. },
  494. {
  495. "name": "a_lightingMapUVParam",
  496. "defines": [
  497. "USE_INSTANCING",
  498. "CC_USE_LIGHTMAP"
  499. ],
  500. "format": 44,
  501. "isInstanced": true,
  502. "location": 10
  503. },
  504. {
  505. "name": "a_localShadowBiasAndProbeId",
  506. "defines": [
  507. "USE_INSTANCING"
  508. ],
  509. "format": 44,
  510. "isInstanced": true,
  511. "location": 11
  512. },
  513. {
  514. "name": "a_reflectionProbeData",
  515. "defines": [
  516. "USE_INSTANCING",
  517. "CC_USE_REFLECTION_PROBE"
  518. ],
  519. "format": 44,
  520. "isInstanced": true,
  521. "location": 12
  522. },
  523. {
  524. "name": "a_sh_linear_const_r",
  525. "defines": [
  526. "USE_INSTANCING",
  527. "CC_USE_LIGHT_PROBE"
  528. ],
  529. "format": 44,
  530. "isInstanced": true,
  531. "location": 13
  532. },
  533. {
  534. "name": "a_sh_linear_const_g",
  535. "defines": [
  536. "USE_INSTANCING",
  537. "CC_USE_LIGHT_PROBE"
  538. ],
  539. "format": 44,
  540. "isInstanced": true,
  541. "location": 14
  542. },
  543. {
  544. "name": "a_sh_linear_const_b",
  545. "defines": [
  546. "USE_INSTANCING",
  547. "CC_USE_LIGHT_PROBE"
  548. ],
  549. "format": 44,
  550. "isInstanced": true,
  551. "location": 15
  552. },
  553. {
  554. "name": "a_vertexId",
  555. "defines": [
  556. "CC_USE_MORPH"
  557. ],
  558. "format": 11,
  559. "location": 16
  560. }
  561. ],
  562. "varyings": [
  563. {
  564. "name": "v_uv",
  565. "type": 14,
  566. "count": 1,
  567. "defines": [],
  568. "stageFlags": 17,
  569. "location": 0
  570. }
  571. ],
  572. "fragColors": [
  573. {
  574. "name": "fragColor",
  575. "typename": "vec4",
  576. "type": 16,
  577. "count": 1,
  578. "defines": [],
  579. "stageFlags": 16,
  580. "location": 0
  581. }
  582. ],
  583. "descriptors": [
  584. {
  585. "rate": 0,
  586. "blocks": [],
  587. "samplerTextures": [],
  588. "samplers": [],
  589. "textures": [],
  590. "buffers": [],
  591. "images": [],
  592. "subpassInputs": []
  593. },
  594. {
  595. "rate": 1,
  596. "blocks": [],
  597. "samplerTextures": [],
  598. "samplers": [],
  599. "textures": [],
  600. "buffers": [],
  601. "images": [],
  602. "subpassInputs": []
  603. },
  604. {
  605. "rate": 2,
  606. "blocks": [],
  607. "samplerTextures": [],
  608. "samplers": [],
  609. "textures": [],
  610. "buffers": [],
  611. "images": [],
  612. "subpassInputs": []
  613. },
  614. {
  615. "rate": 3,
  616. "blocks": [
  617. {
  618. "name": "Pipeline",
  619. "members": [
  620. {
  621. "name": "g_platform",
  622. "type": 16,
  623. "count": 1
  624. }
  625. ],
  626. "defines": [],
  627. "stageFlags": 1,
  628. "binding": 0
  629. },
  630. {
  631. "name": "BloomTexUBO",
  632. "members": [
  633. {
  634. "name": "bloomTexSize",
  635. "type": 16,
  636. "count": 1
  637. }
  638. ],
  639. "defines": [],
  640. "stageFlags": 16,
  641. "binding": 1
  642. }
  643. ],
  644. "samplerTextures": [
  645. {
  646. "name": "bloomTexture",
  647. "type": 28,
  648. "count": 1,
  649. "defines": [],
  650. "stageFlags": 16,
  651. "binding": 2
  652. }
  653. ],
  654. "samplers": [],
  655. "textures": [],
  656. "buffers": [],
  657. "images": [],
  658. "subpassInputs": []
  659. }
  660. ],
  661. "hash": 1138412808,
  662. "glsl4": {
  663. "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};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 2) in vec2 a_texCoord;\nlayout(location = 3) in vec4 a_tangent;\n#if CC_USE_SKINNING\n layout(location = 4) in u32vec4 a_joints;\n layout(location = 5) in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n layout(location = 6) in highp vec4 a_jointAnimInfo;\n #endif\n layout(location = 7) in vec4 a_matWorld0;\n layout(location = 8) in vec4 a_matWorld1;\n layout(location = 9) in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n layout(location = 10) in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n layout(location = 11) in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n layout(location = 12) in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n layout(location = 13) in vec4 a_sh_linear_const_r;\n layout(location = 14) in vec4 a_sh_linear_const_g;\n layout(location = 15) in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n#endif\nlayout(set = 1, binding = 0) uniform Pipeline {\n vec4 g_platform;\n};\nlayout(location = 0) out 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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  664. "frag": "\n precision highp float;\n layout(location = 0) in vec2 v_uv;\n layout(set = 1, binding = 1) uniform BloomTexUBO {\n mediump vec4 bloomTexSize;\n };\n layout(set = 1, binding = 2) uniform sampler2D bloomTexture;\n layout(location = 0) out vec4 fragColor;\n vec3 downsample4taps(vec2 uv, vec2 halfpixel) {\n vec3 sum = texture(bloomTexture, uv + vec2(-halfpixel.x, halfpixel.y)).xyz;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x, halfpixel.y)).xyz;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x, -halfpixel.y)).xyz;\n sum += texture(bloomTexture, uv + vec2(-halfpixel.x, -halfpixel.y)).xyz;\n return sum / 4.0;\n }\n void main()\n {\n vec3 result = downsample4taps(v_uv, 1.0 / bloomTexSize.xy).rgb;\n fragColor = vec4(result, 1.0);\n }"
  665. },
  666. "glsl3": {
  667. "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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  668. "frag": "\n precision highp float;\n in vec2 v_uv;\n layout(std140) uniform BloomTexUBO {\n mediump vec4 bloomTexSize;\n };\n uniform sampler2D bloomTexture;\n layout(location = 0) out vec4 fragColor;\n vec3 downsample4taps(vec2 uv, vec2 halfpixel) {\n vec3 sum = texture(bloomTexture, uv + vec2(-halfpixel.x, halfpixel.y)).xyz;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x, halfpixel.y)).xyz;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x, -halfpixel.y)).xyz;\n sum += texture(bloomTexture, uv + vec2(-halfpixel.x, -halfpixel.y)).xyz;\n return sum / 4.0;\n }\n void main()\n {\n vec3 result = downsample4taps(v_uv, 1.0 / bloomTexSize.xy).rgb;\n fragColor = vec4(result, 1.0);\n }"
  669. },
  670. "glsl1": {
  671. "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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  672. "frag": "\n precision highp float;\n varying vec2 v_uv;\n uniform mediump vec4 bloomTexSize;\n uniform sampler2D bloomTexture;\n vec3 downsample4taps(vec2 uv, vec2 halfpixel) {\n vec3 sum = texture2D(bloomTexture, uv + vec2(-halfpixel.x, halfpixel.y)).xyz;\n sum += texture2D(bloomTexture, uv + vec2(halfpixel.x, halfpixel.y)).xyz;\n sum += texture2D(bloomTexture, uv + vec2(halfpixel.x, -halfpixel.y)).xyz;\n sum += texture2D(bloomTexture, uv + vec2(-halfpixel.x, -halfpixel.y)).xyz;\n return sum / 4.0;\n }\n void main()\n {\n vec3 result = downsample4taps(v_uv, 1.0 / bloomTexSize.xy).rgb;\n gl_FragColor = vec4(result, 1.0);\n }"
  673. },
  674. "builtins": {
  675. "globals": {
  676. "blocks": [],
  677. "samplerTextures": [],
  678. "buffers": [],
  679. "images": []
  680. },
  681. "locals": {
  682. "blocks": [],
  683. "samplerTextures": [],
  684. "buffers": [],
  685. "images": []
  686. },
  687. "statistics": {
  688. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  689. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 1
  690. }
  691. },
  692. "defines": [
  693. {
  694. "name": "USE_INSTANCING",
  695. "type": "boolean",
  696. "defines": [],
  697. "editor": {
  698. "elevated": true
  699. }
  700. },
  701. {
  702. "name": "CC_USE_SKINNING",
  703. "type": "boolean",
  704. "defines": []
  705. },
  706. {
  707. "name": "CC_USE_BAKED_ANIMATION",
  708. "type": "boolean",
  709. "defines": [
  710. "USE_INSTANCING"
  711. ]
  712. },
  713. {
  714. "name": "CC_USE_LIGHTMAP",
  715. "type": "boolean",
  716. "defines": [
  717. "USE_INSTANCING"
  718. ]
  719. },
  720. {
  721. "name": "CC_USE_REFLECTION_PROBE",
  722. "type": "boolean",
  723. "defines": [
  724. "USE_INSTANCING"
  725. ]
  726. },
  727. {
  728. "name": "CC_RECEIVE_SHADOW",
  729. "type": "boolean",
  730. "defines": [
  731. "USE_INSTANCING"
  732. ]
  733. },
  734. {
  735. "name": "CC_USE_LIGHT_PROBE",
  736. "type": "boolean",
  737. "defines": [
  738. "USE_INSTANCING"
  739. ]
  740. },
  741. {
  742. "name": "CC_USE_MORPH",
  743. "type": "boolean",
  744. "defines": []
  745. }
  746. ],
  747. "name": "pipeline/post-process/bloom1|bloom-vs|downsample-fs"
  748. },
  749. {
  750. "blocks": [],
  751. "samplerTextures": [],
  752. "samplers": [],
  753. "textures": [],
  754. "buffers": [],
  755. "images": [],
  756. "subpassInputs": [],
  757. "attributes": [
  758. {
  759. "name": "a_position",
  760. "defines": [],
  761. "format": 32,
  762. "location": 0
  763. },
  764. {
  765. "name": "a_normal",
  766. "defines": [],
  767. "format": 32,
  768. "location": 1
  769. },
  770. {
  771. "name": "a_texCoord",
  772. "defines": [],
  773. "format": 21,
  774. "location": 2
  775. },
  776. {
  777. "name": "a_tangent",
  778. "defines": [],
  779. "format": 44,
  780. "location": 3
  781. },
  782. {
  783. "name": "a_joints",
  784. "defines": [
  785. "CC_USE_SKINNING"
  786. ],
  787. "location": 4
  788. },
  789. {
  790. "name": "a_weights",
  791. "defines": [
  792. "CC_USE_SKINNING"
  793. ],
  794. "format": 44,
  795. "location": 5
  796. },
  797. {
  798. "name": "a_jointAnimInfo",
  799. "defines": [
  800. "USE_INSTANCING",
  801. "CC_USE_BAKED_ANIMATION"
  802. ],
  803. "format": 44,
  804. "isInstanced": true,
  805. "location": 6
  806. },
  807. {
  808. "name": "a_matWorld0",
  809. "defines": [
  810. "USE_INSTANCING"
  811. ],
  812. "format": 44,
  813. "isInstanced": true,
  814. "location": 7
  815. },
  816. {
  817. "name": "a_matWorld1",
  818. "defines": [
  819. "USE_INSTANCING"
  820. ],
  821. "format": 44,
  822. "isInstanced": true,
  823. "location": 8
  824. },
  825. {
  826. "name": "a_matWorld2",
  827. "defines": [
  828. "USE_INSTANCING"
  829. ],
  830. "format": 44,
  831. "isInstanced": true,
  832. "location": 9
  833. },
  834. {
  835. "name": "a_lightingMapUVParam",
  836. "defines": [
  837. "USE_INSTANCING",
  838. "CC_USE_LIGHTMAP"
  839. ],
  840. "format": 44,
  841. "isInstanced": true,
  842. "location": 10
  843. },
  844. {
  845. "name": "a_localShadowBiasAndProbeId",
  846. "defines": [
  847. "USE_INSTANCING"
  848. ],
  849. "format": 44,
  850. "isInstanced": true,
  851. "location": 11
  852. },
  853. {
  854. "name": "a_reflectionProbeData",
  855. "defines": [
  856. "USE_INSTANCING",
  857. "CC_USE_REFLECTION_PROBE"
  858. ],
  859. "format": 44,
  860. "isInstanced": true,
  861. "location": 12
  862. },
  863. {
  864. "name": "a_sh_linear_const_r",
  865. "defines": [
  866. "USE_INSTANCING",
  867. "CC_USE_LIGHT_PROBE"
  868. ],
  869. "format": 44,
  870. "isInstanced": true,
  871. "location": 13
  872. },
  873. {
  874. "name": "a_sh_linear_const_g",
  875. "defines": [
  876. "USE_INSTANCING",
  877. "CC_USE_LIGHT_PROBE"
  878. ],
  879. "format": 44,
  880. "isInstanced": true,
  881. "location": 14
  882. },
  883. {
  884. "name": "a_sh_linear_const_b",
  885. "defines": [
  886. "USE_INSTANCING",
  887. "CC_USE_LIGHT_PROBE"
  888. ],
  889. "format": 44,
  890. "isInstanced": true,
  891. "location": 15
  892. },
  893. {
  894. "name": "a_vertexId",
  895. "defines": [
  896. "CC_USE_MORPH"
  897. ],
  898. "format": 11,
  899. "location": 16
  900. }
  901. ],
  902. "varyings": [
  903. {
  904. "name": "v_uv",
  905. "type": 14,
  906. "count": 1,
  907. "defines": [],
  908. "stageFlags": 17,
  909. "location": 0
  910. }
  911. ],
  912. "fragColors": [
  913. {
  914. "name": "fragColor",
  915. "typename": "vec4",
  916. "type": 16,
  917. "count": 1,
  918. "defines": [],
  919. "stageFlags": 16,
  920. "location": 0
  921. }
  922. ],
  923. "descriptors": [
  924. {
  925. "rate": 0,
  926. "blocks": [],
  927. "samplerTextures": [],
  928. "samplers": [],
  929. "textures": [],
  930. "buffers": [],
  931. "images": [],
  932. "subpassInputs": []
  933. },
  934. {
  935. "rate": 1,
  936. "blocks": [],
  937. "samplerTextures": [],
  938. "samplers": [],
  939. "textures": [],
  940. "buffers": [],
  941. "images": [],
  942. "subpassInputs": []
  943. },
  944. {
  945. "rate": 2,
  946. "blocks": [],
  947. "samplerTextures": [],
  948. "samplers": [],
  949. "textures": [],
  950. "buffers": [],
  951. "images": [],
  952. "subpassInputs": []
  953. },
  954. {
  955. "rate": 3,
  956. "blocks": [
  957. {
  958. "name": "Pipeline",
  959. "members": [
  960. {
  961. "name": "g_platform",
  962. "type": 16,
  963. "count": 1
  964. }
  965. ],
  966. "defines": [],
  967. "stageFlags": 1,
  968. "binding": 0
  969. },
  970. {
  971. "name": "BloomTexUBO",
  972. "members": [
  973. {
  974. "name": "bloomTexSize",
  975. "type": 16,
  976. "count": 1
  977. }
  978. ],
  979. "defines": [],
  980. "stageFlags": 16,
  981. "binding": 1
  982. }
  983. ],
  984. "samplerTextures": [
  985. {
  986. "name": "bloomTexture",
  987. "type": 28,
  988. "count": 1,
  989. "defines": [],
  990. "stageFlags": 16,
  991. "binding": 2
  992. }
  993. ],
  994. "samplers": [],
  995. "textures": [],
  996. "buffers": [],
  997. "images": [],
  998. "subpassInputs": []
  999. }
  1000. ],
  1001. "hash": 2425578484,
  1002. "glsl4": {
  1003. "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};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 2) in vec2 a_texCoord;\nlayout(location = 3) in vec4 a_tangent;\n#if CC_USE_SKINNING\n layout(location = 4) in u32vec4 a_joints;\n layout(location = 5) in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n layout(location = 6) in highp vec4 a_jointAnimInfo;\n #endif\n layout(location = 7) in vec4 a_matWorld0;\n layout(location = 8) in vec4 a_matWorld1;\n layout(location = 9) in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n layout(location = 10) in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n layout(location = 11) in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n layout(location = 12) in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n layout(location = 13) in vec4 a_sh_linear_const_r;\n layout(location = 14) in vec4 a_sh_linear_const_g;\n layout(location = 15) in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n#endif\nlayout(set = 1, binding = 0) uniform Pipeline {\n vec4 g_platform;\n};\nlayout(location = 0) out 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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  1004. "frag": "\n precision highp float;\n layout(location = 0) in vec2 v_uv;\n layout(set = 1, binding = 1) uniform BloomTexUBO {\n mediump vec4 bloomTexSize;\n };\n layout(set = 1, binding = 2) uniform sampler2D bloomTexture;\n layout(location = 0) out vec4 fragColor;\n vec3 upsample(vec2 uv, vec2 halfpixel) {\n vec3 sum = texture(bloomTexture, uv + vec2(-halfpixel.x * 2.0, 0.0)).xyz;\n sum += texture(bloomTexture, uv + vec2(-halfpixel.x, halfpixel.y)).xyz * 2.0;\n sum += texture(bloomTexture, uv + vec2(0.0, halfpixel.y * 2.0)).xyz;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x, halfpixel.y)).xyz * 2.0;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x * 2.0, 0.0)).xyz;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x, -halfpixel.y)).xyz * 2.0;\n sum += texture(bloomTexture, uv + vec2(0.0, -halfpixel.y * 2.0)).xyz;\n sum += texture(bloomTexture, uv + vec2(-halfpixel.x, -halfpixel.y)).xyz * 2.0;\n return sum / 12.0;\n }\n void main() {\n vec3 result = upsample(v_uv, 0.5 / bloomTexSize.xy).rgb;\n fragColor = vec4(result, 1.0);\n }"
  1005. },
  1006. "glsl3": {
  1007. "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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  1008. "frag": "\n precision highp float;\n in vec2 v_uv;\n layout(std140) uniform BloomTexUBO {\n mediump vec4 bloomTexSize;\n };\n uniform sampler2D bloomTexture;\n layout(location = 0) out vec4 fragColor;\n vec3 upsample(vec2 uv, vec2 halfpixel) {\n vec3 sum = texture(bloomTexture, uv + vec2(-halfpixel.x * 2.0, 0.0)).xyz;\n sum += texture(bloomTexture, uv + vec2(-halfpixel.x, halfpixel.y)).xyz * 2.0;\n sum += texture(bloomTexture, uv + vec2(0.0, halfpixel.y * 2.0)).xyz;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x, halfpixel.y)).xyz * 2.0;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x * 2.0, 0.0)).xyz;\n sum += texture(bloomTexture, uv + vec2(halfpixel.x, -halfpixel.y)).xyz * 2.0;\n sum += texture(bloomTexture, uv + vec2(0.0, -halfpixel.y * 2.0)).xyz;\n sum += texture(bloomTexture, uv + vec2(-halfpixel.x, -halfpixel.y)).xyz * 2.0;\n return sum / 12.0;\n }\n void main() {\n vec3 result = upsample(v_uv, 0.5 / bloomTexSize.xy).rgb;\n fragColor = vec4(result, 1.0);\n }"
  1009. },
  1010. "glsl1": {
  1011. "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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  1012. "frag": "\n precision highp float;\n varying vec2 v_uv;\n uniform mediump vec4 bloomTexSize;\n uniform sampler2D bloomTexture;\n vec3 upsample(vec2 uv, vec2 halfpixel) {\n vec3 sum = texture2D(bloomTexture, uv + vec2(-halfpixel.x * 2.0, 0.0)).xyz;\n sum += texture2D(bloomTexture, uv + vec2(-halfpixel.x, halfpixel.y)).xyz * 2.0;\n sum += texture2D(bloomTexture, uv + vec2(0.0, halfpixel.y * 2.0)).xyz;\n sum += texture2D(bloomTexture, uv + vec2(halfpixel.x, halfpixel.y)).xyz * 2.0;\n sum += texture2D(bloomTexture, uv + vec2(halfpixel.x * 2.0, 0.0)).xyz;\n sum += texture2D(bloomTexture, uv + vec2(halfpixel.x, -halfpixel.y)).xyz * 2.0;\n sum += texture2D(bloomTexture, uv + vec2(0.0, -halfpixel.y * 2.0)).xyz;\n sum += texture2D(bloomTexture, uv + vec2(-halfpixel.x, -halfpixel.y)).xyz * 2.0;\n return sum / 12.0;\n }\n void main() {\n vec3 result = upsample(v_uv, 0.5 / bloomTexSize.xy).rgb;\n gl_FragColor = vec4(result, 1.0);\n }"
  1013. },
  1014. "builtins": {
  1015. "globals": {
  1016. "blocks": [],
  1017. "samplerTextures": [],
  1018. "buffers": [],
  1019. "images": []
  1020. },
  1021. "locals": {
  1022. "blocks": [],
  1023. "samplerTextures": [],
  1024. "buffers": [],
  1025. "images": []
  1026. },
  1027. "statistics": {
  1028. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  1029. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 1
  1030. }
  1031. },
  1032. "defines": [
  1033. {
  1034. "name": "USE_INSTANCING",
  1035. "type": "boolean",
  1036. "defines": [],
  1037. "editor": {
  1038. "elevated": true
  1039. }
  1040. },
  1041. {
  1042. "name": "CC_USE_SKINNING",
  1043. "type": "boolean",
  1044. "defines": []
  1045. },
  1046. {
  1047. "name": "CC_USE_BAKED_ANIMATION",
  1048. "type": "boolean",
  1049. "defines": [
  1050. "USE_INSTANCING"
  1051. ]
  1052. },
  1053. {
  1054. "name": "CC_USE_LIGHTMAP",
  1055. "type": "boolean",
  1056. "defines": [
  1057. "USE_INSTANCING"
  1058. ]
  1059. },
  1060. {
  1061. "name": "CC_USE_REFLECTION_PROBE",
  1062. "type": "boolean",
  1063. "defines": [
  1064. "USE_INSTANCING"
  1065. ]
  1066. },
  1067. {
  1068. "name": "CC_RECEIVE_SHADOW",
  1069. "type": "boolean",
  1070. "defines": [
  1071. "USE_INSTANCING"
  1072. ]
  1073. },
  1074. {
  1075. "name": "CC_USE_LIGHT_PROBE",
  1076. "type": "boolean",
  1077. "defines": [
  1078. "USE_INSTANCING"
  1079. ]
  1080. },
  1081. {
  1082. "name": "CC_USE_MORPH",
  1083. "type": "boolean",
  1084. "defines": []
  1085. }
  1086. ],
  1087. "name": "pipeline/post-process/bloom1|bloom-vs|upsample-fs"
  1088. },
  1089. {
  1090. "blocks": [],
  1091. "samplerTextures": [],
  1092. "samplers": [],
  1093. "textures": [],
  1094. "buffers": [],
  1095. "images": [],
  1096. "subpassInputs": [],
  1097. "attributes": [
  1098. {
  1099. "name": "a_position",
  1100. "defines": [],
  1101. "format": 32,
  1102. "location": 0
  1103. },
  1104. {
  1105. "name": "a_normal",
  1106. "defines": [],
  1107. "format": 32,
  1108. "location": 1
  1109. },
  1110. {
  1111. "name": "a_texCoord",
  1112. "defines": [],
  1113. "format": 21,
  1114. "location": 2
  1115. },
  1116. {
  1117. "name": "a_tangent",
  1118. "defines": [],
  1119. "format": 44,
  1120. "location": 3
  1121. },
  1122. {
  1123. "name": "a_joints",
  1124. "defines": [
  1125. "CC_USE_SKINNING"
  1126. ],
  1127. "location": 4
  1128. },
  1129. {
  1130. "name": "a_weights",
  1131. "defines": [
  1132. "CC_USE_SKINNING"
  1133. ],
  1134. "format": 44,
  1135. "location": 5
  1136. },
  1137. {
  1138. "name": "a_jointAnimInfo",
  1139. "defines": [
  1140. "USE_INSTANCING",
  1141. "CC_USE_BAKED_ANIMATION"
  1142. ],
  1143. "format": 44,
  1144. "isInstanced": true,
  1145. "location": 6
  1146. },
  1147. {
  1148. "name": "a_matWorld0",
  1149. "defines": [
  1150. "USE_INSTANCING"
  1151. ],
  1152. "format": 44,
  1153. "isInstanced": true,
  1154. "location": 7
  1155. },
  1156. {
  1157. "name": "a_matWorld1",
  1158. "defines": [
  1159. "USE_INSTANCING"
  1160. ],
  1161. "format": 44,
  1162. "isInstanced": true,
  1163. "location": 8
  1164. },
  1165. {
  1166. "name": "a_matWorld2",
  1167. "defines": [
  1168. "USE_INSTANCING"
  1169. ],
  1170. "format": 44,
  1171. "isInstanced": true,
  1172. "location": 9
  1173. },
  1174. {
  1175. "name": "a_lightingMapUVParam",
  1176. "defines": [
  1177. "USE_INSTANCING",
  1178. "CC_USE_LIGHTMAP"
  1179. ],
  1180. "format": 44,
  1181. "isInstanced": true,
  1182. "location": 10
  1183. },
  1184. {
  1185. "name": "a_localShadowBiasAndProbeId",
  1186. "defines": [
  1187. "USE_INSTANCING"
  1188. ],
  1189. "format": 44,
  1190. "isInstanced": true,
  1191. "location": 11
  1192. },
  1193. {
  1194. "name": "a_reflectionProbeData",
  1195. "defines": [
  1196. "USE_INSTANCING",
  1197. "CC_USE_REFLECTION_PROBE"
  1198. ],
  1199. "format": 44,
  1200. "isInstanced": true,
  1201. "location": 12
  1202. },
  1203. {
  1204. "name": "a_sh_linear_const_r",
  1205. "defines": [
  1206. "USE_INSTANCING",
  1207. "CC_USE_LIGHT_PROBE"
  1208. ],
  1209. "format": 44,
  1210. "isInstanced": true,
  1211. "location": 13
  1212. },
  1213. {
  1214. "name": "a_sh_linear_const_g",
  1215. "defines": [
  1216. "USE_INSTANCING",
  1217. "CC_USE_LIGHT_PROBE"
  1218. ],
  1219. "format": 44,
  1220. "isInstanced": true,
  1221. "location": 14
  1222. },
  1223. {
  1224. "name": "a_sh_linear_const_b",
  1225. "defines": [
  1226. "USE_INSTANCING",
  1227. "CC_USE_LIGHT_PROBE"
  1228. ],
  1229. "format": 44,
  1230. "isInstanced": true,
  1231. "location": 15
  1232. },
  1233. {
  1234. "name": "a_vertexId",
  1235. "defines": [
  1236. "CC_USE_MORPH"
  1237. ],
  1238. "format": 11,
  1239. "location": 16
  1240. }
  1241. ],
  1242. "varyings": [
  1243. {
  1244. "name": "v_uv",
  1245. "type": 14,
  1246. "count": 1,
  1247. "defines": [],
  1248. "stageFlags": 17,
  1249. "location": 0
  1250. }
  1251. ],
  1252. "fragColors": [
  1253. {
  1254. "name": "fragColor",
  1255. "typename": "vec4",
  1256. "type": 16,
  1257. "count": 1,
  1258. "defines": [],
  1259. "stageFlags": 16,
  1260. "location": 0
  1261. }
  1262. ],
  1263. "descriptors": [
  1264. {
  1265. "rate": 0,
  1266. "blocks": [],
  1267. "samplerTextures": [],
  1268. "samplers": [],
  1269. "textures": [],
  1270. "buffers": [],
  1271. "images": [],
  1272. "subpassInputs": []
  1273. },
  1274. {
  1275. "rate": 1,
  1276. "blocks": [],
  1277. "samplerTextures": [],
  1278. "samplers": [],
  1279. "textures": [],
  1280. "buffers": [],
  1281. "images": [],
  1282. "subpassInputs": []
  1283. },
  1284. {
  1285. "rate": 2,
  1286. "blocks": [],
  1287. "samplerTextures": [],
  1288. "samplers": [],
  1289. "textures": [],
  1290. "buffers": [],
  1291. "images": [],
  1292. "subpassInputs": []
  1293. },
  1294. {
  1295. "rate": 3,
  1296. "blocks": [
  1297. {
  1298. "name": "Pipeline",
  1299. "members": [
  1300. {
  1301. "name": "g_platform",
  1302. "type": 16,
  1303. "count": 1
  1304. }
  1305. ],
  1306. "defines": [],
  1307. "stageFlags": 1,
  1308. "binding": 0
  1309. },
  1310. {
  1311. "name": "BloomUBO",
  1312. "members": [
  1313. {
  1314. "name": "bloomParams",
  1315. "type": 16,
  1316. "count": 1
  1317. }
  1318. ],
  1319. "defines": [],
  1320. "stageFlags": 16,
  1321. "binding": 1
  1322. }
  1323. ],
  1324. "samplerTextures": [
  1325. {
  1326. "name": "bloomTexture",
  1327. "type": 28,
  1328. "count": 1,
  1329. "defines": [],
  1330. "stageFlags": 16,
  1331. "binding": 2
  1332. }
  1333. ],
  1334. "samplers": [],
  1335. "textures": [],
  1336. "buffers": [],
  1337. "images": [],
  1338. "subpassInputs": []
  1339. }
  1340. ],
  1341. "hash": 131905554,
  1342. "glsl4": {
  1343. "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};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 2) in vec2 a_texCoord;\nlayout(location = 3) in vec4 a_tangent;\n#if CC_USE_SKINNING\n layout(location = 4) in u32vec4 a_joints;\n layout(location = 5) in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n layout(location = 6) in highp vec4 a_jointAnimInfo;\n #endif\n layout(location = 7) in vec4 a_matWorld0;\n layout(location = 8) in vec4 a_matWorld1;\n layout(location = 9) in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n layout(location = 10) in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n layout(location = 11) in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n layout(location = 12) in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n layout(location = 13) in vec4 a_sh_linear_const_r;\n layout(location = 14) in vec4 a_sh_linear_const_g;\n layout(location = 15) in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n#endif\nlayout(set = 1, binding = 0) uniform Pipeline {\n vec4 g_platform;\n};\nlayout(location = 0) out 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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  1344. "frag": "\nprecision highp float;\nlayout(location = 0) in vec2 v_uv;\nlayout(set = 1, binding = 1) uniform BloomUBO {\n mediump vec4 bloomParams;\n};\nlayout(set = 1, binding = 2) uniform sampler2D bloomTexture;\nlayout(location = 0) out vec4 fragColor;\nvoid main() {\n vec3 bloomColor = texture(bloomTexture, v_uv).rgb;\n fragColor = vec4(bloomColor, 0);\n}"
  1345. },
  1346. "glsl3": {
  1347. "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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  1348. "frag": "\nprecision highp float;\nin vec2 v_uv;\nlayout(std140) uniform BloomUBO {\n mediump vec4 bloomParams;\n};\nuniform sampler2D bloomTexture;\nlayout(location = 0) out vec4 fragColor;\nvoid main() {\n vec3 bloomColor = texture(bloomTexture, v_uv).rgb;\n fragColor = vec4(bloomColor, 0);\n}"
  1349. },
  1350. "glsl1": {
  1351. "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 (v_uv).y = (g_platform.w > 1.0 ? 1.0-(v_uv).y : (v_uv).y);\n}",
  1352. "frag": "\nprecision highp float;\nvarying vec2 v_uv;\nuniform sampler2D bloomTexture;\nvoid main() {\n vec3 bloomColor = texture2D(bloomTexture, v_uv).rgb;\n gl_FragColor = vec4(bloomColor, 0);\n}"
  1353. },
  1354. "builtins": {
  1355. "globals": {
  1356. "blocks": [],
  1357. "samplerTextures": [],
  1358. "buffers": [],
  1359. "images": []
  1360. },
  1361. "locals": {
  1362. "blocks": [],
  1363. "samplerTextures": [],
  1364. "buffers": [],
  1365. "images": []
  1366. },
  1367. "statistics": {
  1368. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  1369. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 1
  1370. }
  1371. },
  1372. "defines": [
  1373. {
  1374. "name": "USE_INSTANCING",
  1375. "type": "boolean",
  1376. "defines": [],
  1377. "editor": {
  1378. "elevated": true
  1379. }
  1380. },
  1381. {
  1382. "name": "CC_USE_SKINNING",
  1383. "type": "boolean",
  1384. "defines": []
  1385. },
  1386. {
  1387. "name": "CC_USE_BAKED_ANIMATION",
  1388. "type": "boolean",
  1389. "defines": [
  1390. "USE_INSTANCING"
  1391. ]
  1392. },
  1393. {
  1394. "name": "CC_USE_LIGHTMAP",
  1395. "type": "boolean",
  1396. "defines": [
  1397. "USE_INSTANCING"
  1398. ]
  1399. },
  1400. {
  1401. "name": "CC_USE_REFLECTION_PROBE",
  1402. "type": "boolean",
  1403. "defines": [
  1404. "USE_INSTANCING"
  1405. ]
  1406. },
  1407. {
  1408. "name": "CC_RECEIVE_SHADOW",
  1409. "type": "boolean",
  1410. "defines": [
  1411. "USE_INSTANCING"
  1412. ]
  1413. },
  1414. {
  1415. "name": "CC_USE_LIGHT_PROBE",
  1416. "type": "boolean",
  1417. "defines": [
  1418. "USE_INSTANCING"
  1419. ]
  1420. },
  1421. {
  1422. "name": "CC_USE_MORPH",
  1423. "type": "boolean",
  1424. "defines": []
  1425. }
  1426. ],
  1427. "name": "pipeline/post-process/bloom1|bloom-vs|combine-fs"
  1428. }
  1429. ],
  1430. "combinations": [],
  1431. "hideInEditor": false
  1432. }