BabylonJS/Babylon.js · error · Error
FrameGraphSSRRenderingPipelineTask "${this.name}": sourceTex
Error message
FrameGraphSSRRenderingPipelineTask "${this.name}": sourceTexture, normalTexture, depthTexture, reflectivityTexture and camera are required What it means
FrameGraphSSRRenderingPipelineTask.record() requires sourceTexture, normalTexture, depthTexture, reflectivityTexture and camera to be assigned before the SSR (screen-space reflections) rendering pipeline task is recorded. Because SSR samples color, normals, depth and a reflectivity/PBR texture, any missing input makes the task impossible to configure, and the library throws a descriptive error at record time. This is a fail-fast validation in the frame graph task contract.
Source
Thrown at packages/dev/core/src/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.ts:164
}
public override isReady() {
return this.ssr.isReady();
}
public override getClassName(): string {
return "FrameGraphSSRRenderingPipelineTask";
}
public record(): void {
if (
this.sourceTexture === undefined ||
this.normalTexture === undefined ||
this.depthTexture === undefined ||
this.reflectivityTexture === undefined ||
this.camera === undefined
) {
throw new Error(`FrameGraphSSRRenderingPipelineTask "${this.name}": sourceTexture, normalTexture, depthTexture, reflectivityTexture and camera are required`);
}
const sourceTextureDescription = this._frameGraph.textureManager.getTextureDescription(this.sourceTexture);
this._ssr.sourceTexture = this.sourceTexture;
this._ssr.sourceSamplingMode = this.sourceSamplingMode;
this._ssr.camera = this.camera;
this._ssr.normalTexture = this.normalTexture;
this._ssr.depthTexture = this.depthTexture;
this._ssr.backDepthTexture = this.backDepthTexture;
this._ssr.reflectivityTexture = this.reflectivityTexture;
let ssrTextureHandle: FrameGraphTextureHandle | undefined;
const textureSize = {
width: Math.floor(sourceTextureDescription.size.width / (this.ssr.ssrDownsample + 1)) || 1,
height: Math.floor(sourceTextureDescription.size.height / (this.ssr.ssrDownsample + 1)) || 1,
};
View on GitHub (pinned to 0592b347b8)
Solutions
- Bind all five inputs before build(): task.sourceTexture, task.normalTexture, task.depthTexture, task.reflectivityTexture and task.camera
- Verify the prepass/material tasks that generate the normal, depth and reflectivity textures are added to the frame graph before the SSR task and their output handles assigned
- Set task.camera to the rendering camera (e.g. frameGraph.scene.activeCamera)
- Log each of the five properties before calling build() to identify exactly which one is undefined
Example fix
// before
const ssrTask = new FrameGraphSSRRenderingPipelineTask("ssr", frameGraph);
frameGraph.addTask(ssrTask);
frameGraph.build(); // throws: required inputs undefined
// after
ssrTask.sourceTexture = mainTextureTask.outputTexture;
ssrTask.normalTexture = prepassTextureTask.outputTexture;
ssrTask.depthTexture = depthTextureTask.outputTexture;
ssrTask.reflectivityTexture = reflectivityTask.outputTexture;
ssrTask.camera = frameGraph.scene.activeCamera;
frameGraph.build(); Defensive patterns
Strategy: validation
Validate before calling
const required = { sourceTexture: ssrPipelineTask.sourceTexture, normalTexture: ssrPipelineTask.normalTexture, depthTexture: ssrPipelineTask.depthTexture, reflectivityTexture: ssrPipelineTask.reflectivityTexture, camera: ssrPipelineTask.camera };
const missing = Object.entries(required).filter(([, v]) => v === undefined).map(([k]) => k);
if (missing.length) throw new Error(`SSR pipeline task missing inputs: ${missing.join(", ")}`); Type guard
function hasSSRPipelineInputs(t) { return t.sourceTexture !== undefined && t.normalTexture !== undefined && t.depthTexture !== undefined && t.reflectivityTexture !== undefined && t.camera !== undefined; } Try / catch
try { frameGraph.build(); } catch (e) { if (String(e.message).includes("sourceTexture, normalTexture, depthTexture, reflectivityTexture and camera are required")) { console.error("SSR pipeline task inputs not wired"); } else { throw e; } } Prevention
- Wire all five inputs (including the easily forgotten reflectivityTexture) right after task creation
- Ensure the prepass/material tasks generating normal, depth and reflectivity textures are added before the SSR task
- Set camera from frameGraph.scene.activeCamera at graph setup time
- Validate all task inputs before FrameGraph.build()
When it happens
Trigger: Calling record() (directly or through FrameGraph.build()) on a FrameGraphSSRRenderingPipelineTask where any of sourceTexture, normalTexture, depthTexture, reflectivityTexture or camera is still undefined — typically because the producing tasks' outputs were never bound to the task's input properties.
Common situations: Wiring an SSR pipeline in a frame graph but forgetting the reflectivity texture produced by the PBR/material task; using the task on a scene without a prepass rendering pipeline generating normals/depth; forgetting to set camera after constructing the task; order-of-addition mistakes so upstream tasks are not in the graph yet.
Related errors
- FrameGraphSSAO2Task "${this.name}": sourceTexture, depthText
- FrameGraphSSRTask "${this.name}": sourceTexture, normalTextu
- FrameGraphPostProcessTask "${this.name}": sourceTexture and
- FrameGraphVolumetricLightingBlendVolumeTask "${this.name}":
- FrameGraphVolumetricLightingTask "${this.name}": targetTextu
AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30).
Data as JSON: /api/errors/137def628b8cb433.
Report an issue: GitHub.