BabylonJS/Babylon.js · error · Error
NodeRenderGraphInputBlock: External input "${this.name}" is
Error message
NodeRenderGraphInputBlock: External input "${this.name}" is not set What it means
A NodeRenderGraphInputBlock in external-input mode must have its value stored via setValue before the graph is built. If _storedValue is undefined or null at build time, _buildBlock throws because there is no data to feed downstream blocks.
Source
Thrown at packages/dev/core/src/FrameGraph/Node/Blocks/inputBlock.pure.ts:249
}
protected override _buildBlock(state: NodeRenderGraphBuildState) {
super._buildBlock(state);
if (this.isExternal) {
if (this.isBackBuffer()) {
this.output.value = backbufferColorTextureHandle;
} else if (this.isBackBufferDepthStencilAttachment()) {
this.output.value = backbufferDepthStencilTextureHandle;
} else if (this.isCamera()) {
this.output.value = this.getTypedValue<Camera>();
} else if (this.isObjectList()) {
this.output.value = this.getTypedValue<FrameGraphObjectList>();
} else if (this.isShadowLight()) {
this.output.value = this.getTypedValue<IShadowLight>();
} else {
if (this._storedValue === undefined || this._storedValue === null) {
throw new Error(`NodeRenderGraphInputBlock: External input "${this.name}" is not set`);
}
const texture = this.getInternalTextureFromValue();
if (texture) {
this.output.value = this._frameGraph.textureManager.importTexture(this.name, texture, this.output.value as FrameGraphTextureHandle);
}
}
return;
}
if ((this.type & NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer) !== 0) {
const textureCreateOptions = this.creationOptions;
if (!textureCreateOptions) {
throw new Error(`NodeRenderGraphInputBlock: Creation options are missing for texture "${this.name}"`);
}
this.output.value = this._frameGraph.textureManager.createRenderTargetTexture(this.name, textureCreateOptions);
}
View on GitHub (pinned to 0592b347b8)
Solutions
- Call inputBlock.setValue(value) before nodeRenderGraph.buildAsync()
- Ensure the resource creation happens prior to graph build and is passed to the block
- If the input may be absent, don't build the block or provide a default value
Example fix
// before
const input = new NodeRenderGraphInputBlock("myTexture");
graph.buildAsync();
// after
const input = new NodeRenderGraphInputBlock("myTexture");
input.setValue(myTexture);
graph.buildAsync(); Defensive patterns
Strategy: validation
Validate before calling
if (inputBlock._storedValue === undefined || inputBlock._storedValue === null) {
throw new Error(`set external input '${inputBlock.name}' before build`);
} Type guard
function hasStoredValue(b) { return b._storedValue !== undefined && b._storedValue !== null; } Try / catch
try { graph.buildAsync(); } catch (e) { if (e.message.includes('External input') && e.message.includes('is not set')) { console.error('Call setValue() on input blocks before building'); } else { throw e; } } Prevention
- Call setValue() on every external input block immediately after creation
- Build the graph only after all external resources exist
- Keep input block creation and value assignment adjacent in code
When it happens
Trigger: Building the render graph without calling inputBlock.setValue(...); the stored value was cleared or never assigned for a non-texture, non-object-list, non-light input.
Common situations: Adding an input block to pass a texture/lut/camera-external resource but forgetting setValue; renaming variables so the setValue call is skipped; building the graph before the resource is created.
Related errors
- Recast is not initialized. Please call InitRecast first.
- There is no NavMesh generated.
- Function not injected yet. Use the factory to create the plu
- There is no navMesh generated.
- Connect failed
AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30).
Data as JSON: /api/errors/fa2ddc4295edb975.
Report an issue: GitHub.