Renderer · interface

GraphRunner

Explained in Hello world.

interface GraphRunner
import type { GraphRunner } from '@driftengine/core';

Methods

encode

encode(encoder: GPUCommandEncoder, timestampWrites?: GPUComputePassTimestampWrites): void

Records every dispatch of the graph into encoder, in one compute pass.

ParameterTypeDescription
encoderGPUCommandEncoder
timestampWrites?GPUComputePassTimestampWrites

run

run(inputs: ReadonlyMap<string, Float32Array>): Promise<Map<string, Float32Array>>

Writes the inputs, runs the graph and reads its outputs back, each by name.

ParameterTypeDescription
inputsReadonlyMap<string, Float32Array>

dispose

dispose(): void