Documentation
    Preparing search index...

    Class NodeMaterialBuilder

    The "surface" builder whose output is a ready NodeMaterial — §60's authoring surface (see the module header for the example).

    Hierarchy (View Summary)

    Index
    collectedTextures: Record<string, MaterialTexture>

    Texture values collected by ShaderGraphBuilder.texture.

    domain: ShaderDomain

    Which stage inputs this graph may name — fixed at construction.

    The output slots — builder.output.color = … (RFC 0001's spelling).

    • get nodeCount(): number

      How many nodes the graph holds so far.

      Returns number

    • A constant. A number is a float; an array of 2–4 numbers is the matching vector; 9 or 16 numbers are mat3/mat4 (column-major, as Matrix4.elements is laid out).

      Parameters

      • value: number | readonly number[]

      Returns ShaderExpression

    • Snapshots the built graph — nodes in creation order, outputs resolved — and validates it (analyzeShaderGraph, §85: a broken graph is refused here, where the code that built it is on the stack).

      Returns ShaderGraph

      RangeError when no colour output was assigned, or when the graph breaks any §60 IR rule.

    • Samples the named sampler at uv (the default uv stream when omitted) without binding a value: a surface material binds one later with setTexture(name, …); a "screen" graph's names resolve against the §70 pass's declared inputs ("source" plus GraphEffect.textures).

      Parameters

      Returns ShaderExpression

    • §9 render time, in seconds — never simulation time (§42/§43: nothing downstream of a shader may become simulation input). The application feeds it to the backend (WebglRenderer.renderTime).

      Returns ShaderExpression

    • Opt into one padded std140 uniform upload per material draw on WebGL 2.

      Returns this