BabylonJS/Babylon.js · error

Auto bound input ${autoBoundInput.name} has an unsupported t

Error message

Auto bound input ${autoBoundInput.name} has an unsupported type or auto bind value

What it means

During getShaderBinding, CustomShaderBlock iterates inputs flagged as auto-bound and maps each (type, autoBind) pair to a binding. A pair the mapping table doesn't recognize — an unexpected connection point type combined with that autoBind mode — cannot be translated to a shader binding, so it throws.

Source

Thrown at packages/dev/smartFilters/src/blockFoundation/customShaderBlock.ts:303

                type: input.type,
                runtimeData: this._confirmRuntimeDataSupplied(input),
                autoBind: undefined,
            };
        });

        if (this._autoBoundInputs) {
            for (const autoBoundInput of this._autoBoundInputs) {
                if (
                    (autoBoundInput.autoBind === "outputResolution" && autoBoundInput.type == ConnectionPointType.Vector2) ||
                    (autoBoundInput.autoBind === "outputAspectRatio" && autoBoundInput.type == ConnectionPointType.Vector2)
                ) {
                    inputsToBind.push({
                        name: autoBoundInput.name,
                        type: autoBoundInput.type,
                        autoBind: autoBoundInput.autoBind,
                    });
                } else {
                    throw new Error(`Auto bound input ${autoBoundInput.name} has an unsupported type or auto bind value`);
                }
            }
        }

        return new CustomShaderBlockBinding(inputsToBind);
    }

    /**
     * Validates the default value of a connection point and returns it if valid.
     * If the default value is not provided or is invalid, this returns null.
     * @param connectionPointType - The type of the connection point
     * @param connectionPointName - The name of the connection point
     * @param defaultValue - The default value of the connection point
     * @returns The default value, or null if no default value is provided or it was invalid
     */
    private _validateDefaultValue<U extends ConnectionPointType>(
        connectionPointType: U,
        connectionPointName: string,

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Check the input's type and autoBind values against the supported combinations in getShaderBinding and correct the block definition.
  2. Update to a library version that supports the type/autoBind pair you need.
  3. Remove the autoBind flag from the offending input and bind it manually via inputsToBind.
  4. If you added a new ConnectionPointType or autoBind mode, extend the binding switch in customShaderBlock.ts to handle it.

Example fix

// before
{ "name": "time", "type": "Texture", "autoBind": "time" }
// after
{ "name": "time", "type": "Float", "autoBind": "time" }
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED_AUTO_BINDS = new Set([/* supported (type, autoBind) combos */]);
for (const input of blockDef.inputs) {
    if (input.autoBind && !SUPPORTED_AUTO_BINDS.has(`${input.type}:${input.autoBind}`)) {
        throw new Error(`unsupported autoBind '${input.autoBind}' for type '${input.type}' on '${input.name}'`);
    }
}

Type guard

function hasSupportedAutoBind(input: { type: ConnectionPointType; autoBind?: string }): boolean {
    return !input.autoBind || SUPPORTED_AUTO_BINDS.has(`${input.type}:${input.autoBind}`);
}

Try / catch

try {
    const binding = block.getShaderBinding();
} catch (e) {
    if (e instanceof Error && e.message.startsWith('Auto bound input')) {
        // fix or remove the autoBind on the named input
    } else throw e;
}

Prevention

When it happens

Trigger: Declaring an auto-bound input whose type/autoBind combination is not supported by the binding switch in getShaderBinding, e.g. a newly added ConnectionPointType or autoBind enum value not yet handled, or a block definition JSON with a mistyped autoBind value.

Common situations: Custom shader block definitions authored by hand with an invalid autoBind string/number; upgrading the library so a previously accepted combination changed; adding a new connection point type without extending the binding code.

Related errors


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