f84f3b58ec61e2a9c03c5f86bacdfd0d6a2a3647.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. System.register(["cc"], function (_export, _context) {
  2. "use strict";
  3. var _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, gfx, _crd, SampleCount;
  4. function makeMSAA() {
  5. return {
  6. enabled: false,
  7. sampleCount: SampleCount.X4
  8. };
  9. }
  10. function fillRequiredMSAA(value) {
  11. if (value.enabled === undefined) {
  12. value.enabled = false;
  13. }
  14. if (value.sampleCount === undefined) {
  15. value.sampleCount = SampleCount.X4;
  16. }
  17. }
  18. function makeHBAO() {
  19. return {
  20. enabled: false,
  21. radiusScale: 1,
  22. angleBiasDegree: 10,
  23. blurSharpness: 3,
  24. aoSaturation: 1,
  25. needBlur: false
  26. };
  27. }
  28. function fillRequiredHBAO(value) {
  29. if (value.enabled === undefined) {
  30. value.enabled = false;
  31. }
  32. if (value.radiusScale === undefined) {
  33. value.radiusScale = 1;
  34. }
  35. if (value.angleBiasDegree === undefined) {
  36. value.angleBiasDegree = 10;
  37. }
  38. if (value.blurSharpness === undefined) {
  39. value.blurSharpness = 3;
  40. }
  41. if (value.aoSaturation === undefined) {
  42. value.aoSaturation = 1;
  43. }
  44. if (value.needBlur === undefined) {
  45. value.needBlur = false;
  46. }
  47. }
  48. function makeBloom() {
  49. return {
  50. enabled: false,
  51. material: null,
  52. enableAlphaMask: false,
  53. iterations: 3,
  54. threshold: 0.8,
  55. intensity: 2.3
  56. };
  57. }
  58. function fillRequiredBloom(value) {
  59. if (value.enabled === undefined) {
  60. value.enabled = false;
  61. }
  62. if (value.material === undefined) {
  63. value.material = null;
  64. }
  65. if (value.enableAlphaMask === undefined) {
  66. value.enableAlphaMask = false;
  67. }
  68. if (value.iterations === undefined) {
  69. value.iterations = 3;
  70. }
  71. if (value.threshold === undefined) {
  72. value.threshold = 0.8;
  73. }
  74. if (value.intensity === undefined) {
  75. value.intensity = 2.3;
  76. }
  77. }
  78. function makeColorGrading() {
  79. return {
  80. enabled: false,
  81. material: null,
  82. contribute: 1,
  83. colorGradingMap: null
  84. };
  85. }
  86. function fillRequiredColorGrading(value) {
  87. if (value.enabled === undefined) {
  88. value.enabled = false;
  89. }
  90. if (value.material === undefined) {
  91. value.material = null;
  92. }
  93. if (value.contribute === undefined) {
  94. value.contribute = 1;
  95. }
  96. if (value.colorGradingMap === undefined) {
  97. value.colorGradingMap = null;
  98. }
  99. }
  100. function makeFSR() {
  101. return {
  102. enabled: false,
  103. material: null,
  104. sharpness: 0.8
  105. };
  106. }
  107. function fillRequiredFSR(value) {
  108. if (value.enabled === undefined) {
  109. value.enabled = false;
  110. }
  111. if (value.material === undefined) {
  112. value.material = null;
  113. }
  114. if (value.sharpness === undefined) {
  115. value.sharpness = 0.8;
  116. }
  117. }
  118. function makeFXAA() {
  119. return {
  120. enabled: false,
  121. material: null
  122. };
  123. }
  124. function fillRequiredFXAA(value) {
  125. if (value.enabled === undefined) {
  126. value.enabled = false;
  127. }
  128. if (value.material === undefined) {
  129. value.material = null;
  130. }
  131. }
  132. function makeToneMapping() {
  133. return {
  134. material: null
  135. };
  136. }
  137. function fillRequiredToneMapping(value) {
  138. if (value.material === undefined) {
  139. value.material = null;
  140. }
  141. }
  142. function makePipelineSettings() {
  143. return {
  144. msaa: makeMSAA(),
  145. enableShadingScale: false,
  146. shadingScale: 0.5,
  147. bloom: makeBloom(),
  148. toneMapping: makeToneMapping(),
  149. colorGrading: makeColorGrading(),
  150. fsr: makeFSR(),
  151. fxaa: makeFXAA()
  152. };
  153. }
  154. function fillRequiredPipelineSettings(value) {
  155. if (!value.msaa) {
  156. value.msaa = makeMSAA();
  157. } else {
  158. fillRequiredMSAA(value.msaa);
  159. }
  160. if (value.enableShadingScale === undefined) {
  161. value.enableShadingScale = false;
  162. }
  163. if (value.shadingScale === undefined) {
  164. value.shadingScale = 0.5;
  165. }
  166. if (!value.bloom) {
  167. value.bloom = makeBloom();
  168. } else {
  169. fillRequiredBloom(value.bloom);
  170. }
  171. if (!value.toneMapping) {
  172. value.toneMapping = makeToneMapping();
  173. } else {
  174. fillRequiredToneMapping(value.toneMapping);
  175. }
  176. if (!value.colorGrading) {
  177. value.colorGrading = makeColorGrading();
  178. } else {
  179. fillRequiredColorGrading(value.colorGrading);
  180. }
  181. if (!value.fsr) {
  182. value.fsr = makeFSR();
  183. } else {
  184. fillRequiredFSR(value.fsr);
  185. }
  186. if (!value.fxaa) {
  187. value.fxaa = makeFXAA();
  188. } else {
  189. fillRequiredFXAA(value.fxaa);
  190. }
  191. }
  192. _export({
  193. makeMSAA: makeMSAA,
  194. fillRequiredMSAA: fillRequiredMSAA,
  195. makeHBAO: makeHBAO,
  196. fillRequiredHBAO: fillRequiredHBAO,
  197. makeBloom: makeBloom,
  198. fillRequiredBloom: fillRequiredBloom,
  199. makeColorGrading: makeColorGrading,
  200. fillRequiredColorGrading: fillRequiredColorGrading,
  201. makeFSR: makeFSR,
  202. fillRequiredFSR: fillRequiredFSR,
  203. makeFXAA: makeFXAA,
  204. fillRequiredFXAA: fillRequiredFXAA,
  205. makeToneMapping: makeToneMapping,
  206. fillRequiredToneMapping: fillRequiredToneMapping,
  207. makePipelineSettings: makePipelineSettings,
  208. fillRequiredPipelineSettings: fillRequiredPipelineSettings
  209. });
  210. return {
  211. setters: [function (_cc) {
  212. _cclegacy = _cc.cclegacy;
  213. __checkObsolete__ = _cc.__checkObsolete__;
  214. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  215. gfx = _cc.gfx;
  216. }],
  217. execute: function () {
  218. _crd = true;
  219. _cclegacy._RF.push({}, "cbf30kCUX9A3K+QpVC6wnzx", "builtin-pipeline-types", undefined);
  220. /*
  221. Copyright (c) 2021-2024 Xiamen Yaji Software Co., Ltd.
  222. https://www.cocos.com
  223. Permission is hereby granted, free of charge, to any person obtaining a copy
  224. of this software and associated documentation files (the "Software"), to deal
  225. in the Software without restriction, including without limitation the rights to
  226. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  227. of the Software, and to permit persons to whom the Software is furnished to do so,
  228. subject to the following conditions:
  229. The above copyright notice and this permission notice shall be included in
  230. all copies or substantial portions of the Software.
  231. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  232. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  233. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  234. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  235. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  236. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  237. THE SOFTWARE.
  238. */
  239. /**
  240. * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! =========================
  241. * The following section is auto-generated.
  242. * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! =========================
  243. */
  244. /* eslint-disable max-len */
  245. __checkObsolete__(['Material', 'Texture2D', 'gfx']);
  246. ({
  247. SampleCount
  248. } = gfx);
  249. _cclegacy._RF.pop();
  250. _crd = false;
  251. }
  252. };
  253. });
  254. //# sourceMappingURL=f84f3b58ec61e2a9c03c5f86bacdfd0d6a2a3647.js.map