Documentation
    Preparing search index...

    Class ComputePass

    ยง82's Four.ComputePass โ€” see the module header for the named-map rule.

    const pass = new Four.ComputePass({
    shader: kernelWgsl,
    workgroups: [Math.ceil(count / 64), 1, 1],
    bindings: {
    parameters: { buffer: params, access: "read-only" },
    positions,
    velocities,
    },
    });
    if (supportsCompute(renderer)) {
    renderer.compute(pass);
    }

    Implements

    Index
    bindingNames: readonly string[]

    The binding names in binding order โ€” the named map's keys as consumed, exposed so a caller (or a test) can see exactly which name landed on which @binding(i). Empty for the ordered-array spelling, which carries no names.

    bindings: readonly ComputePassBindingEntry[]

    The resolved ordered bindings โ€” the descriptor's shape, frozen. For a named map, index i is the map's i-th key (ComputePass.bindingNames); for an array, the array verbatim.

    entryPoint?: string

    The entry point, as given; undefined selects the backend's default.

    label?: string

    Diagnostic name, as given.

    shader: string

    The kernel source, as given.

    workgroups: readonly [number, number, number]

    The workgroup grid, copied and frozen at construction.