1 |
- {"ast":null,"code":"import { __decorate } from \"../tslib.es6.js\";\nimport { PostProcess } from \"./postProcess.js\";\nimport { serialize } from \"../Misc/decorators.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { ThinExtractHighlightsPostProcess } from \"./thinExtractHighlightsPostProcess.js\";\n/**\n * The extract highlights post process sets all pixels to black except pixels above the specified luminance threshold. Used as the first step for a bloom effect.\n */\nexport class ExtractHighlightsPostProcess extends PostProcess {\n /**\n * The luminance threshold, pixels below this value will be set to black.\n */\n get threshold() {\n return this._effectWrapper.threshold;\n }\n set threshold(value) {\n this._effectWrapper.threshold = value;\n }\n /** @internal */\n get _exposure() {\n return this._effectWrapper._exposure;\n }\n /** @internal */\n set _exposure(value) {\n this._effectWrapper._exposure = value;\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"ExtractHighlightsPostProcess\" string\n */\n getClassName() {\n return \"ExtractHighlightsPostProcess\";\n }\n constructor(name, options, camera = null, samplingMode, engine, reusable, textureType = 0, blockCompilation = false) {\n const localOptions = {\n uniforms: ThinExtractHighlightsPostProcess.Uniforms,\n size: typeof options === \"number\" ? options : undefined,\n camera,\n samplingMode,\n engine,\n reusable,\n textureType,\n blockCompilation,\n ...options\n };\n super(name, ThinExtractHighlightsPostProcess.FragmentUrl, {\n effectWrapper: typeof options === \"number\" || !options.effectWrapper ? new ThinExtractHighlightsPostProcess(name, engine, localOptions) : undefined,\n ...localOptions\n });\n /**\n * Post process which has the input texture to be used when performing highlight extraction\n * @internal\n */\n this._inputPostProcess = null;\n this.onApplyObservable.add(effect => {\n this.externalTextureSamplerBinding = !!this._inputPostProcess;\n if (this._inputPostProcess) {\n effect.setTextureFromPostProcess(\"textureSampler\", this._inputPostProcess);\n }\n });\n }\n}\n__decorate([serialize()], ExtractHighlightsPostProcess.prototype, \"threshold\", null);\nRegisterClass(\"BABYLON.ExtractHighlightsPostProcess\", ExtractHighlightsPostProcess);","map":{"version":3,"names":["__decorate","PostProcess","serialize","RegisterClass","ThinExtractHighlightsPostProcess","ExtractHighlightsPostProcess","threshold","_effectWrapper","value","_exposure","getClassName","constructor","name","options","camera","samplingMode","engine","reusable","textureType","blockCompilation","localOptions","uniforms","Uniforms","size","undefined","FragmentUrl","effectWrapper","_inputPostProcess","onApplyObservable","add","effect","externalTextureSamplerBinding","setTextureFromPostProcess","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/PostProcesses/extractHighlightsPostProcess.js"],"sourcesContent":["import { __decorate } from \"../tslib.es6.js\";\nimport { PostProcess } from \"./postProcess.js\";\n\nimport { serialize } from \"../Misc/decorators.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { ThinExtractHighlightsPostProcess } from \"./thinExtractHighlightsPostProcess.js\";\n/**\n * The extract highlights post process sets all pixels to black except pixels above the specified luminance threshold. Used as the first step for a bloom effect.\n */\nexport class ExtractHighlightsPostProcess extends PostProcess {\n /**\n * The luminance threshold, pixels below this value will be set to black.\n */\n get threshold() {\n return this._effectWrapper.threshold;\n }\n set threshold(value) {\n this._effectWrapper.threshold = value;\n }\n /** @internal */\n get _exposure() {\n return this._effectWrapper._exposure;\n }\n /** @internal */\n set _exposure(value) {\n this._effectWrapper._exposure = value;\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"ExtractHighlightsPostProcess\" string\n */\n getClassName() {\n return \"ExtractHighlightsPostProcess\";\n }\n constructor(name, options, camera = null, samplingMode, engine, reusable, textureType = 0, blockCompilation = false) {\n const localOptions = {\n uniforms: ThinExtractHighlightsPostProcess.Uniforms,\n size: typeof options === \"number\" ? options : undefined,\n camera,\n samplingMode,\n engine,\n reusable,\n textureType,\n blockCompilation,\n ...options,\n };\n super(name, ThinExtractHighlightsPostProcess.FragmentUrl, {\n effectWrapper: typeof options === \"number\" || !options.effectWrapper ? new ThinExtractHighlightsPostProcess(name, engine, localOptions) : undefined,\n ...localOptions,\n });\n /**\n * Post process which has the input texture to be used when performing highlight extraction\n * @internal\n */\n this._inputPostProcess = null;\n this.onApplyObservable.add((effect) => {\n this.externalTextureSamplerBinding = !!this._inputPostProcess;\n if (this._inputPostProcess) {\n effect.setTextureFromPostProcess(\"textureSampler\", this._inputPostProcess);\n }\n });\n }\n}\n__decorate([\n serialize()\n], ExtractHighlightsPostProcess.prototype, \"threshold\", null);\nRegisterClass(\"BABYLON.ExtractHighlightsPostProcess\", ExtractHighlightsPostProcess);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,gCAAgC,QAAQ,uCAAuC;AACxF;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,SAASJ,WAAW,CAAC;EAC1D;AACJ;AACA;EACI,IAAIK,SAASA,CAAA,EAAG;IACZ,OAAO,IAAI,CAACC,cAAc,CAACD,SAAS;EACxC;EACA,IAAIA,SAASA,CAACE,KAAK,EAAE;IACjB,IAAI,CAACD,cAAc,CAACD,SAAS,GAAGE,KAAK;EACzC;EACA;EACA,IAAIC,SAASA,CAAA,EAAG;IACZ,OAAO,IAAI,CAACF,cAAc,CAACE,SAAS;EACxC;EACA;EACA,IAAIA,SAASA,CAACD,KAAK,EAAE;IACjB,IAAI,CAACD,cAAc,CAACE,SAAS,GAAGD,KAAK;EACzC;EACA;AACJ;AACA;AACA;EACIE,YAAYA,CAAA,EAAG;IACX,OAAO,8BAA8B;EACzC;EACAC,WAAWA,CAACC,IAAI,EAAEC,OAAO,EAAEC,MAAM,GAAG,IAAI,EAAEC,YAAY,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,WAAW,GAAG,CAAC,EAAEC,gBAAgB,GAAG,KAAK,EAAE;IACjH,MAAMC,YAAY,GAAG;MACjBC,QAAQ,EAAEjB,gCAAgC,CAACkB,QAAQ;MACnDC,IAAI,EAAE,OAAOV,OAAO,KAAK,QAAQ,GAAGA,OAAO,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