{"ast":null,"code":"import { __decorate } from \"../tslib.es6.js\";\nimport { PostProcess } from \"./postProcess.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { serialize } from \"../Misc/decorators.js\";\nimport { ThinBloomMergePostProcess } from \"./thinBloomMergePostProcess.js\";\n/**\n * The BloomMergePostProcess merges blurred images with the original based on the values of the circle of confusion.\n */\nexport class BloomMergePostProcess extends PostProcess {\n /** Weight of the bloom to be added to the original input. */\n get weight() {\n return this._effectWrapper.weight;\n }\n set weight(value) {\n this._effectWrapper.weight = value;\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"BloomMergePostProcess\" string\n */\n getClassName() {\n return \"BloomMergePostProcess\";\n }\n /**\n * Creates a new instance of @see BloomMergePostProcess\n * @param name The name of the effect.\n * @param originalFromInput Post process which's input will be used for the merge.\n * @param blurred Blurred highlights post process which's output will be used.\n * @param weight Weight of the bloom to be added to the original input.\n * @param options The required width/height ratio to downsize to before computing the render pass.\n * @param camera The camera to apply the render pass to.\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\n * @param engine The engine which the post process will be applied. (default: current engine)\n * @param reusable If the post process can be reused on the same frame. (default: false)\n * @param textureType Type of textures used when performing the post process. (default: 0)\n * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)\n */\n constructor(name, originalFromInput, blurred, weight, options, camera = null, samplingMode, engine, reusable, textureType = 0, blockCompilation = false) {\n const blockCompilationFinal = typeof options === \"number\" ? blockCompilation : !!options.blockCompilation;\n const localOptions = {\n uniforms: ThinBloomMergePostProcess.Uniforms,\n samplers: ThinBloomMergePostProcess.Samplers,\n size: typeof options === \"number\" ? options : undefined,\n camera,\n samplingMode,\n engine,\n reusable,\n textureType,\n ...options,\n blockCompilation: true\n };\n super(name, ThinBloomMergePostProcess.FragmentUrl, {\n effectWrapper: typeof options === \"number\" || !options.effectWrapper ? new ThinBloomMergePostProcess(name, engine, localOptions) : undefined,\n ...localOptions\n });\n this.weight = weight;\n this.externalTextureSamplerBinding = true;\n this.onApplyObservable.add(effect => {\n effect.setTextureFromPostProcess(\"textureSampler\", originalFromInput);\n effect.setTextureFromPostProcessOutput(\"bloomBlur\", blurred);\n });\n if (!blockCompilationFinal) {\n this.updateEffect();\n }\n }\n}\n__decorate([serialize()], BloomMergePostProcess.prototype, \"weight\", null);\nRegisterClass(\"BABYLON.BloomMergePostProcess\", BloomMergePostProcess);","map":{"version":3,"names":["__decorate","PostProcess","RegisterClass","serialize","ThinBloomMergePostProcess","BloomMergePostProcess","weight","_effectWrapper","value","getClassName","constructor","name","originalFromInput","blurred","options","camera","samplingMode","engine","reusable","textureType","blockCompilation","blockCompilationFinal","localOptions","uniforms","Uniforms","samplers","Samplers","size","undefined","FragmentUrl","effectWrapper","externalTextureSamplerBinding","onApplyObservable","add","effect","setTextureFromPostProcess","setTextureFromPostProcessOutput","updateEffect","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/PostProcesses/bloomMergePostProcess.js"],"sourcesContent":["import { __decorate } from \"../tslib.es6.js\";\nimport { PostProcess } from \"./postProcess.js\";\n\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { serialize } from \"../Misc/decorators.js\";\nimport { ThinBloomMergePostProcess } from \"./thinBloomMergePostProcess.js\";\n/**\n * The BloomMergePostProcess merges blurred images with the original based on the values of the circle of confusion.\n */\nexport class BloomMergePostProcess extends PostProcess {\n /** Weight of the bloom to be added to the original input. */\n get weight() {\n return this._effectWrapper.weight;\n }\n set weight(value) {\n this._effectWrapper.weight = value;\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"BloomMergePostProcess\" string\n */\n getClassName() {\n return \"BloomMergePostProcess\";\n }\n /**\n * Creates a new instance of @see BloomMergePostProcess\n * @param name The name of the effect.\n * @param originalFromInput Post process which's input will be used for the merge.\n * @param blurred Blurred highlights post process which's output will be used.\n * @param weight Weight of the bloom to be added to the original input.\n * @param options The required width/height ratio to downsize to before computing the render pass.\n * @param camera The camera to apply the render pass to.\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\n * @param engine The engine which the post process will be applied. (default: current engine)\n * @param reusable If the post process can be reused on the same frame. (default: false)\n * @param textureType Type of textures used when performing the post process. (default: 0)\n * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)\n */\n constructor(name, originalFromInput, blurred, weight, options, camera = null, samplingMode, engine, reusable, textureType = 0, blockCompilation = false) {\n const blockCompilationFinal = typeof options === \"number\" ? blockCompilation : !!options.blockCompilation;\n const localOptions = {\n uniforms: ThinBloomMergePostProcess.Uniforms,\n samplers: ThinBloomMergePostProcess.Samplers,\n size: typeof options === \"number\" ? options : undefined,\n camera,\n samplingMode,\n engine,\n reusable,\n textureType,\n ...options,\n blockCompilation: true,\n };\n super(name, ThinBloomMergePostProcess.FragmentUrl, {\n effectWrapper: typeof options === \"number\" || !options.effectWrapper ? new ThinBloomMergePostProcess(name, engine, localOptions) : undefined,\n ...localOptions,\n });\n this.weight = weight;\n this.externalTextureSamplerBinding = true;\n this.onApplyObservable.add((effect) => {\n effect.setTextureFromPostProcess(\"textureSampler\", originalFromInput);\n effect.setTextureFromPostProcessOutput(\"bloomBlur\", blurred);\n });\n if (!blockCompilationFinal) {\n this.updateEffect();\n }\n }\n}\n__decorate([\n serialize()\n], BloomMergePostProcess.prototype, \"weight\", null);\nRegisterClass(\"BABYLON.BloomMergePostProcess\", BloomMergePostProcess);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,yBAAyB,QAAQ,gCAAgC;AAC1E;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,SAASJ,WAAW,CAAC;EACnD;EACA,IAAIK,MAAMA,CAAA,EAAG;IACT,OAAO,IAAI,CAACC,cAAc,CAACD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