BabylonJS/Babylon.js · error · Error

NodeRenderGraphInputBlock: Creation options are missing for

Error message

NodeRenderGraphInputBlock: Creation options are missing for texture "${this.name}"

What it means

Texture-type input blocks need FrameGraphTextureCreationOptions (size, formats, etc.) to create their render target. If the block's type is a texture type and creationOptions were never set, _buildBlock throws before creating the render target texture.

Source

Thrown at packages/dev/core/src/FrameGraph/Node/Blocks/inputBlock.pure.ts:263

            } 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);
        }
    }

    public override dispose() {
        this._storedValue = null;
        this.onValueChangedObservable.clear();
        super.dispose();
    }

    protected override _dumpPropertiesCode() {
        const codes: string[] = [];
        codes.push(`${this._codeVariableName}.isExternal = ${this.isExternal};`);
        if (this.isAnyTexture()) {
            if (!this.isExternal) {
                codes.push(`${this._codeVariableName}.creationOptions = ${JSON.stringify(this.creationOptions)};`);

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Assign inputBlock.creationOptions = { size: {...}, formats: [...] } before build
  2. Use the appropriate helper that sets creation options for texture input blocks
  3. If the block should only wrap an existing texture, ensure its type is not a texture-creation type or provide options anyway

Example fix

// before
const input = new NodeRenderGraphInputBlock("rt");
input.type = NodeRenderGraphBlockConnectionPointTypes.Texture;
graph.buildAsync();
// after
input.creationOptions = { size: { width: 512, height: 512 } };
graph.buildAsync();
Defensive patterns

Strategy: validation

Validate before calling

if ((inputBlock.type & NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer) !== 0 && !inputBlock.creationOptions) {
  throw new Error(`provide creationOptions for texture input '${inputBlock.name}'`);
}

Type guard

function hasCreationOptions(b) { return !!b.creationOptions; }

Try / catch

try { graph.buildAsync(); } catch (e) { if (e.message.includes('Creation options are missing')) { console.error('Assign creationOptions to texture input blocks before building'); } else { throw e; } }

Prevention

When it happens

Trigger: Constructing a NodeRenderGraphInputBlock whose connection point type includes TextureAllButBackBuffer without assigning creationOptions, then building the graph.

Common situations: Creating an input block for a texture but only calling setValue without options; using a factory that expects options; refactors that removed the creationOptions assignment.

Related errors


AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30). Data as JSON: /api/errors/403115ccc5a156c9. Report an issue: GitHub.