b349769b96cc4c1dff92d5d6f941366e27a02c6b.js 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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 makeDepthOfField() {
  49. return {
  50. enabled: false,
  51. material: null,
  52. focusDistance: 0,
  53. focusRange: 0,
  54. bokehRadius: 1
  55. };
  56. }
  57. function fillRequiredDepthOfField(value) {
  58. if (value.enabled === undefined) {
  59. value.enabled = false;
  60. }
  61. if (value.material === undefined) {
  62. value.material = null;
  63. }
  64. if (value.focusDistance === undefined) {
  65. value.focusDistance = 0;
  66. }
  67. if (value.focusRange === undefined) {
  68. value.focusRange = 0;
  69. }
  70. if (value.bokehRadius === undefined) {
  71. value.bokehRadius = 1;
  72. }
  73. }
  74. function makeBloom() {
  75. return {
  76. enabled: false,
  77. material: null,
  78. enableAlphaMask: false,
  79. iterations: 3,
  80. threshold: 0.8,
  81. intensity: 2.3
  82. };
  83. }
  84. function fillRequiredBloom(value) {
  85. if (value.enabled === undefined) {
  86. value.enabled = false;
  87. }
  88. if (value.material === undefined) {
  89. value.material = null;
  90. }
  91. if (value.enableAlphaMask === undefined) {
  92. value.enableAlphaMask = false;
  93. }
  94. if (value.iterations === undefined) {
  95. value.iterations = 3;
  96. }
  97. if (value.threshold === undefined) {
  98. value.threshold = 0.8;
  99. }
  100. if (value.intensity === undefined) {
  101. value.intensity = 2.3;
  102. }
  103. }
  104. function makeColorGrading() {
  105. return {
  106. enabled: false,
  107. material: null,
  108. contribute: 1,
  109. colorGradingMap: null
  110. };
  111. }
  112. function fillRequiredColorGrading(value) {
  113. if (value.enabled === undefined) {
  114. value.enabled = false;
  115. }
  116. if (value.material === undefined) {
  117. value.material = null;
  118. }
  119. if (value.contribute === undefined) {
  120. value.contribute = 1;
  121. }
  122. if (value.colorGradingMap === undefined) {
  123. value.colorGradingMap = null;
  124. }
  125. }
  126. function makeFSR() {
  127. return {
  128. enabled: false,
  129. material: null,
  130. sharpness: 0.8
  131. };
  132. }
  133. function fillRequiredFSR(value) {
  134. if (value.enabled === undefined) {
  135. value.enabled = false;
  136. }
  137. if (value.material === undefined) {
  138. value.material = null;
  139. }
  140. if (value.sharpness === undefined) {
  141. value.sharpness = 0.8;
  142. }
  143. }
  144. function makeFXAA() {
  145. return {
  146. enabled: false,
  147. material: null
  148. };
  149. }
  150. function fillRequiredFXAA(value) {
  151. if (value.enabled === undefined) {
  152. value.enabled = false;
  153. }
  154. if (value.material === undefined) {
  155. value.material = null;
  156. }
  157. }
  158. function makeToneMapping() {
  159. return {
  160. material: null
  161. };
  162. }
  163. function fillRequiredToneMapping(value) {
  164. if (value.material === undefined) {
  165. value.material = null;
  166. }
  167. }
  168. function makePipelineSettings() {
  169. return {
  170. msaa: makeMSAA(),
  171. enableShadingScale: false,
  172. shadingScale: 0.5,
  173. depthOfField: makeDepthOfField(),
  174. bloom: makeBloom(),
  175. toneMapping: makeToneMapping(),
  176. colorGrading: makeColorGrading(),
  177. fsr: makeFSR(),
  178. fxaa: makeFXAA()
  179. };
  180. }
  181. function fillRequiredPipelineSettings(value) {
  182. if (!value.msaa) {
  183. value.msaa = makeMSAA();
  184. } else {
  185. fillRequiredMSAA(value.msaa);
  186. }
  187. if (value.enableShadingScale === undefined) {
  188. value.enableShadingScale = false;
  189. }
  190. if (value.shadingScale === undefined) {
  191. value.shadingScale = 0.5;
  192. }
  193. if (!value.depthOfField) {
  194. value.depthOfField = makeDepthOfField();
  195. } else {
  196. fillRequiredDepthOfField(value.depthOfField);
  197. }
  198. if (!value.bloom) {
  199. value.bloom = makeBloom();
  200. } else {
  201. fillRequiredBloom(value.bloom);
  202. }
  203. if (!value.toneMapping) {
  204. value.toneMapping = makeToneMapping();
  205. } else {
  206. fillRequiredToneMapping(value.toneMapping);
  207. }
  208. if (!value.colorGrading) {
  209. value.colorGrading = makeColorGrading();
  210. } else {
  211. fillRequiredColorGrading(value.colorGrading);
  212. }
  213. if (!value.fsr) {
  214. value.fsr = makeFSR();
  215. } else {
  216. fillRequiredFSR(value.fsr);
  217. }
  218. if (!value.fxaa) {
  219. value.fxaa = makeFXAA();
  220. } else {
  221. fillRequiredFXAA(value.fxaa);
  222. }
  223. }
  224. _export({
  225. makeMSAA: makeMSAA,
  226. fillRequiredMSAA: fillRequiredMSAA,
  227. makeHBAO: makeHBAO,
  228. fillRequiredHBAO: fillRequiredHBAO,
  229. makeDepthOfField: makeDepthOfField,
  230. fillRequiredDepthOfField: fillRequiredDepthOfField,
  231. makeBloom: makeBloom,
  232. fillRequiredBloom: fillRequiredBloom,
  233. makeColorGrading: makeColorGrading,
  234. fillRequiredColorGrading: fillRequiredColorGrading,
  235. makeFSR: makeFSR,
  236. fillRequiredFSR: fillRequiredFSR,
  237. makeFXAA: makeFXAA,
  238. fillRequiredFXAA: fillRequiredFXAA,
  239. makeToneMapping: makeToneMapping,
  240. fillRequiredToneMapping: fillRequiredToneMapping,
  241. makePipelineSettings: makePipelineSettings,
  242. fillRequiredPipelineSettings: fillRequiredPipelineSettings
  243. });
  244. return {
  245. setters: [function (_cc) {
  246. _cclegacy = _cc.cclegacy;
  247. __checkObsolete__ = _cc.__checkObsolete__;
  248. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  249. gfx = _cc.gfx;
  250. }],
  251. execute: function () {
  252. _crd = true;
  253. _cclegacy._RF.push({}, "cbf30kCUX9A3K+QpVC6wnzx", "builtin-pipeline-types", undefined);
  254. /*
  255. Copyright (c) 2021-2024 Xiamen Yaji Software Co., Ltd.
  256. https://www.cocos.com
  257. Permission is hereby granted, free of charge, to any person obtaining a copy
  258. of this software and associated documentation files (the "Software"), to deal
  259. in the Software without restriction, including without limitation the rights to
  260. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  261. of the Software, and to permit persons to whom the Software is furnished to do so,
  262. subject to the following conditions:
  263. The above copyright notice and this permission notice shall be included in
  264. all copies or substantial portions of the Software.
  265. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  266. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  267. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  268. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  269. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  270. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  271. THE SOFTWARE.
  272. */
  273. /**
  274. * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! =========================
  275. * The following section is auto-generated.
  276. * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! =========================
  277. */
  278. /* eslint-disable max-len */
  279. __checkObsolete__(['Material', 'Texture2D', 'gfx']);
  280. ({
  281. SampleCount
  282. } = gfx);
  283. _cclegacy._RF.pop();
  284. _crd = false;
  285. }
  286. };
  287. });
  288. //# sourceMappingURL=b349769b96cc4c1dff92d5d6f941366e27a02c6b.js.map