4361db28-3f24-44cc-8e51-32ee5fd651ac.json 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "pipeline/post-process/fsr",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "passes": [
  10. {
  11. "pass": "post-process",
  12. "rasterizerState": {
  13. "cullMode": 0
  14. },
  15. "blendState": {
  16. "targets": [
  17. {
  18. "blend": true,
  19. "blendSrc": 1,
  20. "blendDst": 0
  21. }
  22. ]
  23. },
  24. "program": "pipeline/post-process/fsr|vs|fs-easu",
  25. "depthStencilState": {
  26. "depthTest": false,
  27. "depthWrite": false
  28. }
  29. },
  30. {
  31. "pass": "post-process",
  32. "rasterizerState": {
  33. "cullMode": 0
  34. },
  35. "blendState": {
  36. "targets": [
  37. {
  38. "blend": true,
  39. "blendSrc": 1,
  40. "blendDst": 0
  41. }
  42. ]
  43. },
  44. "program": "pipeline/post-process/fsr|vs|fs-rcas",
  45. "depthStencilState": {
  46. "depthTest": false,
  47. "depthWrite": false
  48. }
  49. }
  50. ]
  51. }
  52. ],
  53. "shaders": [
  54. {
  55. "blocks": [
  56. {
  57. "name": "PostUBO",
  58. "members": [
  59. {
  60. "name": "fsrParams",
  61. "type": 16,
  62. "count": 1
  63. },
  64. {
  65. "name": "texSize",
  66. "type": 16,
  67. "count": 1
  68. }
  69. ],
  70. "defines": [],
  71. "stageFlags": 16,
  72. "binding": 0
  73. }
  74. ],
  75. "samplerTextures": [],
  76. "samplers": [],
  77. "textures": [],
  78. "buffers": [],
  79. "images": [],
  80. "subpassInputs": [],
  81. "attributes": [
  82. {
  83. "name": "a_position",
  84. "defines": [],
  85. "format": 32,
  86. "location": 0
  87. },
  88. {
  89. "name": "a_normal",
  90. "defines": [],
  91. "format": 32,
  92. "location": 1
  93. },
  94. {
  95. "name": "a_texCoord",
  96. "defines": [],
  97. "format": 21,
  98. "location": 2
  99. },
  100. {
  101. "name": "a_tangent",
  102. "defines": [],
  103. "format": 44,
  104. "location": 3
  105. },
  106. {
  107. "name": "a_joints",
  108. "defines": [
  109. "CC_USE_SKINNING"
  110. ],
  111. "location": 4
  112. },
  113. {
  114. "name": "a_weights",
  115. "defines": [
  116. "CC_USE_SKINNING"
  117. ],
  118. "format": 44,
  119. "location": 5
  120. },
  121. {
  122. "name": "a_jointAnimInfo",
  123. "defines": [
  124. "USE_INSTANCING",
  125. "CC_USE_BAKED_ANIMATION"
  126. ],
  127. "format": 44,
  128. "isInstanced": true,
  129. "location": 6
  130. },
  131. {
  132. "name": "a_matWorld0",
  133. "defines": [
  134. "USE_INSTANCING"
  135. ],
  136. "format": 44,
  137. "isInstanced": true,
  138. "location": 7
  139. },
  140. {
  141. "name": "a_matWorld1",
  142. "defines": [
  143. "USE_INSTANCING"
  144. ],
  145. "format": 44,
  146. "isInstanced": true,
  147. "location": 8
  148. },
  149. {
  150. "name": "a_matWorld2",
  151. "defines": [
  152. "USE_INSTANCING"
  153. ],
  154. "format": 44,
  155. "isInstanced": true,
  156. "location": 9
  157. },
  158. {
  159. "name": "a_lightingMapUVParam",
  160. "defines": [
  161. "USE_INSTANCING",
  162. "CC_USE_LIGHTMAP"
  163. ],
  164. "format": 44,
  165. "isInstanced": true,
  166. "location": 10
  167. },
  168. {
  169. "name": "a_localShadowBiasAndProbeId",
  170. "defines": [
  171. "USE_INSTANCING"
  172. ],
  173. "format": 44,
  174. "isInstanced": true,
  175. "location": 11
  176. },
  177. {
  178. "name": "a_reflectionProbeData",
  179. "defines": [
  180. "USE_INSTANCING",
  181. "CC_USE_REFLECTION_PROBE"
  182. ],
  183. "format": 44,
  184. "isInstanced": true,
  185. "location": 12
  186. },
  187. {
  188. "name": "a_sh_linear_const_r",
  189. "defines": [
  190. "USE_INSTANCING",
  191. "CC_USE_LIGHT_PROBE"
  192. ],
  193. "format": 44,
  194. "isInstanced": true,
  195. "location": 13
  196. },
  197. {
  198. "name": "a_sh_linear_const_g",
  199. "defines": [
  200. "USE_INSTANCING",
  201. "CC_USE_LIGHT_PROBE"
  202. ],
  203. "format": 44,
  204. "isInstanced": true,
  205. "location": 14
  206. },
  207. {
  208. "name": "a_sh_linear_const_b",
  209. "defines": [
  210. "USE_INSTANCING",
  211. "CC_USE_LIGHT_PROBE"
  212. ],
  213. "format": 44,
  214. "isInstanced": true,
  215. "location": 15
  216. },
  217. {
  218. "name": "a_vertexId",
  219. "defines": [
  220. "CC_USE_MORPH"
  221. ],
  222. "format": 11,
  223. "location": 16
  224. }
  225. ],
  226. "varyings": [
  227. {
  228. "name": "v_uv",
  229. "type": 14,
  230. "count": 1,
  231. "defines": [],
  232. "stageFlags": 17,
  233. "location": 0
  234. }
  235. ],
  236. "fragColors": [
  237. {
  238. "name": "fragColor",
  239. "typename": "vec4",
  240. "type": 16,
  241. "count": 1,
  242. "defines": [],
  243. "stageFlags": 16,
  244. "location": 0
  245. }
  246. ],
  247. "descriptors": [
  248. {
  249. "rate": 0,
  250. "blocks": [],
  251. "samplerTextures": [],
  252. "samplers": [],
  253. "textures": [],
  254. "buffers": [],
  255. "images": [],
  256. "subpassInputs": []
  257. },
  258. {
  259. "rate": 1,
  260. "blocks": [
  261. {
  262. "name": "PostUBO",
  263. "members": [
  264. {
  265. "name": "fsrParams",
  266. "type": 16,
  267. "count": 1
  268. },
  269. {
  270. "name": "texSize",
  271. "type": 16,
  272. "count": 1
  273. }
  274. ],
  275. "defines": [],
  276. "stageFlags": 16,
  277. "binding": 0
  278. }
  279. ],
  280. "samplerTextures": [],
  281. "samplers": [],
  282. "textures": [],
  283. "buffers": [],
  284. "images": [],
  285. "subpassInputs": []
  286. },
  287. {
  288. "rate": 2,
  289. "blocks": [],
  290. "samplerTextures": [],
  291. "samplers": [],
  292. "textures": [],
  293. "buffers": [],
  294. "images": [],
  295. "subpassInputs": []
  296. },
  297. {
  298. "rate": 3,
  299. "blocks": [
  300. {
  301. "tags": {
  302. "builtin": "global"
  303. },
  304. "name": "CCGlobal",
  305. "members": [
  306. {
  307. "name": "cc_time",
  308. "typename": "vec4",
  309. "type": 16,
  310. "count": 1,
  311. "precision": "highp "
  312. },
  313. {
  314. "name": "cc_screenSize",
  315. "typename": "vec4",
  316. "type": 16,
  317. "count": 1,
  318. "precision": "mediump "
  319. },
  320. {
  321. "name": "cc_nativeSize",
  322. "typename": "vec4",
  323. "type": 16,
  324. "count": 1,
  325. "precision": "mediump "
  326. },
  327. {
  328. "name": "cc_probeInfo",
  329. "typename": "vec4",
  330. "type": 16,
  331. "count": 1,
  332. "precision": "mediump "
  333. },
  334. {
  335. "name": "cc_debug_view_mode",
  336. "typename": "vec4",
  337. "type": 16,
  338. "count": 1,
  339. "precision": "mediump "
  340. }
  341. ],
  342. "defines": [],
  343. "stageFlags": 17
  344. },
  345. {
  346. "tags": {
  347. "builtin": "global"
  348. },
  349. "name": "CCCamera",
  350. "members": [
  351. {
  352. "name": "cc_matView",
  353. "typename": "mat4",
  354. "type": 25,
  355. "count": 1,
  356. "precision": "highp "
  357. },
  358. {
  359. "name": "cc_matViewInv",
  360. "typename": "mat4",
  361. "type": 25,
  362. "count": 1,
  363. "precision": "highp "
  364. },
  365. {
  366. "name": "cc_matProj",
  367. "typename": "mat4",
  368. "type": 25,
  369. "count": 1,
  370. "precision": "highp "
  371. },
  372. {
  373. "name": "cc_matProjInv",
  374. "typename": "mat4",
  375. "type": 25,
  376. "count": 1,
  377. "precision": "highp "
  378. },
  379. {
  380. "name": "cc_matViewProj",
  381. "typename": "mat4",
  382. "type": 25,
  383. "count": 1,
  384. "precision": "highp "
  385. },
  386. {
  387. "name": "cc_matViewProjInv",
  388. "typename": "mat4",
  389. "type": 25,
  390. "count": 1,
  391. "precision": "highp "
  392. },
  393. {
  394. "name": "cc_cameraPos",
  395. "typename": "vec4",
  396. "type": 16,
  397. "count": 1,
  398. "precision": "highp "
  399. },
  400. {
  401. "name": "cc_surfaceTransform",
  402. "typename": "vec4",
  403. "type": 16,
  404. "count": 1,
  405. "precision": "mediump "
  406. },
  407. {
  408. "name": "cc_screenScale",
  409. "typename": "vec4",
  410. "type": 16,
  411. "count": 1,
  412. "precision": "mediump "
  413. },
  414. {
  415. "name": "cc_exposure",
  416. "typename": "vec4",
  417. "type": 16,
  418. "count": 1,
  419. "precision": "mediump "
  420. },
  421. {
  422. "name": "cc_mainLitDir",
  423. "typename": "vec4",
  424. "type": 16,
  425. "count": 1,
  426. "precision": "mediump "
  427. },
  428. {
  429. "name": "cc_mainLitColor",
  430. "typename": "vec4",
  431. "type": 16,
  432. "count": 1,
  433. "precision": "mediump "
  434. },
  435. {
  436. "name": "cc_ambientSky",
  437. "typename": "vec4",
  438. "type": 16,
  439. "count": 1,
  440. "precision": "mediump "
  441. },
  442. {
  443. "name": "cc_ambientGround",
  444. "typename": "vec4",
  445. "type": 16,
  446. "count": 1,
  447. "precision": "mediump "
  448. },
  449. {
  450. "name": "cc_fogColor",
  451. "typename": "vec4",
  452. "type": 16,
  453. "count": 1,
  454. "precision": "mediump "
  455. },
  456. {
  457. "name": "cc_fogBase",
  458. "typename": "vec4",
  459. "type": 16,
  460. "count": 1,
  461. "precision": "mediump "
  462. },
  463. {
  464. "name": "cc_fogAdd",
  465. "typename": "vec4",
  466. "type": 16,
  467. "count": 1,
  468. "precision": "mediump "
  469. },
  470. {
  471. "name": "cc_nearFar",
  472. "typename": "vec4",
  473. "type": 16,
  474. "count": 1,
  475. "precision": "mediump "
  476. },
  477. {
  478. "name": "cc_viewPort",
  479. "typename": "vec4",
  480. "type": 16,
  481. "count": 1,
  482. "precision": "mediump "
  483. }
  484. ],
  485. "defines": [],
  486. "stageFlags": 17
  487. }
  488. ],
  489. "samplerTextures": [
  490. {
  491. "name": "outputResultMap",
  492. "type": 28,
  493. "count": 1,
  494. "defines": [],
  495. "stageFlags": 16,
  496. "binding": 1
  497. }
  498. ],
  499. "samplers": [],
  500. "textures": [],
  501. "buffers": [],
  502. "images": [],
  503. "subpassInputs": []
  504. }
  505. ],
  506. "hash": 2384840408,
  507. "glsl4": {
  508. "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 = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) 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.xy = cc_cameraPos.w == 0.0 ? vec2(In.position.xy.x, -In.position.xy.y) : In.position.xy;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  509. "frag": "\nprecision highp float;\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec3 FsrEasuCF(vec2 p);\nvoid FsrEasuCon(\n out vec4 con0,\n out vec4 con1,\n out vec4 con2,\n out vec4 con3,\n vec2 inputViewportInPixels,\n vec2 inputSizeInPixels,\n vec2 outputSizeInPixels\n)\n{\n con0 = vec4(\n inputViewportInPixels.x/outputSizeInPixels.x,\n inputViewportInPixels.y/outputSizeInPixels.y,\n .5*inputViewportInPixels.x/outputSizeInPixels.x-.5,\n .5*inputViewportInPixels.y/outputSizeInPixels.y-.5\n );\n con1 = vec4(1,1,1,-1)/inputSizeInPixels.xyxy;\n con2 = vec4(-1,2,1,2)/inputSizeInPixels.xyxy;\n con3 = vec4(0,4,0,0)/inputSizeInPixels.xyxy;\n}\nvoid FsrEasuTapF(\n inout vec3 aC,\n inout float aW,\n vec2 off,\n vec2 dir,\n vec2 len,\n float lob,\n float clp,\n vec3 c\n)\n{\n vec2 v = vec2(dot(off, dir), dot(off,vec2(-dir.y,dir.x)));\n v *= len;\n float d2 = min(dot(v,v),clp);\n float wB = .4 * d2 - 1.;\n float wA = lob * d2 -1.;\n wB *= wB;\n wA *= wA;\n wB = 1.5625*wB-.5625;\n float w= wB * wA;\n aC += c*w;\n aW += w;\n}\nvoid FsrEasuSetF(\n inout vec2 dir,\n inout float len,\n float w,\n float lA,float lB,float lC,float lD,float lE\n)\n{\n float lenX = max(abs(lD - lC), abs(lC - lB));\n float dirX = lD - lB;\n dir.x += dirX * w;\n lenX = clamp(abs(dirX)/lenX,0.,1.);\n lenX *= lenX;\n len += lenX * w;\n float lenY = max(abs(lE - lC), abs(lC - lA));\n float dirY = lE - lA;\n dir.y += dirY * w;\n lenY = clamp(abs(dirY) / lenY,0.,1.);\n lenY *= lenY;\n len += lenY * w;\n}\nvoid FsrEasuF(\n out vec3 pix,\n vec2 ip,\n vec4 con0,\n vec4 con1,\n vec4 con2,\n vec4 con3\n)\n{\n vec2 pp = ip * con0.xy + con0.zw;\n vec2 fp = floor(pp);\n pp -= fp;\n vec2 p0 = fp * con1.xy + con1.zw;\n vec2 p1 = p0 + con2.xy;\n vec2 p2 = p0 + con2.zw;\n vec2 p3 = p0 + con3.xy;\n vec4 off = vec4(-.5,.5,-.5,.5)*con1.xxyy;\n vec3 bC = FsrEasuCF(p0 + off.xw); float bL = bC.g + 0.5 *(bC.r + bC.b);\n vec3 cC = FsrEasuCF(p0 + off.yw); float cL = cC.g + 0.5 *(cC.r + cC.b);\n vec3 iC = FsrEasuCF(p1 + off.xw); float iL = iC.g + 0.5 *(iC.r + iC.b);\n vec3 jC = FsrEasuCF(p1 + off.yw); float jL = jC.g + 0.5 *(jC.r + jC.b);\n vec3 fC = FsrEasuCF(p1 + off.yz); float fL = fC.g + 0.5 *(fC.r + fC.b);\n vec3 eC = FsrEasuCF(p1 + off.xz); float eL = eC.g + 0.5 *(eC.r + eC.b);\n vec3 kC = FsrEasuCF(p2 + off.xw); float kL = kC.g + 0.5 *(kC.r + kC.b);\n vec3 lC = FsrEasuCF(p2 + off.yw); float lL = lC.g + 0.5 *(lC.r + lC.b);\n vec3 hC = FsrEasuCF(p2 + off.yz); float hL = hC.g + 0.5 *(hC.r + hC.b);\n vec3 gC = FsrEasuCF(p2 + off.xz); float gL = gC.g + 0.5 *(gC.r + gC.b);\n vec3 oC = FsrEasuCF(p3 + off.yz); float oL = oC.g + 0.5 *(oC.r + oC.b);\n vec3 nC = FsrEasuCF(p3 + off.xz); float nL = nC.g + 0.5 *(nC.r + nC.b);\n vec2 dir = vec2(0);\n float len = 0.;\n FsrEasuSetF(dir, len, (1.-pp.x)*(1.-pp.y), bL, eL, fL, gL, jL);\n FsrEasuSetF(dir, len, pp.x *(1.-pp.y), cL, fL, gL, hL, kL);\n FsrEasuSetF(dir, len, (1.-pp.x)* pp.y , fL, iL, jL, kL, nL);\n FsrEasuSetF(dir, len, pp.x * pp.y , gL, jL, kL, lL, oL);\n vec2 dir2 = dir * dir;\n float dirR = dir2.x + dir2.y;\n bool zro = dirR < (1.0/32768.0);\n dirR = inversesqrt(dirR);\n dirR = zro ? 1.0 : dirR;\n dir.x = zro ? 1.0 : dir.x;\n dir *= vec2(dirR);\n len = len * 0.5;\n len *= len;\n float stretch = dot(dir,dir) / (max(abs(dir.x), abs(dir.y)));\n vec2 len2 = vec2(1. +(stretch-1.0)*len, 1. -.5 * len);\n float lob = .5 - .29 * len;\n float clp = 1./lob;\n vec3 min4 = min(min(fC,gC),min(jC,kC));\n vec3 max4 = max(max(fC,gC),max(jC,kC));\n vec3 aC = vec3(0);\n float aW = 0.;\n FsrEasuTapF(aC, aW, vec2( 0,-1)-pp, dir, len2, lob, clp, bC);\n FsrEasuTapF(aC, aW, vec2( 1,-1)-pp, dir, len2, lob, clp, cC);\n FsrEasuTapF(aC, aW, vec2(-1, 1)-pp, dir, len2, lob, clp, iC);\n FsrEasuTapF(aC, aW, vec2( 0, 1)-pp, dir, len2, lob, clp, jC);\n FsrEasuTapF(aC, aW, vec2( 0, 0)-pp, dir, len2, lob, clp, fC);\n FsrEasuTapF(aC, aW, vec2(-1, 0)-pp, dir, len2, lob, clp, eC);\n FsrEasuTapF(aC, aW, vec2( 1, 1)-pp, dir, len2, lob, clp, kC);\n FsrEasuTapF(aC, aW, vec2( 2, 1)-pp, dir, len2, lob, clp, lC);\n FsrEasuTapF(aC, aW, vec2( 2, 0)-pp, dir, len2, lob, clp, hC);\n FsrEasuTapF(aC, aW, vec2( 1, 0)-pp, dir, len2, lob, clp, gC);\n FsrEasuTapF(aC, aW, vec2( 1, 2)-pp, dir, len2, lob, clp, oC);\n FsrEasuTapF(aC, aW, vec2( 0, 2)-pp, dir, len2, lob, clp, nC);\n pix=min(max4,max(min4,aC/aW));\n}\n#define FSR_RCAS_LIMIT (0.25-(1.0/16.0))\n#define FSR_RCAS_DENOISE 0\nvec4 FsrRcasLoadF(vec2 p);\nlayout(location = 0) in vec2 v_uv;\nlayout(set = 1, binding = 0) uniform PostUBO {\n vec4 fsrParams;\n vec4 texSize;\n};\nlayout(set = 1, binding = 1) uniform sampler2D outputResultMap;\nvec3 FsrEasuCF(vec2 p) {\n vec4 color = texture(outputResultMap, p);\n return color.rgb;\n}\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n vec3 c;\n vec4 con0, con1, con2, con3;\n vec2 rendersize = texSize.xy;\n FsrEasuCon(\n con0, con1, con2, con3,\n rendersize, rendersize, texSize.zw\n );\n FsrEasuF(c, gl_FragCoord.xy, con0, con1, con2, con3);\n float alpha = texture(outputResultMap, v_uv).a;\n fragColor = vec4(c.xyz, alpha);\n}"
  510. },
  511. "glsl3": {
  512. "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 CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\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.xy = cc_cameraPos.w == 0.0 ? vec2(In.position.xy.x, -In.position.xy.y) : In.position.xy;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  513. "frag": "\nprecision highp float;\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec3 FsrEasuCF(vec2 p);\nvoid FsrEasuCon(\n out vec4 con0,\n out vec4 con1,\n out vec4 con2,\n out vec4 con3,\n vec2 inputViewportInPixels,\n vec2 inputSizeInPixels,\n vec2 outputSizeInPixels\n)\n{\n con0 = vec4(\n inputViewportInPixels.x/outputSizeInPixels.x,\n inputViewportInPixels.y/outputSizeInPixels.y,\n .5*inputViewportInPixels.x/outputSizeInPixels.x-.5,\n .5*inputViewportInPixels.y/outputSizeInPixels.y-.5\n );\n con1 = vec4(1,1,1,-1)/inputSizeInPixels.xyxy;\n con2 = vec4(-1,2,1,2)/inputSizeInPixels.xyxy;\n con3 = vec4(0,4,0,0)/inputSizeInPixels.xyxy;\n}\nvoid FsrEasuTapF(\n inout vec3 aC,\n inout float aW,\n vec2 off,\n vec2 dir,\n vec2 len,\n float lob,\n float clp,\n vec3 c\n)\n{\n vec2 v = vec2(dot(off, dir), dot(off,vec2(-dir.y,dir.x)));\n v *= len;\n float d2 = min(dot(v,v),clp);\n float wB = .4 * d2 - 1.;\n float wA = lob * d2 -1.;\n wB *= wB;\n wA *= wA;\n wB = 1.5625*wB-.5625;\n float w= wB * wA;\n aC += c*w;\n aW += w;\n}\nvoid FsrEasuSetF(\n inout vec2 dir,\n inout float len,\n float w,\n float lA,float lB,float lC,float lD,float lE\n)\n{\n float lenX = max(abs(lD - lC), abs(lC - lB));\n float dirX = lD - lB;\n dir.x += dirX * w;\n lenX = clamp(abs(dirX)/lenX,0.,1.);\n lenX *= lenX;\n len += lenX * w;\n float lenY = max(abs(lE - lC), abs(lC - lA));\n float dirY = lE - lA;\n dir.y += dirY * w;\n lenY = clamp(abs(dirY) / lenY,0.,1.);\n lenY *= lenY;\n len += lenY * w;\n}\nvoid FsrEasuF(\n out vec3 pix,\n vec2 ip,\n vec4 con0,\n vec4 con1,\n vec4 con2,\n vec4 con3\n)\n{\n vec2 pp = ip * con0.xy + con0.zw;\n vec2 fp = floor(pp);\n pp -= fp;\n vec2 p0 = fp * con1.xy + con1.zw;\n vec2 p1 = p0 + con2.xy;\n vec2 p2 = p0 + con2.zw;\n vec2 p3 = p0 + con3.xy;\n vec4 off = vec4(-.5,.5,-.5,.5)*con1.xxyy;\n vec3 bC = FsrEasuCF(p0 + off.xw); float bL = bC.g + 0.5 *(bC.r + bC.b);\n vec3 cC = FsrEasuCF(p0 + off.yw); float cL = cC.g + 0.5 *(cC.r + cC.b);\n vec3 iC = FsrEasuCF(p1 + off.xw); float iL = iC.g + 0.5 *(iC.r + iC.b);\n vec3 jC = FsrEasuCF(p1 + off.yw); float jL = jC.g + 0.5 *(jC.r + jC.b);\n vec3 fC = FsrEasuCF(p1 + off.yz); float fL = fC.g + 0.5 *(fC.r + fC.b);\n vec3 eC = FsrEasuCF(p1 + off.xz); float eL = eC.g + 0.5 *(eC.r + eC.b);\n vec3 kC = FsrEasuCF(p2 + off.xw); float kL = kC.g + 0.5 *(kC.r + kC.b);\n vec3 lC = FsrEasuCF(p2 + off.yw); float lL = lC.g + 0.5 *(lC.r + lC.b);\n vec3 hC = FsrEasuCF(p2 + off.yz); float hL = hC.g + 0.5 *(hC.r + hC.b);\n vec3 gC = FsrEasuCF(p2 + off.xz); float gL = gC.g + 0.5 *(gC.r + gC.b);\n vec3 oC = FsrEasuCF(p3 + off.yz); float oL = oC.g + 0.5 *(oC.r + oC.b);\n vec3 nC = FsrEasuCF(p3 + off.xz); float nL = nC.g + 0.5 *(nC.r + nC.b);\n vec2 dir = vec2(0);\n float len = 0.;\n FsrEasuSetF(dir, len, (1.-pp.x)*(1.-pp.y), bL, eL, fL, gL, jL);\n FsrEasuSetF(dir, len, pp.x *(1.-pp.y), cL, fL, gL, hL, kL);\n FsrEasuSetF(dir, len, (1.-pp.x)* pp.y , fL, iL, jL, kL, nL);\n FsrEasuSetF(dir, len, pp.x * pp.y , gL, jL, kL, lL, oL);\n vec2 dir2 = dir * dir;\n float dirR = dir2.x + dir2.y;\n bool zro = dirR < (1.0/32768.0);\n dirR = inversesqrt(dirR);\n dirR = zro ? 1.0 : dirR;\n dir.x = zro ? 1.0 : dir.x;\n dir *= vec2(dirR);\n len = len * 0.5;\n len *= len;\n float stretch = dot(dir,dir) / (max(abs(dir.x), abs(dir.y)));\n vec2 len2 = vec2(1. +(stretch-1.0)*len, 1. -.5 * len);\n float lob = .5 - .29 * len;\n float clp = 1./lob;\n vec3 min4 = min(min(fC,gC),min(jC,kC));\n vec3 max4 = max(max(fC,gC),max(jC,kC));\n vec3 aC = vec3(0);\n float aW = 0.;\n FsrEasuTapF(aC, aW, vec2( 0,-1)-pp, dir, len2, lob, clp, bC);\n FsrEasuTapF(aC, aW, vec2( 1,-1)-pp, dir, len2, lob, clp, cC);\n FsrEasuTapF(aC, aW, vec2(-1, 1)-pp, dir, len2, lob, clp, iC);\n FsrEasuTapF(aC, aW, vec2( 0, 1)-pp, dir, len2, lob, clp, jC);\n FsrEasuTapF(aC, aW, vec2( 0, 0)-pp, dir, len2, lob, clp, fC);\n FsrEasuTapF(aC, aW, vec2(-1, 0)-pp, dir, len2, lob, clp, eC);\n FsrEasuTapF(aC, aW, vec2( 1, 1)-pp, dir, len2, lob, clp, kC);\n FsrEasuTapF(aC, aW, vec2( 2, 1)-pp, dir, len2, lob, clp, lC);\n FsrEasuTapF(aC, aW, vec2( 2, 0)-pp, dir, len2, lob, clp, hC);\n FsrEasuTapF(aC, aW, vec2( 1, 0)-pp, dir, len2, lob, clp, gC);\n FsrEasuTapF(aC, aW, vec2( 1, 2)-pp, dir, len2, lob, clp, oC);\n FsrEasuTapF(aC, aW, vec2( 0, 2)-pp, dir, len2, lob, clp, nC);\n pix=min(max4,max(min4,aC/aW));\n}\n#define FSR_RCAS_LIMIT (0.25-(1.0/16.0))\n#define FSR_RCAS_DENOISE 0\nvec4 FsrRcasLoadF(vec2 p);\nin vec2 v_uv;\nlayout(std140) uniform PostUBO {\n vec4 fsrParams;\n vec4 texSize;\n};\nuniform sampler2D outputResultMap;\nvec3 FsrEasuCF(vec2 p) {\n vec4 color = texture(outputResultMap, p);\n return color.rgb;\n}\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n vec3 c;\n vec4 con0, con1, con2, con3;\n vec2 rendersize = texSize.xy;\n FsrEasuCon(\n con0, con1, con2, con3,\n rendersize, rendersize, texSize.zw\n );\n FsrEasuF(c, gl_FragCoord.xy, con0, con1, con2, con3);\n float alpha = texture(outputResultMap, v_uv).a;\n fragColor = vec4(c.xyz, alpha);\n}"
  514. },
  515. "glsl1": {
  516. "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\nuniform highp vec4 cc_cameraPos;\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.xy = cc_cameraPos.w == 0.0 ? vec2(In.position.xy.x, -In.position.xy.y) : In.position.xy;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  517. "frag": "\nprecision highp float;\nvec3 FsrEasuCF(vec2 p);\nvoid FsrEasuCon(\n out vec4 con0,\n out vec4 con1,\n out vec4 con2,\n out vec4 con3,\n vec2 inputViewportInPixels,\n vec2 inputSizeInPixels,\n vec2 outputSizeInPixels\n)\n{\n con0 = vec4(\n inputViewportInPixels.x/outputSizeInPixels.x,\n inputViewportInPixels.y/outputSizeInPixels.y,\n .5*inputViewportInPixels.x/outputSizeInPixels.x-.5,\n .5*inputViewportInPixels.y/outputSizeInPixels.y-.5\n );\n con1 = vec4(1,1,1,-1)/inputSizeInPixels.xyxy;\n con2 = vec4(-1,2,1,2)/inputSizeInPixels.xyxy;\n con3 = vec4(0,4,0,0)/inputSizeInPixels.xyxy;\n}\nvoid FsrEasuTapF(\n inout vec3 aC,\n inout float aW,\n vec2 off,\n vec2 dir,\n vec2 len,\n float lob,\n float clp,\n vec3 c\n)\n{\n vec2 v = vec2(dot(off, dir), dot(off,vec2(-dir.y,dir.x)));\n v *= len;\n float d2 = min(dot(v,v),clp);\n float wB = .4 * d2 - 1.;\n float wA = lob * d2 -1.;\n wB *= wB;\n wA *= wA;\n wB = 1.5625*wB-.5625;\n float w= wB * wA;\n aC += c*w;\n aW += w;\n}\nvoid FsrEasuSetF(\n inout vec2 dir,\n inout float len,\n float w,\n float lA,float lB,float lC,float lD,float lE\n)\n{\n float lenX = max(abs(lD - lC), abs(lC - lB));\n float dirX = lD - lB;\n dir.x += dirX * w;\n lenX = clamp(abs(dirX)/lenX,0.,1.);\n lenX *= lenX;\n len += lenX * w;\n float lenY = max(abs(lE - lC), abs(lC - lA));\n float dirY = lE - lA;\n dir.y += dirY * w;\n lenY = clamp(abs(dirY) / lenY,0.,1.);\n lenY *= lenY;\n len += lenY * w;\n}\nvoid FsrEasuF(\n out vec3 pix,\n vec2 ip,\n vec4 con0,\n vec4 con1,\n vec4 con2,\n vec4 con3\n)\n{\n vec2 pp = ip * con0.xy + con0.zw;\n vec2 fp = floor(pp);\n pp -= fp;\n vec2 p0 = fp * con1.xy + con1.zw;\n vec2 p1 = p0 + con2.xy;\n vec2 p2 = p0 + con2.zw;\n vec2 p3 = p0 + con3.xy;\n vec4 off = vec4(-.5,.5,-.5,.5)*con1.xxyy;\n vec3 bC = FsrEasuCF(p0 + off.xw); float bL = bC.g + 0.5 *(bC.r + bC.b);\n vec3 cC = FsrEasuCF(p0 + off.yw); float cL = cC.g + 0.5 *(cC.r + cC.b);\n vec3 iC = FsrEasuCF(p1 + off.xw); float iL = iC.g + 0.5 *(iC.r + iC.b);\n vec3 jC = FsrEasuCF(p1 + off.yw); float jL = jC.g + 0.5 *(jC.r + jC.b);\n vec3 fC = FsrEasuCF(p1 + off.yz); float fL = fC.g + 0.5 *(fC.r + fC.b);\n vec3 eC = FsrEasuCF(p1 + off.xz); float eL = eC.g + 0.5 *(eC.r + eC.b);\n vec3 kC = FsrEasuCF(p2 + off.xw); float kL = kC.g + 0.5 *(kC.r + kC.b);\n vec3 lC = FsrEasuCF(p2 + off.yw); float lL = lC.g + 0.5 *(lC.r + lC.b);\n vec3 hC = FsrEasuCF(p2 + off.yz); float hL = hC.g + 0.5 *(hC.r + hC.b);\n vec3 gC = FsrEasuCF(p2 + off.xz); float gL = gC.g + 0.5 *(gC.r + gC.b);\n vec3 oC = FsrEasuCF(p3 + off.yz); float oL = oC.g + 0.5 *(oC.r + oC.b);\n vec3 nC = FsrEasuCF(p3 + off.xz); float nL = nC.g + 0.5 *(nC.r + nC.b);\n vec2 dir = vec2(0);\n float len = 0.;\n FsrEasuSetF(dir, len, (1.-pp.x)*(1.-pp.y), bL, eL, fL, gL, jL);\n FsrEasuSetF(dir, len, pp.x *(1.-pp.y), cL, fL, gL, hL, kL);\n FsrEasuSetF(dir, len, (1.-pp.x)* pp.y , fL, iL, jL, kL, nL);\n FsrEasuSetF(dir, len, pp.x * pp.y , gL, jL, kL, lL, oL);\n vec2 dir2 = dir * dir;\n float dirR = dir2.x + dir2.y;\n bool zro = dirR < (1.0/32768.0);\n dirR = inversesqrt(dirR);\n dirR = zro ? 1.0 : dirR;\n dir.x = zro ? 1.0 : dir.x;\n dir *= vec2(dirR);\n len = len * 0.5;\n len *= len;\n float stretch = dot(dir,dir) / (max(abs(dir.x), abs(dir.y)));\n vec2 len2 = vec2(1. +(stretch-1.0)*len, 1. -.5 * len);\n float lob = .5 - .29 * len;\n float clp = 1./lob;\n vec3 min4 = min(min(fC,gC),min(jC,kC));\n vec3 max4 = max(max(fC,gC),max(jC,kC));\n vec3 aC = vec3(0);\n float aW = 0.;\n FsrEasuTapF(aC, aW, vec2( 0,-1)-pp, dir, len2, lob, clp, bC);\n FsrEasuTapF(aC, aW, vec2( 1,-1)-pp, dir, len2, lob, clp, cC);\n FsrEasuTapF(aC, aW, vec2(-1, 1)-pp, dir, len2, lob, clp, iC);\n FsrEasuTapF(aC, aW, vec2( 0, 1)-pp, dir, len2, lob, clp, jC);\n FsrEasuTapF(aC, aW, vec2( 0, 0)-pp, dir, len2, lob, clp, fC);\n FsrEasuTapF(aC, aW, vec2(-1, 0)-pp, dir, len2, lob, clp, eC);\n FsrEasuTapF(aC, aW, vec2( 1, 1)-pp, dir, len2, lob, clp, kC);\n FsrEasuTapF(aC, aW, vec2( 2, 1)-pp, dir, len2, lob, clp, lC);\n FsrEasuTapF(aC, aW, vec2( 2, 0)-pp, dir, len2, lob, clp, hC);\n FsrEasuTapF(aC, aW, vec2( 1, 0)-pp, dir, len2, lob, clp, gC);\n FsrEasuTapF(aC, aW, vec2( 1, 2)-pp, dir, len2, lob, clp, oC);\n FsrEasuTapF(aC, aW, vec2( 0, 2)-pp, dir, len2, lob, clp, nC);\n pix=min(max4,max(min4,aC/aW));\n}\n#define FSR_RCAS_LIMIT (0.25-(1.0/16.0))\n#define FSR_RCAS_DENOISE 0\nvec4 FsrRcasLoadF(vec2 p);\nvarying vec2 v_uv;\n uniform vec4 texSize;\nuniform sampler2D outputResultMap;\nvec3 FsrEasuCF(vec2 p) {\n vec4 color = texture2D(outputResultMap, p);\n return color.rgb;\n}\nvoid main () {\n vec3 c;\n vec4 con0, con1, con2, con3;\n vec2 rendersize = texSize.xy;\n FsrEasuCon(\n con0, con1, con2, con3,\n rendersize, rendersize, texSize.zw\n );\n FsrEasuF(c, gl_FragCoord.xy, con0, con1, con2, con3);\n float alpha = texture2D(outputResultMap, v_uv).a;\n gl_FragColor = vec4(c.xyz, alpha);\n}"
  518. },
  519. "builtins": {
  520. "globals": {
  521. "blocks": [
  522. {
  523. "name": "CCGlobal",
  524. "defines": []
  525. },
  526. {
  527. "name": "CCCamera",
  528. "defines": []
  529. }
  530. ],
  531. "samplerTextures": [],
  532. "buffers": [],
  533. "images": []
  534. },
  535. "locals": {
  536. "blocks": [],
  537. "samplerTextures": [],
  538. "buffers": [],
  539. "images": []
  540. },
  541. "statistics": {
  542. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 42,
  543. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 44
  544. }
  545. },
  546. "defines": [
  547. {
  548. "name": "USE_INSTANCING",
  549. "type": "boolean",
  550. "defines": [],
  551. "editor": {
  552. "elevated": true
  553. }
  554. },
  555. {
  556. "name": "CC_USE_SKINNING",
  557. "type": "boolean",
  558. "defines": []
  559. },
  560. {
  561. "name": "CC_USE_BAKED_ANIMATION",
  562. "type": "boolean",
  563. "defines": [
  564. "USE_INSTANCING"
  565. ]
  566. },
  567. {
  568. "name": "CC_USE_LIGHTMAP",
  569. "type": "boolean",
  570. "defines": [
  571. "USE_INSTANCING"
  572. ]
  573. },
  574. {
  575. "name": "CC_USE_REFLECTION_PROBE",
  576. "type": "boolean",
  577. "defines": [
  578. "USE_INSTANCING"
  579. ]
  580. },
  581. {
  582. "name": "CC_RECEIVE_SHADOW",
  583. "type": "boolean",
  584. "defines": [
  585. "USE_INSTANCING"
  586. ]
  587. },
  588. {
  589. "name": "CC_USE_LIGHT_PROBE",
  590. "type": "boolean",
  591. "defines": [
  592. "USE_INSTANCING"
  593. ]
  594. },
  595. {
  596. "name": "CC_USE_MORPH",
  597. "type": "boolean",
  598. "defines": []
  599. }
  600. ],
  601. "name": "pipeline/post-process/fsr|vs|fs-easu"
  602. },
  603. {
  604. "blocks": [
  605. {
  606. "name": "PostUBO",
  607. "members": [
  608. {
  609. "name": "fsrParams",
  610. "type": 16,
  611. "count": 1
  612. },
  613. {
  614. "name": "texSize",
  615. "type": 16,
  616. "count": 1
  617. }
  618. ],
  619. "defines": [],
  620. "stageFlags": 16,
  621. "binding": 0
  622. }
  623. ],
  624. "samplerTextures": [],
  625. "samplers": [],
  626. "textures": [],
  627. "buffers": [],
  628. "images": [],
  629. "subpassInputs": [],
  630. "attributes": [
  631. {
  632. "name": "a_position",
  633. "defines": [],
  634. "format": 32,
  635. "location": 0
  636. },
  637. {
  638. "name": "a_normal",
  639. "defines": [],
  640. "format": 32,
  641. "location": 1
  642. },
  643. {
  644. "name": "a_texCoord",
  645. "defines": [],
  646. "format": 21,
  647. "location": 2
  648. },
  649. {
  650. "name": "a_tangent",
  651. "defines": [],
  652. "format": 44,
  653. "location": 3
  654. },
  655. {
  656. "name": "a_joints",
  657. "defines": [
  658. "CC_USE_SKINNING"
  659. ],
  660. "location": 4
  661. },
  662. {
  663. "name": "a_weights",
  664. "defines": [
  665. "CC_USE_SKINNING"
  666. ],
  667. "format": 44,
  668. "location": 5
  669. },
  670. {
  671. "name": "a_jointAnimInfo",
  672. "defines": [
  673. "USE_INSTANCING",
  674. "CC_USE_BAKED_ANIMATION"
  675. ],
  676. "format": 44,
  677. "isInstanced": true,
  678. "location": 6
  679. },
  680. {
  681. "name": "a_matWorld0",
  682. "defines": [
  683. "USE_INSTANCING"
  684. ],
  685. "format": 44,
  686. "isInstanced": true,
  687. "location": 7
  688. },
  689. {
  690. "name": "a_matWorld1",
  691. "defines": [
  692. "USE_INSTANCING"
  693. ],
  694. "format": 44,
  695. "isInstanced": true,
  696. "location": 8
  697. },
  698. {
  699. "name": "a_matWorld2",
  700. "defines": [
  701. "USE_INSTANCING"
  702. ],
  703. "format": 44,
  704. "isInstanced": true,
  705. "location": 9
  706. },
  707. {
  708. "name": "a_lightingMapUVParam",
  709. "defines": [
  710. "USE_INSTANCING",
  711. "CC_USE_LIGHTMAP"
  712. ],
  713. "format": 44,
  714. "isInstanced": true,
  715. "location": 10
  716. },
  717. {
  718. "name": "a_localShadowBiasAndProbeId",
  719. "defines": [
  720. "USE_INSTANCING"
  721. ],
  722. "format": 44,
  723. "isInstanced": true,
  724. "location": 11
  725. },
  726. {
  727. "name": "a_reflectionProbeData",
  728. "defines": [
  729. "USE_INSTANCING",
  730. "CC_USE_REFLECTION_PROBE"
  731. ],
  732. "format": 44,
  733. "isInstanced": true,
  734. "location": 12
  735. },
  736. {
  737. "name": "a_sh_linear_const_r",
  738. "defines": [
  739. "USE_INSTANCING",
  740. "CC_USE_LIGHT_PROBE"
  741. ],
  742. "format": 44,
  743. "isInstanced": true,
  744. "location": 13
  745. },
  746. {
  747. "name": "a_sh_linear_const_g",
  748. "defines": [
  749. "USE_INSTANCING",
  750. "CC_USE_LIGHT_PROBE"
  751. ],
  752. "format": 44,
  753. "isInstanced": true,
  754. "location": 14
  755. },
  756. {
  757. "name": "a_sh_linear_const_b",
  758. "defines": [
  759. "USE_INSTANCING",
  760. "CC_USE_LIGHT_PROBE"
  761. ],
  762. "format": 44,
  763. "isInstanced": true,
  764. "location": 15
  765. },
  766. {
  767. "name": "a_vertexId",
  768. "defines": [
  769. "CC_USE_MORPH"
  770. ],
  771. "format": 11,
  772. "location": 16
  773. }
  774. ],
  775. "varyings": [
  776. {
  777. "name": "v_uv",
  778. "type": 14,
  779. "count": 1,
  780. "defines": [],
  781. "stageFlags": 17,
  782. "location": 0
  783. }
  784. ],
  785. "fragColors": [
  786. {
  787. "name": "fragColor",
  788. "typename": "vec4",
  789. "type": 16,
  790. "count": 1,
  791. "defines": [],
  792. "stageFlags": 16,
  793. "location": 0
  794. }
  795. ],
  796. "descriptors": [
  797. {
  798. "rate": 0,
  799. "blocks": [],
  800. "samplerTextures": [],
  801. "samplers": [],
  802. "textures": [],
  803. "buffers": [],
  804. "images": [],
  805. "subpassInputs": []
  806. },
  807. {
  808. "rate": 1,
  809. "blocks": [
  810. {
  811. "name": "PostUBO",
  812. "members": [
  813. {
  814. "name": "fsrParams",
  815. "type": 16,
  816. "count": 1
  817. },
  818. {
  819. "name": "texSize",
  820. "type": 16,
  821. "count": 1
  822. }
  823. ],
  824. "defines": [],
  825. "stageFlags": 16,
  826. "binding": 0
  827. }
  828. ],
  829. "samplerTextures": [],
  830. "samplers": [],
  831. "textures": [],
  832. "buffers": [],
  833. "images": [],
  834. "subpassInputs": []
  835. },
  836. {
  837. "rate": 2,
  838. "blocks": [],
  839. "samplerTextures": [],
  840. "samplers": [],
  841. "textures": [],
  842. "buffers": [],
  843. "images": [],
  844. "subpassInputs": []
  845. },
  846. {
  847. "rate": 3,
  848. "blocks": [
  849. {
  850. "tags": {
  851. "builtin": "global"
  852. },
  853. "name": "CCGlobal",
  854. "members": [
  855. {
  856. "name": "cc_time",
  857. "typename": "vec4",
  858. "type": 16,
  859. "count": 1,
  860. "precision": "highp "
  861. },
  862. {
  863. "name": "cc_screenSize",
  864. "typename": "vec4",
  865. "type": 16,
  866. "count": 1,
  867. "precision": "mediump "
  868. },
  869. {
  870. "name": "cc_nativeSize",
  871. "typename": "vec4",
  872. "type": 16,
  873. "count": 1,
  874. "precision": "mediump "
  875. },
  876. {
  877. "name": "cc_probeInfo",
  878. "typename": "vec4",
  879. "type": 16,
  880. "count": 1,
  881. "precision": "mediump "
  882. },
  883. {
  884. "name": "cc_debug_view_mode",
  885. "typename": "vec4",
  886. "type": 16,
  887. "count": 1,
  888. "precision": "mediump "
  889. }
  890. ],
  891. "defines": [],
  892. "stageFlags": 17
  893. },
  894. {
  895. "tags": {
  896. "builtin": "global"
  897. },
  898. "name": "CCCamera",
  899. "members": [
  900. {
  901. "name": "cc_matView",
  902. "typename": "mat4",
  903. "type": 25,
  904. "count": 1,
  905. "precision": "highp "
  906. },
  907. {
  908. "name": "cc_matViewInv",
  909. "typename": "mat4",
  910. "type": 25,
  911. "count": 1,
  912. "precision": "highp "
  913. },
  914. {
  915. "name": "cc_matProj",
  916. "typename": "mat4",
  917. "type": 25,
  918. "count": 1,
  919. "precision": "highp "
  920. },
  921. {
  922. "name": "cc_matProjInv",
  923. "typename": "mat4",
  924. "type": 25,
  925. "count": 1,
  926. "precision": "highp "
  927. },
  928. {
  929. "name": "cc_matViewProj",
  930. "typename": "mat4",
  931. "type": 25,
  932. "count": 1,
  933. "precision": "highp "
  934. },
  935. {
  936. "name": "cc_matViewProjInv",
  937. "typename": "mat4",
  938. "type": 25,
  939. "count": 1,
  940. "precision": "highp "
  941. },
  942. {
  943. "name": "cc_cameraPos",
  944. "typename": "vec4",
  945. "type": 16,
  946. "count": 1,
  947. "precision": "highp "
  948. },
  949. {
  950. "name": "cc_surfaceTransform",
  951. "typename": "vec4",
  952. "type": 16,
  953. "count": 1,
  954. "precision": "mediump "
  955. },
  956. {
  957. "name": "cc_screenScale",
  958. "typename": "vec4",
  959. "type": 16,
  960. "count": 1,
  961. "precision": "mediump "
  962. },
  963. {
  964. "name": "cc_exposure",
  965. "typename": "vec4",
  966. "type": 16,
  967. "count": 1,
  968. "precision": "mediump "
  969. },
  970. {
  971. "name": "cc_mainLitDir",
  972. "typename": "vec4",
  973. "type": 16,
  974. "count": 1,
  975. "precision": "mediump "
  976. },
  977. {
  978. "name": "cc_mainLitColor",
  979. "typename": "vec4",
  980. "type": 16,
  981. "count": 1,
  982. "precision": "mediump "
  983. },
  984. {
  985. "name": "cc_ambientSky",
  986. "typename": "vec4",
  987. "type": 16,
  988. "count": 1,
  989. "precision": "mediump "
  990. },
  991. {
  992. "name": "cc_ambientGround",
  993. "typename": "vec4",
  994. "type": 16,
  995. "count": 1,
  996. "precision": "mediump "
  997. },
  998. {
  999. "name": "cc_fogColor",
  1000. "typename": "vec4",
  1001. "type": 16,
  1002. "count": 1,
  1003. "precision": "mediump "
  1004. },
  1005. {
  1006. "name": "cc_fogBase",
  1007. "typename": "vec4",
  1008. "type": 16,
  1009. "count": 1,
  1010. "precision": "mediump "
  1011. },
  1012. {
  1013. "name": "cc_fogAdd",
  1014. "typename": "vec4",
  1015. "type": 16,
  1016. "count": 1,
  1017. "precision": "mediump "
  1018. },
  1019. {
  1020. "name": "cc_nearFar",
  1021. "typename": "vec4",
  1022. "type": 16,
  1023. "count": 1,
  1024. "precision": "mediump "
  1025. },
  1026. {
  1027. "name": "cc_viewPort",
  1028. "typename": "vec4",
  1029. "type": 16,
  1030. "count": 1,
  1031. "precision": "mediump "
  1032. }
  1033. ],
  1034. "defines": [],
  1035. "stageFlags": 17
  1036. }
  1037. ],
  1038. "samplerTextures": [
  1039. {
  1040. "name": "outputResultMap",
  1041. "type": 28,
  1042. "count": 1,
  1043. "defines": [],
  1044. "stageFlags": 16,
  1045. "binding": 1
  1046. }
  1047. ],
  1048. "samplers": [],
  1049. "textures": [],
  1050. "buffers": [],
  1051. "images": [],
  1052. "subpassInputs": []
  1053. }
  1054. ],
  1055. "hash": 2020210676,
  1056. "glsl4": {
  1057. "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 = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) 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.xy = cc_cameraPos.w == 0.0 ? vec2(In.position.xy.x, -In.position.xy.y) : In.position.xy;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  1058. "frag": "\nprecision highp float;\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec3 FsrEasuCF(vec2 p);\n#define FSR_RCAS_LIMIT (0.25-(1.0/16.0))\n#define FSR_RCAS_DENOISE 0\nvec4 FsrRcasLoadF(vec2 p);\nvoid FsrRcasCon(\n out float con,\n float sharpness\n){\n con = exp2(-sharpness);\n}\nvec3 FsrRcasF(\n vec2 ip,\n float con\n)\n{\n vec2 sp = vec2(ip);\n vec3 b = FsrRcasLoadF(sp + vec2( 0,-1)).rgb;\n vec3 d = FsrRcasLoadF(sp + vec2(-1, 0)).rgb;\n vec3 e = FsrRcasLoadF(sp).rgb;\n vec3 f = FsrRcasLoadF(sp+vec2( 1, 0)).rgb;\n vec3 h = FsrRcasLoadF(sp+vec2( 0, 1)).rgb;\n float bL = b.g + .5 * (b.b + b.r);\n float dL = d.g + .5 * (d.b + d.r);\n float eL = e.g + .5 * (e.b + e.r);\n float fL = f.g + .5 * (f.b + f.r);\n float hL = h.g + .5 * (h.b + h.r);\n float nz = .25 * (bL + dL + fL + hL) - eL;\n nz=clamp(\n abs(nz)\n /(\n max(max(bL,dL),max(eL,max(fL,hL)))\n -min(min(bL,dL),min(eL,min(fL,hL)))\n ),\n 0., 1.\n );\n nz=1.-.5*nz;\n vec3 mn4 = min(b, min(f, h));\n vec3 mx4 = max(b, max(f, h));\n vec2 peakC = vec2(1., -4.);\n vec3 hitMin = mn4 / (4. * mx4);\n vec3 hitMax = (peakC.x - mx4) / (4.* mn4 + peakC.y);\n vec3 lobeRGB = max(-hitMin, hitMax);\n float lobe = max(\n -FSR_RCAS_LIMIT,\n min(max(lobeRGB.r, max(lobeRGB.g, lobeRGB.b)), 0.)\n )*con;\n #if FSR_RCAS_DENOISE\n lobe *= nz;\n #endif\n return (lobe * (b + d + h + f) + e) / (4. * lobe + 1.);\n}\nlayout(location = 0) in vec2 v_uv;\nlayout(set = 1, binding = 0) uniform PostUBO {\n vec4 fsrParams;\n vec4 texSize;\n};\nlayout(set = 1, binding = 1) uniform sampler2D outputResultMap;\nvec4 FsrRcasLoadF(vec2 p) {\n vec4 color = texture(outputResultMap, p/texSize.zw);\n return color;\n}\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n float con;\n FsrRcasCon(con, fsrParams.x);\n vec3 col = FsrRcasF(gl_FragCoord.xy, con);\n float alpha = texture(outputResultMap, v_uv).a;\n fragColor = vec4(col, alpha);\n}"
  1059. },
  1060. "glsl3": {
  1061. "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 CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\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.xy = cc_cameraPos.w == 0.0 ? vec2(In.position.xy.x, -In.position.xy.y) : In.position.xy;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  1062. "frag": "\nprecision highp float;\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec3 FsrEasuCF(vec2 p);\n#define FSR_RCAS_LIMIT (0.25-(1.0/16.0))\n#define FSR_RCAS_DENOISE 0\nvec4 FsrRcasLoadF(vec2 p);\nvoid FsrRcasCon(\n out float con,\n float sharpness\n){\n con = exp2(-sharpness);\n}\nvec3 FsrRcasF(\n vec2 ip,\n float con\n)\n{\n vec2 sp = vec2(ip);\n vec3 b = FsrRcasLoadF(sp + vec2( 0,-1)).rgb;\n vec3 d = FsrRcasLoadF(sp + vec2(-1, 0)).rgb;\n vec3 e = FsrRcasLoadF(sp).rgb;\n vec3 f = FsrRcasLoadF(sp+vec2( 1, 0)).rgb;\n vec3 h = FsrRcasLoadF(sp+vec2( 0, 1)).rgb;\n float bL = b.g + .5 * (b.b + b.r);\n float dL = d.g + .5 * (d.b + d.r);\n float eL = e.g + .5 * (e.b + e.r);\n float fL = f.g + .5 * (f.b + f.r);\n float hL = h.g + .5 * (h.b + h.r);\n float nz = .25 * (bL + dL + fL + hL) - eL;\n nz=clamp(\n abs(nz)\n /(\n max(max(bL,dL),max(eL,max(fL,hL)))\n -min(min(bL,dL),min(eL,min(fL,hL)))\n ),\n 0., 1.\n );\n nz=1.-.5*nz;\n vec3 mn4 = min(b, min(f, h));\n vec3 mx4 = max(b, max(f, h));\n vec2 peakC = vec2(1., -4.);\n vec3 hitMin = mn4 / (4. * mx4);\n vec3 hitMax = (peakC.x - mx4) / (4.* mn4 + peakC.y);\n vec3 lobeRGB = max(-hitMin, hitMax);\n float lobe = max(\n -FSR_RCAS_LIMIT,\n min(max(lobeRGB.r, max(lobeRGB.g, lobeRGB.b)), 0.)\n )*con;\n #if FSR_RCAS_DENOISE\n lobe *= nz;\n #endif\n return (lobe * (b + d + h + f) + e) / (4. * lobe + 1.);\n}\nin vec2 v_uv;\nlayout(std140) uniform PostUBO {\n vec4 fsrParams;\n vec4 texSize;\n};\nuniform sampler2D outputResultMap;\nvec4 FsrRcasLoadF(vec2 p) {\n vec4 color = texture(outputResultMap, p/texSize.zw);\n return color;\n}\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n float con;\n FsrRcasCon(con, fsrParams.x);\n vec3 col = FsrRcasF(gl_FragCoord.xy, con);\n float alpha = texture(outputResultMap, v_uv).a;\n fragColor = vec4(col, alpha);\n}"
  1063. },
  1064. "glsl1": {
  1065. "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\nuniform highp vec4 cc_cameraPos;\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.xy = cc_cameraPos.w == 0.0 ? vec2(In.position.xy.x, -In.position.xy.y) : In.position.xy;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  1066. "frag": "\nprecision highp float;\nvec3 FsrEasuCF(vec2 p);\n#define FSR_RCAS_LIMIT (0.25-(1.0/16.0))\n#define FSR_RCAS_DENOISE 0\nvec4 FsrRcasLoadF(vec2 p);\nvoid FsrRcasCon(\n out float con,\n float sharpness\n){\n con = exp2(-sharpness);\n}\nvec3 FsrRcasF(\n vec2 ip,\n float con\n)\n{\n vec2 sp = vec2(ip);\n vec3 b = FsrRcasLoadF(sp + vec2( 0,-1)).rgb;\n vec3 d = FsrRcasLoadF(sp + vec2(-1, 0)).rgb;\n vec3 e = FsrRcasLoadF(sp).rgb;\n vec3 f = FsrRcasLoadF(sp+vec2( 1, 0)).rgb;\n vec3 h = FsrRcasLoadF(sp+vec2( 0, 1)).rgb;\n float bL = b.g + .5 * (b.b + b.r);\n float dL = d.g + .5 * (d.b + d.r);\n float eL = e.g + .5 * (e.b + e.r);\n float fL = f.g + .5 * (f.b + f.r);\n float hL = h.g + .5 * (h.b + h.r);\n float nz = .25 * (bL + dL + fL + hL) - eL;\n nz=clamp(\n abs(nz)\n /(\n max(max(bL,dL),max(eL,max(fL,hL)))\n -min(min(bL,dL),min(eL,min(fL,hL)))\n ),\n 0., 1.\n );\n nz=1.-.5*nz;\n vec3 mn4 = min(b, min(f, h));\n vec3 mx4 = max(b, max(f, h));\n vec2 peakC = vec2(1., -4.);\n vec3 hitMin = mn4 / (4. * mx4);\n vec3 hitMax = (peakC.x - mx4) / (4.* mn4 + peakC.y);\n vec3 lobeRGB = max(-hitMin, hitMax);\n float lobe = max(\n -FSR_RCAS_LIMIT,\n min(max(lobeRGB.r, max(lobeRGB.g, lobeRGB.b)), 0.)\n )*con;\n #if FSR_RCAS_DENOISE\n lobe *= nz;\n #endif\n return (lobe * (b + d + h + f) + e) / (4. * lobe + 1.);\n}\nvarying vec2 v_uv;\n uniform vec4 fsrParams;\n uniform vec4 texSize;\nuniform sampler2D outputResultMap;\nvec4 FsrRcasLoadF(vec2 p) {\n vec4 color = texture2D(outputResultMap, p/texSize.zw);\n return color;\n}\nvoid main () {\n float con;\n FsrRcasCon(con, fsrParams.x);\n vec3 col = FsrRcasF(gl_FragCoord.xy, con);\n float alpha = texture2D(outputResultMap, v_uv).a;\n gl_FragColor = vec4(col, alpha);\n}"
  1067. },
  1068. "builtins": {
  1069. "globals": {
  1070. "blocks": [
  1071. {
  1072. "name": "CCGlobal",
  1073. "defines": []
  1074. },
  1075. {
  1076. "name": "CCCamera",
  1077. "defines": []
  1078. }
  1079. ],
  1080. "samplerTextures": [],
  1081. "buffers": [],
  1082. "images": []
  1083. },
  1084. "locals": {
  1085. "blocks": [],
  1086. "samplerTextures": [],
  1087. "buffers": [],
  1088. "images": []
  1089. },
  1090. "statistics": {
  1091. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 42,
  1092. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 44
  1093. }
  1094. },
  1095. "defines": [
  1096. {
  1097. "name": "USE_INSTANCING",
  1098. "type": "boolean",
  1099. "defines": [],
  1100. "editor": {
  1101. "elevated": true
  1102. }
  1103. },
  1104. {
  1105. "name": "CC_USE_SKINNING",
  1106. "type": "boolean",
  1107. "defines": []
  1108. },
  1109. {
  1110. "name": "CC_USE_BAKED_ANIMATION",
  1111. "type": "boolean",
  1112. "defines": [
  1113. "USE_INSTANCING"
  1114. ]
  1115. },
  1116. {
  1117. "name": "CC_USE_LIGHTMAP",
  1118. "type": "boolean",
  1119. "defines": [
  1120. "USE_INSTANCING"
  1121. ]
  1122. },
  1123. {
  1124. "name": "CC_USE_REFLECTION_PROBE",
  1125. "type": "boolean",
  1126. "defines": [
  1127. "USE_INSTANCING"
  1128. ]
  1129. },
  1130. {
  1131. "name": "CC_RECEIVE_SHADOW",
  1132. "type": "boolean",
  1133. "defines": [
  1134. "USE_INSTANCING"
  1135. ]
  1136. },
  1137. {
  1138. "name": "CC_USE_LIGHT_PROBE",
  1139. "type": "boolean",
  1140. "defines": [
  1141. "USE_INSTANCING"
  1142. ]
  1143. },
  1144. {
  1145. "name": "CC_USE_MORPH",
  1146. "type": "boolean",
  1147. "defines": []
  1148. }
  1149. ],
  1150. "name": "pipeline/post-process/fsr|vs|fs-rcas"
  1151. }
  1152. ],
  1153. "combinations": [],
  1154. "hideInEditor": false
  1155. }