API

Interface RenderTask

A frame-graph task that records a single RenderPass, binds the scene's RenderTarget, and draws renderables into it.

interface RenderTask {
    enabled?: boolean;
    engine: EngineContext;
    executionEnabled?: boolean;
    name: string;
    scene: SceneContext;
    dispose(): void;
    execute?(): number;
    record(): void;
}

Hierarchy (View Summary)

Index
enabled?: boolean

App-driven execute gate, default true. When false the pass is skipped entirely — no attachment load, no MSAA resolve, no draws. The owner that KNOWS the task's content toggles this (e.g. when its last mesh hides); the engine never scans bindings to decide. Disabling a task that owns its target leaves the target's previous content stale — meant for overlay tasks (sharedRt/clr: false), where skipping is a semantic no-op.

Engine captured at task creation.

executionEnabled?: boolean

Runtime frame-graph execution gate, default true. When false, the frame graph keeps the task recorded and its resources alive but skips every pass or built-in execute() call for that frame. This is independent from any task-specific enabled state whose disabled transition may still execute work.

name: string

Render tasks are scene-bound because they consume scene camera, lights, and renderables.