1 |
- {"ast":null,"code":"import { __decorate } from \"../../../../tslib.es6.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { editableInPropertyPage } from \"../../../../Decorators/nodeDecorator.js\";\nimport { FrameGraphTAAObjectRendererTask } from \"../../../Tasks/Rendering/taaObjectRendererTask.js\";\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"./baseObjectRendererBlock.js\";\n/**\n * Block that render objects with temporal anti-aliasing to a render target\n */\nexport class NodeRenderGraphTAAObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {\n /**\n * Gets the frame graph task associated with this block\n */\n get task() {\n return this._frameGraphTask;\n }\n /**\n * Create a new NodeRenderGraphTAAObjectRendererBlock\n * @param name defines the block name\n * @param frameGraph defines the hosting frame graph\n * @param scene defines the hosting scene\n * @param doNotChangeAspectRatio True (default) to not change the aspect ratio of the scene in the RTT\n */\n constructor(name, frameGraph, scene, doNotChangeAspectRatio = true) {\n super(name, frameGraph, scene);\n this._additionalConstructionParameters = [doNotChangeAspectRatio];\n this._frameGraphTask = new FrameGraphTAAObjectRendererTask(this.name, frameGraph, scene, {\n doNotChangeAspectRatio\n });\n }\n /** True (default) to not change the aspect ratio of the scene in the RTT */\n get doNotChangeAspectRatio() {\n return this._frameGraphTask.objectRenderer.options.doNotChangeAspectRatio;\n }\n set doNotChangeAspectRatio(value) {\n this._frameGraphTask.dispose();\n this._frameGraphTask = new FrameGraphTAAObjectRendererTask(this.name, this._frameGraph, this._scene, {\n doNotChangeAspectRatio: value\n });\n this._additionalConstructionParameters = [value];\n }\n /** Number of accumulated samples */\n get samples() {\n return this._frameGraphTask.postProcess.samples;\n }\n set samples(value) {\n this._frameGraphTask.postProcess.samples = value;\n }\n /** The factor used to blend the history frame with current frame */\n get factor() {\n return this._frameGraphTask.postProcess.factor;\n }\n set factor(value) {\n this._frameGraphTask.postProcess.factor = value;\n }\n /** Indicates if depth testing must be enabled or disabled */\n get disableOnCameraMove() {\n return this._frameGraphTask.postProcess.disableOnCameraMove;\n }\n set disableOnCameraMove(value) {\n this._frameGraphTask.postProcess.disableOnCameraMove = value;\n }\n /** Indicates if TAA must be enabled or disabled */\n get disableTAA() {\n return this._frameGraphTask.postProcess.disabled;\n }\n set disableTAA(value) {\n this._frameGraphTask.postProcess.disabled = value;\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphTAAObjectRendererBlock\";\n }\n _dumpPropertiesCode() {\n const codes = [];\n codes.push(`${this._codeVariableName}.samples = ${this.samples};`);\n codes.push(`${this._codeVariableName}.factor = ${this.factor};`);\n codes.push(`${this._codeVariableName}.disableOnCameraMove = ${this.disableOnCameraMove};`);\n codes.push(`${this._codeVariableName}.disableTAA = ${this.disableTAA};`);\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.samples = this.samples;\n serializationObject.factor = this.factor;\n serializationObject.disableOnCameraMove = this.disableOnCameraMove;\n serializationObject.disableTAA = this.disableTAA;\n return serializationObject;\n }\n _deserialize(serializationObject) {\n super._deserialize(serializationObject);\n this.samples = serializationObject.samples;\n this.factor = serializationObject.factor;\n this.disableOnCameraMove = serializationObject.disableOnCameraMove;\n this.disableTAA = serializationObject.disableTAA;\n }\n}\n__decorate([editableInPropertyPage(\"Do not change aspect ratio\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\")], NodeRenderGraphTAAObjectRendererBlock.prototype, \"doNotChangeAspectRatio\", null);\n__decorate([editableInPropertyPage(\"Samples\", 2 /* PropertyTypeForEdition.Int */, \"TEMPORAL ANTI-ALIASING\")], NodeRenderGraphTAAObjectRendererBlock.prototype, \"samples\", null);\n__decorate([editableInPropertyPage(\"Factor\", 1 /* PropertyTypeForEdition.Float */, \"TEMPORAL ANTI-ALIASING\")], NodeRenderGraphTAAObjectRendererBlock.prototype, \"factor\", null);\n__decorate([editableInPropertyPage(\"Disable on camera move\", 0 /* PropertyTypeForEdition.Boolean */, \"TEMPORAL ANTI-ALIASING\")], NodeRenderGraphTAAObjectRendererBlock.prototype, \"disableOnCameraMove\", null);\n__decorate([editableInPropertyPage(\"Disable TAA\", 0 /* PropertyTypeForEdition.Boolean */, \"TEMPORAL ANTI-ALIASING\")], NodeRenderGraphTAAObjectRendererBlock.prototype, \"disableTAA\", null);\nRegisterClass(\"BABYLON.NodeRenderGraphTAAObjectRendererBlock\", NodeRenderGraphTAAObjectRendererBlock);","map":{"version":3,"names":["__decorate","RegisterClass","editableInPropertyPage","FrameGraphTAAObjectRendererTask","NodeRenderGraphBaseObjectRendererBlock","NodeRenderGraphTAAObjectRendererBlock","task","_frameGraphTask","constructor","name","frameGraph","scene","doNotChangeAspectRatio","_additionalConstructionParameters","objectRenderer","options","value","dispose","_frameGraph","_scene","samples","postProcess","factor","disableOnCameraMove","disableTAA","disabled","getClassName","_dumpPropertiesCode","codes","push","_codeVariableName","join","serialize","serializationObject","_deserialize","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Node/Blocks/Rendering/taaObjectRendererBlock.js"],"sourcesContent":["import { __decorate } from \"../../../../tslib.es6.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { editableInPropertyPage } from \"../../../../Decorators/nodeDecorator.js\";\nimport { FrameGraphTAAObjectRendererTask } from \"../../../Tasks/Rendering/taaObjectRendererTask.js\";\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"./baseObjectRendererBlock.js\";\n/**\n * Block that render objects with temporal anti-aliasing to a render target\n */\nexport class NodeRenderGraphTAAObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {\n /**\n * Gets the frame graph task associated with this block\n */\n get task() {\n return this._frameGraphTask;\n }\n /**\n * Create a new NodeRenderGraphTAAObjectRendererBlock\n * @param name defines the block name\n * @param frameGraph defines the hosting frame graph\n * @param scene defines the hosting scene\n * @param doNotChangeAspectRatio True (default) to not change the aspect ratio of the scene in the RTT\n */\n constructor(name, frameGraph, scene, doNotChangeAspectRatio = true) {\n super(name, frameGraph, scene);\n this._additionalConstructionParameters = [doNotChangeAspectRatio];\n this._frameGraphTask = new FrameGraphTAAObjectRendererTask(this.name, frameGraph, scene, { doNotChangeAspectRatio });\n }\n /** True (default) to not change the aspect ratio of the scene in the RTT */\n get doNotChangeAspectRatio() {\n return this._frameGraphTask.objectRenderer.options.doNotChangeAspectRatio;\n }\n set doNotChangeAspectRatio(value) {\n this._frameGraphTask.dispose();\n this._frameGraphTask = new FrameGraphTAAObjectRendererTask(this.name, this._frameGraph, this._scene, { doNotChangeAspectRatio: value });\n this._additionalConstructionParameters = [value];\n }\n /** Number of accumulated samples */\n get samples() {\n return this._frameGraphTask.postProcess.samples;\n }\n set samples(value) {\n this._frameGraphTask.postProcess.samples = value;\n }\n /** The factor used to blend the history frame with current frame */\n get factor() {\n return this._frameGraphTask.postProcess.factor;\n }\n set factor(value) {\n this._frameGraphTask.postProcess.factor = value;\n }\n /** Indicates if depth testing must be enabled or disabled */\n get disableOnCameraMove() {\n return this._frameGraphTask.postProcess.disableOnCameraMove;\n }\n set disableOnCameraMove(value) {\n this._frameGraphTask.postProcess.disableOnCameraMove = value;\n }\n /** Indicates if TAA must be enabled or disabled */\n get disableTAA() {\n return this._frameGraphTask.postProcess.disabled;\n }\n set disableTAA(value) {\n this._frameGraphTask.postProcess.disabled = value;\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphTAAObjectRendererBlock\";\n }\n _dumpPropertiesCode() {\n const codes = [];\n codes.push(`${this._codeVariableName}.samples = ${this.samples};`);\n codes.push(`${this._codeVariableName}.factor = ${this.factor};`);\n codes.push(`${this._codeVariableName}.disableOnCameraMove = ${this.disableOnCameraMove};`);\n codes.push(`${this._codeVariableName}.disableTAA = ${this.disableTAA};`);\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.samples = this.samples;\n serializationObject.factor = this.factor;\n serializationObject.disableOnCameraMove = this.disableOnCameraMove;\n serializationObject.disableTAA = this.disableTAA;\n return serializationObject;\n }\n _deserialize(serializationObject) {\n super._deserialize(serializationObject);\n this.samples = serializationObject.samples;\n this.factor = serializationObject.factor;\n this.disableOnCameraMove = serializationObject.disableOnCameraMove;\n this.disableTAA = serializationObject.disableTAA;\n }\n}\n__decorate([\n editableInPropertyPage(\"Do not change aspect ratio\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\")\n], NodeRenderGraphTAAObjectRendererBlock.prototype, \"doNotChangeAspectRatio\", null);\n__decorate([\n editableInPropertyPage(\"Samples\", 2 /* PropertyTypeForEdition.Int */, \"TEMPORAL ANTI-ALIASING\")\n], NodeRenderGraphTAAObjectRendererBlock.prototype, \"samples\", null);\n__decorate([\n editableInPropertyPage(\"Factor\", 1 /* PropertyTypeForEdition.Float */, \"TEMPORAL ANTI-ALIASING\")\n], NodeRenderGraphTAAObjectRendererBlock.prototype, \"factor\", null);\n__decorate([\n editableInPropertyPage(\"Disable on camera move\", 0 /* PropertyTypeForEdition.Boolean */, \"TEMPORAL ANTI-ALIASING\")\n], NodeRenderGraphTAAObjectRendererBlock.prototype, \"disableOnCameraMove\", null);\n__decorate([\n editableInPropertyPage(\"Disable TAA\", 0 /* PropertyTypeForEdition.Boolean */, \"TEMPORAL ANTI-ALIASING\")\n], NodeRenderGraphTAAObjectRendererBlock.prototype, \"disableTAA\", null);\nRegisterClass(\"BABYLON.NodeRenderGraphTAAObjectRendererBlock\", NodeRenderGraphTAAObjectRendererBlock);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,0BAA0B;AACrD,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,sBAAsB,QAAQ,yCAAyC;AAChF,SAASC,+BAA+B,QAAQ,mDAAmD;AACnG,SAASC,sCAAsC,QAAQ,8BAA8B;AACrF;AACA;AACA;AACA,OAAO,MAAMC,qCAAqC,SAASD,sCAAsC,CAAC;EAC9F;AACJ;AACA;E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