Taos API Reference
    Preparing search index...

    Interface ShaderNodeDef

    interface ShaderNodeDef {
        kind: string;
        label: string;
        category:
            | "color"
            | "texture"
            | "range"
            | "blend"
            | "input"
            | "const"
            | "math"
            | "vector"
            | "uv"
            | "procedural"
            | "util"
            | "output";
        inputs: ShaderPortDef[];
        output: WgslType
        | null;
        outputs?: ShaderOutputDef[];
        helpers?: string;
        emit?(
            inputs: Record<string, string>,
            data: Record<string, unknown>,
        ): string;
    }
    Index

    Properties

    kind: string
    label: string
    category:
        | "color"
        | "texture"
        | "range"
        | "blend"
        | "input"
        | "const"
        | "math"
        | "vector"
        | "uv"
        | "procedural"
        | "util"
        | "output"
    inputs: ShaderPortDef[]
    output: WgslType | null

    Type of the node's primary value (the let n_id = …), or null for the terminal Output node.

    outputs?: ShaderOutputDef[]

    Named output ports. Defaults to a single out of output type; a multi-output node (e.g. Split) lists each with a component accessor.

    helpers?: string

    Module-scope WGSL helper functions this node needs (emitted once, deduped per node kind, before surface()).

    Methods