{"record":{"id":"92c979a337ecd2a4","repo":"BabylonJS/Babylon.js","slug":"framegraphpostprocesstask-this-name-sourcete-92c979","errorCode":null,"errorMessage":"FrameGraphPostProcessTask \"${this.name}\": sourceTexture and objectRendererTask are required","messagePattern":"FrameGraphPostProcessTask \"(.+?)\": sourceTexture and objectRendererTask are required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/dev/core/src/FrameGraph/Tasks/PostProcesses/taaTask.ts","lineNumber":51,"sourceCode":"    protected _initRenderingObserver: Observer<ObjectRenderer>;\r\n\r\n    /**\r\n     * Constructs a new Temporal Anti-Aliasing task.\r\n     * @param name The name of the task.\r\n     * @param frameGraph The frame graph this task is associated with.\r\n     * @param thinPostProcess The thin post process to use for the Temporal Anti-Aliasing effect. If not provided, a new one will be created.\r\n     */\r\n    constructor(name: string, frameGraph: FrameGraph, thinPostProcess?: ThinTAAPostProcess) {\r\n        super(name, frameGraph, thinPostProcess || new ThinTAAPostProcess(name, frameGraph.scene));\r\n    }\r\n\r\n    public override getClassName(): string {\r\n        return \"FrameGraphTAATask\";\r\n    }\r\n\r\n    public override record(): FrameGraphRenderPass {\r\n        if (this.sourceTexture === undefined || this.objectRendererTask === undefined) {\r\n            throw new Error(`FrameGraphPostProcessTask \"${this.name}\": sourceTexture and objectRendererTask are required`);\r\n        }\r\n\r\n        this._frameGraph.scene.onBeforeRenderObservable.remove(this._onBeforeRenderSceneObserver);\r\n        this._onBeforeRenderSceneObserver = this._frameGraph.scene.onBeforeRenderObservable.add(() => {\r\n            if (this.postProcess.reprojectHistory && !this.disabled) {\r\n                this.postProcess._updateJitter();\r\n            }\r\n        });\r\n\r\n        const objectRenderer = this.objectRendererTask.objectRenderer;\r\n\r\n        objectRenderer.onInitRenderingObservable.remove(this._initRenderingObserver);\r\n        this._initRenderingObserver = objectRenderer.onInitRenderingObservable.add(() => {\r\n            if (!this.postProcess.reprojectHistory && !this.disabled) {\r\n                this.postProcess._updateJitter();\r\n\r\n                // We pass false to this.camera.getProjectionMatrix() when TAA is enabled to avoid overwriting the projection matrix calculated by the call to this.postProcess.updateJitter()\r\n                const camera = objectRenderer.activeCamera!;\r","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/core/src/FrameGraph/Tasks/PostProcesses/taaTask.ts#L33-L69","documentation":"FrameGraphTAATask.record() requires sourceTexture and objectRendererTask to be set before recording; note the message is emitted with the base class name \"FrameGraphPostProcessTask\" but is thrown by the TAA (temporal anti-aliasing) task. TAA reprojects the previous frame's history using the object renderer's motion/jitter data, so without the source texture handle and the reference to the object renderer task the pass cannot be constructed. The library throws this precondition error at record time.","triggerScenarios":"Calling record() (directly or via FrameGraph.build()) on a FrameGraphTAATask when sourceTexture is undefined or objectRendererTask (the FrameGraphObjectRendererTask instance) was never assigned.","commonSituations":"Creating a TAA task but forgetting to link it to the object renderer task whose frames it anti-aliases; forgetting to assign the source texture from the object renderer's output; renaming/refactoring that dropped one of the two assignments; TAA used without any object renderer in the graph at all.","solutions":["Set taaTask.objectRendererTask to the FrameGraphObjectRendererTask instance before building","Set taaTask.sourceTexture to the object renderer task's output texture handle","Make sure the object renderer task is added to the frame graph before the TAA task","Inspect both properties before build() to confirm neither is undefined"],"exampleFix":"// before\nconst taaTask = new FrameGraphTAATask(\"taa\", frameGraph);\nframeGraph.addTask(taaTask);\nframeGraph.build(); // throws: sourceTexture and objectRendererTask required\n\n// after\nconst objectRendererTask = new FrameGraphObjectRendererTask(\"renderer\", frameGraph, { mesh: mesh, camera: camera });\nconst taaTask = new FrameGraphTAATask(\"taa\", frameGraph);\ntaaTask.objectRendererTask = objectRendererTask;\ntaaTask.sourceTexture = objectRendererTask.outputTexture;\nframeGraph.addTask(objectRendererTask);\nframeGraph.addTask(taaTask);\nframeGraph.build();","handlingStrategy":"validation","validationCode":"if (taaTask.sourceTexture === undefined) throw new Error(\"TAA task: sourceTexture not set\");\nif (taaTask.objectRendererTask === undefined) throw new Error(\"TAA task: objectRendererTask not set\");","typeGuard":"function hasTAAInputs(t) { return t.sourceTexture !== undefined && t.objectRendererTask !== undefined; }","tryCatchPattern":"try { frameGraph.build(); } catch (e) { if (String(e.message).includes(\"sourceTexture and objectRendererTask are required\")) { console.error(\"TAA task missing sourceTexture or objectRendererTask\"); } else { throw e; } }","preventionTips":["Always create the FrameGraphObjectRendererTask first and assign it to taaTask.objectRendererTask","Bind taaTask.sourceTexture to the object renderer's output texture","Add the object renderer task to the graph before the TAA task","Remember TAA in frame graphs requires an object renderer — it cannot be used standalone"],"tags":["babylonjs","frame-graph","taa","anti-aliasing","missing-input"],"backgroundTag":"missing-required-task-input","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}