{"record":{"id":"469db28f5adf6a9c","repo":"BabylonJS/Babylon.js","slug":"framegraphbloommergetask-this-name-sourcetex","errorCode":null,"errorMessage":"FrameGraphBloomMergeTask \"${this.name}\": sourceTexture and blurTexture are required","messagePattern":"FrameGraphBloomMergeTask \"(.+?)\": sourceTexture and blurTexture are required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/dev/core/src/FrameGraph/Tasks/PostProcesses/bloomMergeTask.ts","lineNumber":23,"sourceCode":"/**\r\n * @internal\r\n */\r\nexport class FrameGraphBloomMergeTask extends FrameGraphPostProcessTask {\r\n    public blurTexture: FrameGraphTextureHandle;\r\n\r\n    public override readonly postProcess: ThinBloomMergePostProcess;\r\n\r\n    constructor(name: string, frameGraph: FrameGraph, thinPostProcess?: ThinBloomMergePostProcess) {\r\n        super(name, frameGraph, thinPostProcess || new ThinBloomMergePostProcess(name, frameGraph.engine));\r\n    }\r\n\r\n    public override getClassName(): string {\r\n        return \"FrameGraphBloomMergeTask\";\r\n    }\r\n\r\n    public override record(skipCreationOfDisabledPasses = false): FrameGraphRenderPass {\r\n        if (this.sourceTexture === undefined || this.blurTexture === undefined) {\r\n            throw new Error(`FrameGraphBloomMergeTask \"${this.name}\": sourceTexture and blurTexture are required`);\r\n        }\r\n\r\n        const pass = super.record(skipCreationOfDisabledPasses, undefined, (context) => {\r\n            context.bindTextureHandle(this._postProcessDrawWrapper.effect!, \"bloomBlur\", this.blurTexture);\r\n        });\r\n\r\n        pass.addDependencies(this.blurTexture);\r\n\r\n        return pass;\r\n    }\r\n}\r\n","sourceCodeStart":5,"sourceCodeEnd":35,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/core/src/FrameGraph/Tasks/PostProcesses/bloomMergeTask.ts#L5-L35","documentation":"FrameGraphBloomMergeTask merges the source image with a blurred bloom texture, requiring both sourceTexture and blurTexture inputs. record() throws when either handle is undefined.","triggerScenarios":"bloomMergeTask.record() with task.sourceTexture === undefined or task.blurTexture === undefined.","commonSituations":"Using the merge task standalone without the accompanying bloom (downsample/upsample) task that produces blurTexture; failing to link the blur task's output; reordering tasks so inputs are wired after record().","solutions":["Assign task.sourceTexture to the original scene/source texture handle.","Assign task.blurTexture to the output of the bloom blur (upsampled) task.","Verify the bloom blur task is recorded before the merge task in the graph."],"exampleFix":"// before\nbloomMergeTask.sourceTexture = sceneColorTask.output;\ncontext.build();\n// after\nbloomMergeTask.sourceTexture = sceneColorTask.output;\nbloomMergeTask.blurTexture = bloomUpsampleTask.output;\ncontext.build();","handlingStrategy":"validation","validationCode":"if (bloomMergeTask.sourceTexture === undefined || bloomMergeTask.blurTexture === undefined) {\n  throw new Error(\"BloomMergeTask requires sourceTexture and blurTexture\");\n}","typeGuard":"function isBloomMergeReady(task: FrameGraphBloomMergeTask): boolean {\n  return task.sourceTexture !== undefined && task.blurTexture !== undefined;\n}","tryCatchPattern":"try {\n  bloomMergeTask.record();\n} catch (e) {\n  if (String(e).includes(\"sourceTexture and blurTexture are required\")) {\n    console.error(\"Ensure the bloom blur task runs before the merge task and its output is bound\");\n  } else throw e;\n}","preventionTips":["Always pair bloom merge with an upstream bloom blur task and bind its output.","Order tasks: source -> downsample/blur -> upsample -> merge.","Add a build-time input completeness check."],"tags":["frame-graph","post-process","bloom","missing-input"],"backgroundTag":"required-input-missing","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}